From fd5b9bbfcb7f02bc0d109a5cda80eb0a028cbd5a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 22 Apr 2024 07:12:01 -0700 Subject: [PATCH] Added groq llama3 --- aider/models.py | 8 ++++++++ benchmark/benchmark.py | 2 +- docs/llms.md | 21 +++++++++++++++++---- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/aider/models.py b/aider/models.py index 095f6dd7d..b24f4ec9c 100644 --- a/aider/models.py +++ b/aider/models.py @@ -125,6 +125,14 @@ MODEL_SETTINGS = [ use_repo_map=True, send_undo_reply=True, ), + # Groq llama3 + ModelSettings( + "groq/llama3-70b-8192", + "diff", + weak_model_name="groq/llama3-8b-8192", + use_repo_map=True, + send_undo_reply=True, + ), ] diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index 43f794a4d..4fc8472bc 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -955,7 +955,7 @@ def run_test( chat_history_file=history_fname, ) - main_model = models.Model(model_name) + main_model = models.Model(model_name, require_model_info=False) edit_format = edit_format or main_model.edit_format dump(main_model) diff --git a/docs/llms.md b/docs/llms.md index 6e6320d41..b291632d3 100644 --- a/docs/llms.md +++ b/docs/llms.md @@ -3,10 +3,13 @@ [![connecting to many LLMs](/assets/llms.jpg)](https://aider.chat/assets/llms.jpg) -Aider works best with GPT-4 Turbo and Claude 3 Opus, +Aider works best with [GPT-4 Turbo](#openai) and [Claude 3 Opus](#anthropic), as they are the very best models for editing code. -Aider also works quite well with GPT-3.5. -Cohere offers *free* API access to their Command-R+ model, which works with aider +Aider also works quite well with [GPT-3.5](#openai). + +To use aider with a *free* API provider, you can use [Groq's Llama 3 70B](#llama3) +which is comparable to GPT-3.5 in code editing performance. +Cohere also offers free API access to their [Command-R+ model](#cohere), which works with aider as a *very basic* coding assistant. Aider supports connecting to almost any LLM, @@ -15,10 +18,11 @@ For example, GPT-3.5 is just barely capable of reliably *editing code* to provid interactive "pair programming" style workflow. So you should expect that models which are less capable than GPT-3.5 may struggle to perform well with aider. -## Providers +## Providers & models - [OpenAI](#openai) - [Anthropic](#anthropic) +- [Llama3](#llama3) - [Cohere](#cohere) - [Azure](#azure) - [OpenAI compatible APIs](#openai-compatible-apis) @@ -60,6 +64,15 @@ You can use `aider --model ` to use any other Anthropic model. For example, if you want to use a specific version of Opus you could do `aider --model claude-3-opus-20240229`. +## Llama3 + +Groq offers *free* API access to the Llama 3 70B model, which works +well with aider and is comparable to GPT-3.5 in code editing performance. +You need to provide your Groq API key in the `GROQ_API_KEY` +environment variable. + +- **Llama3 70B**: `aider --model groq/llama3-70b-8192` + ## Cohere Cohere offers *free* API access to their Command-R+ model with reasonably