I honestly think that if you could have all your private code indexed and accessible, this would be a game changer as it has way better context.
My open questions though are:
- does the tokenizer for the index need to be the same as the one used by the LLM?
- is running a local LLM feasible, or should I just assume prompts must sent over the network? This would affect latency and privacy a lot.
- is fine tuning helpful? Or necessary, even, to ensure the LLM only provides source code, and only in the target language?
Also possible when using the Vim copilot plugin (or its emacs port) which is pretty informative - you can see a lot of the extra tricks the VSCode implementation uses.
Does anybody know if this is already available on Hugging Face or somewhere else?
I'm using TypeScript, so my idea would be to finetune on all used packages, maybe even all of the documentation as well.
I've created a small app where I create a prompt for an eslint error and let ChatGPT come up with a git diff. I manually feed that back to my application, it eslints and compiles and if there are any errors, a new prompt is generated. This works quite well.
GPT-4 is not available for me in the OpenAI API, so it's quite cumbersome.
*The merged model contains the LoRA. Applying the LoRA over a "raw" llama model uses more VRAM and does not allow for full context in 24GB of VRAM.
Github Copilot seems to be the most effective code assistant currently. It seems to use many heuristics for figuring out relevant snippets to include in prompts, like computing Jaccard similarity of windows of the last 20 opened files. It also tries some tree-sitter cleverness for some languages, but when I snoop on the HTTP traffic it seems to almost always just give up and only include the rest of a file as context.
I have wondered whether a model fine-tuned on my own code would do much better, and be simpler. But perhaps building embeddings and searching them (like in the article you linked) would be superior.
Code assistants need to be super low latency though which maybe complicates things too.