Live data from Hacker News

FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

github.com

41–50 of 86 posts

Re: FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

#41
post #29

Awesome work, I made a similar project which is making a cost effective and privacy focused alternative to OpenAI text generation that can be switched to in a one line/easy way because it's API compatible https://text-generator.io/blog/over-10x-openai-cost-savings-... also works for generating code too so would be excited for someone to try that out too.

Does it work with natural language to sql?

Re: FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

#42

Bravo! I'm so glad this is born. I'm curious about its model, SalesForce CodeGen. Does it train on all the public repos on GitHub? Does Copilot have access to private repos that CodeGen cannot access? Also, it would be really cool if I can personalize FauxPilot by feeding it with all my repos on GitHub. Sometimes I just need to reimplement a function I've written before but it's really hard to find where my old code…

> I just need to reimplement a function I've written before There was a project here some time back that allowed to call function using its hash. This avoided replication. It was entirely different paradigm to resolve dependencies. Anyone remembers its name? It was controversial here but it was interesting nonetheless.

Are you talking about Unison?

https://www.unison-lang.org/learn/the-big-idea/

Re: FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

#43
post #39
post #38

Earlier quoted context omitted.

Is it really that difficult? If I type app.get('/', then looking for literal occurrences and presenting me a menu of all the literal completions I have used before (no ML required at all) would already be a huge win.

Emacs and vim do this out of the box

Vim does not do this "out of the box".

Re: FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

#45
post #8

man I finally got a 3080 and. ow you're telling me I need a second?! haha seriously though, I'm kinda sad the model size is 2GB then straight to 13GB.

You probably don't need physical GPUs but you can rent them in some cloud for a few days.

Re: FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

#46
post #44
post #43

Earlier quoted context omitted.

Vim does not do this "out of the box".

It does it on the "word" level: https://stackoverflow.com/a/52635099/2958070

Yes, I use this a lot.

One problem though is that sometimes I have a sub-folder with lots of (unrelated) files and Vim starts searching it, thereby basically hanging the editor without a possibility to stop the operation.

Re: FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

#47

Bravo! I'm so glad this is born. I'm curious about its model, SalesForce CodeGen. Does it train on all the public repos on GitHub? Does Copilot have access to private repos that CodeGen cannot access? Also, it would be really cool if I can personalize FauxPilot by feeding it with all my repos on GitHub. Sometimes I just need to reimplement a function I've written before but it's really hard to find where my old code…

For you and all my sibling comments here. Are you guys forgetting GitHub IS Microsoft? Do you guys actually believe Microsoft is respecting privacy on repositories? Did you read the EULA after the acquisition? C'mon, let's be serious!

Re: FauxPilot – an attempt to build a locally hosted version of GitHub Copilot

#50

Bravo! I'm so glad this is born. I'm curious about its model, SalesForce CodeGen. Does it train on all the public repos on GitHub? Does Copilot have access to private repos that CodeGen cannot access? Also, it would be really cool if I can personalize FauxPilot by feeding it with all my repos on GitHub. Sometimes I just need to reimplement a function I've written before but it's really hard to find where my old code…

It is possible to fine-tune CodeGen using Huggingface Transformers! Then you'd be able to fine-tune it on your own code and use the resulting model. However, training is more expensive -- you'd need an A6000 or better to train the 6B model. Something like the following should work:

    deepspeed --num_gpus 1 --num_nodes 1 run_clm.py --model_name_or_path=Salesforce/codegen-6B-multi --per_device_train_batch_size=1 --learning_rate 2e-5 --num_train_epochs 1 --output_dir=./codegen-6B-finetuned --dataset_name your_dataset --tokenizer_name Salesforce/codegen-6B-multi --block_size 2048 --gradient_accumulation_steps 32 --do_train --fp16 --overwrite_output_dir --deepspeed ds_config.json
Where run_clm.py is this script: https://github.com/huggingface/transformers/blob/main/exampl...

It might be doable to set this up on an AWS machine with a beefy GPU or two. I haven't tried it yet though.

Once you have a model trained in Huggingface Transformers you'd be able to convert it using this script:

https://github.com/moyix/fauxpilot/blob/main/converter/huggi...

Post reply on HN