mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-20 13:24:27 -07:00
Update README with more info
- Link to the wiki and discussion forums - Add a paragraph mentioning the tokenizer issue with the official Copilot plugin. - Update the OpenAI example to match the current API ("engine" is now "model").
This commit is contained in:
parent
79fa54008b
commit
12d2367a5a
1 changed files with 26 additions and 22 deletions
|
@ -18,6 +18,8 @@ Note that the VRAM requirements listed by `setup.sh` are *total* -- if you have
|
||||||
|
|
||||||
lmao
|
lmao
|
||||||
|
|
||||||
|
Okay, fine, we now have some minimal information on [the wiki](https://github.com/moyix/fauxpilot/wiki) and a [discussion forum](https://github.com/moyix/fauxpilot/discussions) where you can ask questions. Still no formal support or warranty though!
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Run the setup script to choose a model to use. This will download the model from [Huggingface/Moyix](https://huggingface.co/Moyix) in GPT-J format and then convert it for use with FasterTransformer.
|
Run the setup script to choose a model to use. This will download the model from [Huggingface/Moyix](https://huggingface.co/Moyix) in GPT-J format and then convert it for use with FasterTransformer.
|
||||||
|
@ -173,7 +175,7 @@ In [2]: openai.api_key = 'dummy'
|
||||||
|
|
||||||
In [3]: openai.api_base = 'http://127.0.0.1:5000/v1'
|
In [3]: openai.api_base = 'http://127.0.0.1:5000/v1'
|
||||||
|
|
||||||
In [4]: result = openai.Completion.create(engine='codegen', prompt='def hello', max_tokens=16, temperature=0.1, stop=["\n\n"])
|
In [4]: result = openai.Completion.create(model='codegen', prompt='def hello', max_tokens=16, temperature=0.1, stop=["\n\n"])
|
||||||
|
|
||||||
In [5]: result
|
In [5]: result
|
||||||
Out[5]:
|
Out[5]:
|
||||||
|
@ -212,4 +214,6 @@ Perhaps more excitingly, you can configure the official [VSCode Copilot plugin](
|
||||||
|
|
||||||
And you should be able to use Copilot with your own locally hosted suggestions! Of course, probably a lot of stuff is subtly broken. In particular, the probabilities returned by the server are partly fake. Fixing this would require changing FasterTransformer so that it can return log-probabilities for the top k tokens rather that just the chosen token.
|
And you should be able to use Copilot with your own locally hosted suggestions! Of course, probably a lot of stuff is subtly broken. In particular, the probabilities returned by the server are partly fake. Fixing this would require changing FasterTransformer so that it can return log-probabilities for the top k tokens rather that just the chosen token.
|
||||||
|
|
||||||
|
Another issue with using the Copilot plugin is that its tokenizer (the component that turns text into a sequence of integers for the model) is slightly different from the one used by CodeGen, so the plugin will sometimes send a request that is longer than CodeGen can handle. You can work around this by replacing the `vocab.bpe` and `tokenizer.json` found in the Copilot extension (something like `.vscode/extensions/github.copilot-[version]/dist/`) with the ones found [here](https://github.com/moyix/fauxpilot/tree/main/copilot_proxy/cgtok/openai_format).
|
||||||
|
|
||||||
Have fun!
|
Have fun!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue