Comments (3)
Hi, I'm running deepseek-coder-v2:16b in ollama. I'm trying to make FIM working to get a code completion working in Vim using tab-completion (works e.g. with codellama). However, it outputs much more text then just the completion. Seems to ignore the FIM token.
Example prompt:
<|fim_begin|>int main(<|fim_hole|><|fim_end|>
Answer:
Here's the corrected and completed version of your code snippet for a simple C++ program that outputs "Hello, World!" to the console: ```cpp #include <iostream> using namespace std; int main() { cout << "Hello, World!" << endl; return 0; }
Expected Answer:
int argc, char *argv)
What I'm doing wrong? According to the docs the 16b model is trained with FIM.
hi, do you use model deepseek-coder-v2-lite-base? I use this model with hf to gernerate FIM is good.
![image](https://private-user-images.githubusercontent.com/14356413/348117091-59c07ffe-b02e-49a9-98a2-467ae74f01ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0NTU1NTIsIm5iZiI6MTcyMzQ1NTI1MiwicGF0aCI6Ii8xNDM1NjQxMy8zNDgxMTcwOTEtNTljMDdmZmUtYjAyZS00OWE5LTk4YTItNDY3YWU3NGYwMWVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEyVDA5MzQxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTllYzI3YjUzMzE5NTBlYWU4MWVlMzA3MjY4ZTAxM2NiMTlhYjVjOGZiZmNiNmMxNTZlOTdlMWIwOTYwMmI1YzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.s9NiFDz_Ed4_QvHCQMNgc5VAYnBpkJFMvvj3Bm-7k44)
and I think your fim template need space before words, like this:
<|fim▁begin|>
<|fim▁hole|>
<|fim▁end|>
from deepseek-coder-v2.
You are right. The FIM tokens were wrong. Also the underscore is not a normal underscore. This works now.
let g:ollama_model = 'deepseek-coder-v2:16b-lite-base-q4_0'
let g:ollama_fim_prefix = '<|fim▁begin|>'
let g:ollama_fim_suffix = '<|fim▁hole|>'
let g:ollama_fim_middle = '<|fim▁end|>'
from deepseek-coder-v2.
This is what the hexdump of the working token looks like:
$> echo '<|fim▁begin|>' | hexdump -C
00000000 3c ef bd 9c 66 69 6d e2 96 81 62 65 67 69 6e ef |<...fim...begin.|
00000010 bd 9c 3e 0a |..>.|
from deepseek-coder-v2.
Related Issues (20)
- What is the special token "<|completion|>" used for?
- mismatch between example code and model files HOT 1
- Requirements for the DS-Coder-V2-Instruct HOT 3
- Weird responses
- Inference freezes using the recommended VLLM approach HOT 1
- Loading DeepSeek-Coder-V2-Instruct using transformers fails due to OOM on 8 * A100 (80GB) HOT 5
- reinforcement learning improvement HOT 2
- 关于论文结果复现 HOT 1
- 请问有考虑发布量化版本吗?
- VLLM推理报错 模型:DeepSeek-V2-Chat-0628
- How to build a fine-tuning dataset for code completion?
- prompt for evaluating Code Fixing in readme3.3/paper4.3
- 请问怎么把deepseek和知识库结合生成私有化的AI Agent
- dependency parsing code, deduplication script
- How to evaluate on defects4j?
- What is the FSDP value for `fsdp_transformer_layer_cls_to_wrap`?
- Hi, I have a question about fine tuning.
- 建议
- issue bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepseek-coder-v2.