Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khaledsharif/ts-fill-in-middle
Examples of how to use DeepSeek Coder LLM for Typescript Fill in Middle (FIM) tasks
https://github.com/khaledsharif/ts-fill-in-middle
Last synced: 30 days ago
JSON representation
Examples of how to use DeepSeek Coder LLM for Typescript Fill in Middle (FIM) tasks
- Host: GitHub
- URL: https://github.com/khaledsharif/ts-fill-in-middle
- Owner: KhaledSharif
- License: mit
- Created: 2024-05-08T22:32:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-09T05:22:44.000Z (8 months ago)
- Last Synced: 2024-05-09T23:38:47.043Z (8 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ts-fill-in-middle
Examples of how to use DeepSeek Coder LLM for Typescript Fill in Middle (FIM) tasks### Introduction
Fine-tuned version of deepseek-ai/deepseek-coder-1.3b-base using 0.5B of TypeScript code from bigcode/the-stack-dedup. [link](https://ollama.com/codegpt/deepseek-coder-1.3b-typescript)
### Usage
This model is for completion purposes only.
```
curl http://localhost:11434/api/generate \
-d '{ "model" : "codegpt/deepseek-coder-1.3b-typescript",
"prompt" : "class Person",
"stream" : false,
"options": {
"stop" : ["\n\n"]
}
}'
```### Fill In the Middle (FIM)
DeepSeek models support FIM. For example,
```
<|fim▁begin|>function quickSort(arr: number[]): number[] {
if (arr.length <= 1) {
return arr;
}
const pivot = arr[0];
const left = [];
const right = [];
<|fim▁hole|>
return [...quickSort(left), pivot, ...quickSort(right)];
}<|fim▁end|>
```will generate
```
for (let i = 1; i < arr.length; i++) {
if (arr[i] < pivot) {
left.push(arr[i]);
} else {
right.push(arr[i]);
}
}
```