Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deepseek Coder not working #92

Open
rhusiev opened this issue Mar 31, 2024 · 1 comment
Open

Deepseek Coder not working #92

rhusiev opened this issue Mar 31, 2024 · 1 comment

Comments

@rhusiev
Copy link

rhusiev commented Mar 31, 2024

When trying to use deepseek coder (via ollama) and its tokenizer and tokens for fim, the result seems completely irrelevant (or, maybe, cut off). However, when using the prompt I would expect to go to the model directly in the ollama, everything works fine:

image

vs

image

Here is my config for llm.nvim:

require("llm").setup({
    model = "deepseek-coder:1.3b-base",
	enable_suggestions_on_startup = true,
	accept_keymap = "<C-M-j>",
	dismiss_keymap = "<C-M-k>",
	tokens_to_clear = {
        "<|endoftext|>",
    },
	fim = {
		enabled = true,
                prefix = "<|fim▁begin|>",
                middle = "<|fim▁hole|>",
                suffix = "<|fim▁end|>"
	},
	backend = "ollama",
	debounce_ms = 0,
	url = "http://localhost:11434/api/generate",
	context_window = 240,
	-- cf https://github.com/ollama/ollama/blob/main/docs/api.md#parameters
	request_body = {
		-- Modelfile options for the model you use
		options = {
			num_predict = 4,
			temperature = 0.2,
			top_p = 0.95,
		},
	},
	lsp = {
		bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "/mason/bin/llm-ls",
	},
	tokenizer = {
                repository = "deepseek-ai/deepseek-vl-1.3b-base", -- not working for some reason
	},
})

I believe it is a problem with how llm-ls handles it, but if I am wrong, I will open an issue on the llm.nvim github

@ytyt-yt
Copy link

ytyt-yt commented Sep 23, 2024

@rhusiev you can try:

prefix = "<|fim▁begin|>",
middle = "<|fim▁end|>",
suffix = "<|fim▁hole|>",

It's working on my end (deepseek-coder-v2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants