Skip to content

Commit

Permalink
[#128] Add Llama3.1 models and update GPT models (#133)
Browse files Browse the repository at this point in the history
* [#128] Add Llama3.1 models

* update
  • Loading branch information
kangsuhyun-yanolja authored Sep 25, 2024
1 parent fd9a72d commit 9f68c4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 35 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Get Involved: [Discuss and contribute on GitHub](https://github.com/yanolja/aren
TRANSLATIONS_COLLECTION=<your collection> \
OPENAI_API_KEY=<your key> \
ANTHROPIC_API_KEY=<your key> \
MISTRAL_API_KEY=<your key> \
GEMINI_API_KEY=<your key> \
DEEPINFRA_API_KEY=<your key> \
python3 app.py
Expand Down
44 changes: 10 additions & 34 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,45 +142,21 @@ def _get_completion_kwargs(self):
}


class EeveModel(Model):

def _get_completion_kwargs(self):
json_template = {
"type": "object",
"properties": {
"result": {
"type": "string"
}
}
}
return {
"extra_body": {
"guided_json": json.dumps(json_template),
"guided_decoding_backend": "lm-format-enforcer"
}
}


supported_models: List[Model] = [
Model("gpt-4o-2024-05-13"),
Model("gpt-4-turbo-2024-04-09"),
Model("gpt-4-0125-preview"),
Model("gpt-3.5-turbo-0125"),
AnthropicModel("claude-3-opus-20240229"),
AnthropicModel("claude-3-sonnet-20240229"),
AnthropicModel("claude-3-haiku-20240307"),
Model("gpt-4o-2024-08-06"),
Model("gpt-4o-mini-2024-07-18"),
AnthropicModel("claude-3-5-sonnet-20240620"),
VertexModel("gemini-1.5-pro-001",
vertex_credentials=os.getenv("VERTEX_CREDENTIALS")),
Model("mistral-small-2402", provider="mistral"),
Model("mistral-large-2402", provider="mistral"),
Model("meta-llama/Meta-Llama-3-8B-Instruct", provider="deepinfra"),
Model("meta-llama/Meta-Llama-3-70B-Instruct", provider="deepinfra"),
VertexModel("gemini-1.5-flash-preview-0514",
vertex_credentials=os.getenv("VERTEX_CREDENTIALS")),
Model("meta-llama/Meta-Llama-3.1-8B-Instruct", provider="deepinfra"),
Model("meta-llama/Meta-Llama-3.1-70B-Instruct", provider="deepinfra"),
Model("meta-llama/Meta-Llama-3.1-405B-Instruct", provider="deepinfra"),
Model("Qwen/Qwen2.5-72B-Instruct", provider="deepinfra"),
Model("Qwen/Qwen2-72B-Instruct", provider="deepinfra"),
Model("google/gemma-2-9b-it", provider="deepinfra"),
Model("google/gemma-2-27b-it", provider="deepinfra"),
EeveModel("yanolja/EEVE-Korean-Instruct-10.8B-v1.0",
provider="openai",
api_base=os.getenv("EEVE_API_BASE"),
api_key=os.getenv("EEVE_API_KEY")),
]


Expand Down

0 comments on commit 9f68c4f

Please sign in to comment.