aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/llm.lua
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2023-10-17 00:16:25 -0300
committerElvis Claros Castro <elvis@claros.ar>2023-10-17 00:16:25 -0300
commit5a0f64d67f1981dad243f6d328664139e49ce664 (patch)
treeb4c7a39855c1154298a26979e51c84d7391335e0 /lua/plugins/llm.lua
parent9f7ef8669223eb7cdaf3f580dc8b6a7926807231 (diff)
downloadnvim-conf-5a0f64d67f1981dad243f6d328664139e49ce664.tar.gz
nvim-conf-5a0f64d67f1981dad243f6d328664139e49ce664.zip
commit initial epii
Diffstat (limited to 'lua/plugins/llm.lua')
-rw-r--r--lua/plugins/llm.lua55
1 files changed, 55 insertions, 0 deletions
diff --git a/lua/plugins/llm.lua b/lua/plugins/llm.lua
new file mode 100644
index 0000000..8a71fb6
--- /dev/null
+++ b/lua/plugins/llm.lua
@@ -0,0 +1,55 @@
+return {
+ 'huggingface/llm.nvim',
+ config = function()
+ require('hfcc').setup({
+ api_token = "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", -- cf Install paragraph
+ -- parameters that are added to the request body
+ query_params = {
+ max_new_tokens = 60,
+ temperature = 0.2,
+ top_p = 0.95,
+ -- stop_token = "<|endoftext|>",
+ -- stop_token = nil,
+ stop_token = "<EOT>",
+ },
+ -- lsp = {
+ -- enabled = false,
+ -- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "/mason/bin/llm-ls",
+ -- },
+ debounce_ms = 80,
+ accept_keymap = "<M-Right>",
+ dismiss_keymap = "<S-Tab>",
+ max_context_after = 50,
+ max_context_before = 50,
+ tls_skip_verify_insecure = false,
+
+ enable_suggestions_on_startup = true,
+ enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
+ -- model = "bigcode/starcoder", -- can be a model ID or an http(s) endpoint
+ -- context_window = 8192,
+ -- tokens_to_clear = { "<|endoftext|>" },
+ -- tokenizer = {
+ -- path = "~/.config/tokenizer/starcoder/tokenizer.json"
+ -- },
+ -- -- set this if the model supports fill in the middle
+ -- fim = {
+ -- enabled = true,
+ -- prefix = "<fim_prefix>",
+ -- middle = "<fim_middle>",
+ -- suffix = "<fim_suffix>",
+ -- },
+ model = "codellama/CodeLlama-7b-hf",
+ context_window = 4096,
+ -- tokens_to_clear = { "<EOT>" },
+ -- tokenizer = {
+ -- path = "~/.config/tokenizer/codellama/tokenizer.json",
+ -- },
+ fim = {
+ enabled = true,
+ prefix = "<PRE> ",
+ middle = " <MID>",
+ suffix = " <SUF>",
+ },
+ })
+ end
+}