New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft llamafile support #7091
base: master
Are you sure you want to change the base?
Draft llamafile support #7091
Conversation
…der for llamafiles. Currently it just extends OpenAIProvider and only overrides methods that are necessary to get the system to work at a basic level. Update ModelProviderName schema and config/configurator so that app startup using this provider is handled correctly. Add 'mistral-7b-instruct-v0' to OpenAIModelName/OPEN_AI_CHAT_MODELS registries.
…-Instruct chat template, which supports the 'user' & 'assistant' roles but does not support the 'system' role.
…kens`, and `get_tokenizer` from classmethods so I can override them in LlamafileProvide (and so I can access instance instance attributes from inside them). Implement class `LlamafileTokenizer` that calls the llamafile server's `/tokenize` API endpoint.
…tes on the integration; add helper scripts for downloading/running a llamafile + example env file.
…gs for reproducibility
…ange serve.sh to use model's full context size (this does not seem to cause OOM errors, surpisingly).
✅ Deploy Preview for auto-gpt-docs canceled.
|
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
@CodiumAI-Agent /review |
PR Review
Code feedback:
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
Background
This draft PR is a step toward enabling the use of local models in AutoGPT by adding llamafile as an LLM provider.
Related issues:
Changes 🏗️
For full documentation of the changes involved in this PR, as well as instructions for running AutoGPT with the llamafile backend, see
autogpts/autogpt/llamafile-integration/README.md
.Summary of changes:
LlamafileProvider
, a newChatModelProvider
for llamafiles. Currently it just extendsOpenAIProvider
and only overrides methods that are necessary to get the system to work at a basic level.mistral-7b-instruct-v0
toOpenAIModelName
/OPEN_AI_CHAT_MODELS
registries. This is the only model currently supported byLlamafileProvider
because this is the only model I tested anything with.LLM_PROVIDER
that, when set to 'llamafile', will useLllamafileProvider
in agents rather thanOpenAIProvider
.Limitations:
PR Quality Scorecard ✨
+2 pts
+5 pts
+5 pts
+5 pts
-4 pts
+4 pts
+5 pts
-5 pts
agbenchmark
to verify that these changes do not regress performance?+10 pts