Open rhusiev opened 2 months ago
I am using neovim v0.10.0, llm.nvim latest (1dcf519 commit), llm-ls 0.5.3, by the way
Apparantly, the llm.nvim has some completion (after I manually attach to the buffer), but it is always "\n".
Here is the sent request:
{
backend = "ollama",
contextWindow = 600,
disableUrlPathCompletion = false,
fim = {
enabled = true,
middle = "<|fim_middle|>",
prefix = "<|fim_prefix|>",
suffix = "<|fim_suffix|>"
},
ide = "neovim",
model = "codegemma:2b-code-q4_K_M",
position = {
character = 5,
line = 11
},
requestBody = {
options = {
num_predict = 4,
temperature = 0.2,
top_p = 0.95
}
},
textDocument = {
uri = "file:///.../temp/py.py"
},
tlsSkipVerifyInsecure = false,
tokenizerConfig = {
repository = "google/codegemma-2b"
},
tokensToClear = { "<|endoftext|>", "<|file_separator|>" },
url = "http://localhost:11434/api/generate"
}
And the received:
{
completions = { {
generated_text = "\n"
} },
request_id = "..."
}
It seems that the problem with "\n" had something to do with codegemma, as other models give at least something (which is strange, because codegemma worked previously with the same config). However, there is still the problem of llm.nvim not attaching to the buffer
It seems that the tokenizer does not work or something, as codegemma and deepseek coder base do not work (the ones with custom suffixes, prefixes and tokenizers, not mentioned in the readme). whereas refact (which uses the same suffixes and prefixes as starcoder, which is mentioned in readme) works
Though it is definitely a separate thing from not attaching to the buffer
Some time ago llm.nvim stopped completing anything. I went to the source and added some prints to see, why it does not give ghost text. It turned out that the print "not attached" fired:
I then dug and found the following autocmd in M.setup:
Strangely, the these lines were not run (no prints about attaching). If I change the "BufEnter" to "InsertLeave" those prints work and some requests go to the ollama, as my gpu starts being used (though it still does not show the ghost text for some reason - some other problem)