Git Product home page Git Product logo

Comments (3)

traveler-vee avatar traveler-vee commented on August 12, 2024 1

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

and I think your fim template need space before words, like this:

<|fim▁begin|>
<|fim▁hole|>
<|fim▁end|>

from deepseek-coder-v2.

gergap avatar gergap commented on August 12, 2024

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.

gergap avatar gergap commented on August 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.