Live data from Hacker News

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

github.com

51–60 of 86 posts

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

#52
post #33

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…

Copilot only accesses the private repositories for the user it is authenticated with. I'm fine with them accessing public repositories, as long as they respect the license. Which they probably aren't for private? On a related note, Google apparently treats their free customers in a way where all their data is mixed in for the algorithm, but apparently not the data from accounts who use Google Suite (paid business acc…

> I'm fine with them accessing public repositories, as long as they respect the license.

They don't respect the license.

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

#54
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.

In theory the 2B model should be somewhere in between, whenever it gets fixed.

Assuming that it's just that hardcoded check I should be able to add it today. But if that check is load-bearing (i.e. if it relies on those assumptions elsewhere in the code) it could be a bit more painful.

Edit: sadly, it's not that easy. Removing that check lets the 2B model load, but it produces gibberish. I've opened an issue with FasterTransformer here, and will also try to debug it further myself, but unfortunately it's not obvious how they're using that assumption. https://github.com/NVIDIA/FasterTransformer/issues/268

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

#55
post #5

This is awesome! How is the quality vs. GitHub Copilot for Python or JavaScript?

The largest Python model (codegen-16B-mono) should be pretty competitive! The biggest thing that it lacks is the ability to make use of context after the cursor. Unfortunately, that capability will require retraining the models:

https://arxiv.org/abs/2207.14255

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

#56
post #22

Earlier quoted context omitted.

It might be interesting to look into existing projects like Gitea or SourceHut. Gitea specifically seems to have a similar look and feel as GitHub.

Oof. GitLab is really the only contender to GitHub. Both gitea and sr.ht don’t have search features. So we are really starting from square one here

If you're working with code that fits on a single machine I recommend using ripgrep for brute force search - it's shockingly fast.

I built my own web frontend for it a while back: https://simonwillison.net/2020/Nov/28/datasette-ripgrep/

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

#57
post #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 --learni…

How do I create a dataset?

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

#58

Earlier quoted context omitted.

> 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/

Yeah this is it!

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

#59
post #53
post #48

With model sizes starting at 2GB, wouldn't the model be hopelessly overdetermined for small codebases?

The models aren't customized for individual codebases; all of them were trained on most of GitHub.

Right... thanks for correcting me.

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

#60
post #57
post #50

Earlier quoted context omitted.

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 --learni…

How do I create a dataset?

Have a look at the datasets library [1], but as a shortcut, you can just create a file named "my_code.json" in jsonlines format with one line per source file that looks like:

   {"text": "contents_of_source_file_1"}
   {"text": "contents_of_source_file_2"}
   ...
And then pass that my_code.json as the dataset name.

[1] https://github.com/huggingface/datasets

Post reply on HN