From 5fd118f3c9d3d3a932695a3b413d8926d8ad58c0 Mon Sep 17 00:00:00 2001 From: PD <56485898+pratham-darooka@users.noreply.github.com> Date: Fri, 19 Apr 2024 12:57:33 +0530 Subject: Added Meta llama-3 support! (#1856) * Added Meta llama-3 support! Decided to change llama2.py to llama.py to hold all the llama family models. * updated HuggingChat provider * Update FlowGpt.py --- g4f/models.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'g4f/models.py') diff --git a/g4f/models.py b/g4f/models.py index fe99958c..4af1c31e 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -16,7 +16,7 @@ from .Provider import ( GigaChat, Liaobots, FreeGpt, - Llama2, + Llama, Vercel, Gemini, Koala, @@ -117,19 +117,31 @@ gigachat_pro = Model( llama2_7b = Model( name = "meta-llama/Llama-2-7b-chat-hf", base_provider = 'meta', - best_provider = RetryProvider([Llama2, DeepInfra]) + best_provider = RetryProvider([Llama, DeepInfra]) ) llama2_13b = Model( name = "meta-llama/Llama-2-13b-chat-hf", base_provider = 'meta', - best_provider = RetryProvider([Llama2, DeepInfra]) + best_provider = RetryProvider([Llama, DeepInfra]) ) llama2_70b = Model( name = "meta-llama/Llama-2-70b-chat-hf", base_provider = "meta", - best_provider = RetryProvider([Llama2, DeepInfra, HuggingChat]) + best_provider = RetryProvider([Llama, DeepInfra, HuggingChat]) +) + +llama3_8b = Model( + name = "meta-llama/Meta-Llama-3-8b", + base_provider = "meta", + best_provider = RetryProvider([Llama]) +) + +llama3_70b = Model( + name = "meta-llama/Meta-Llama-3-70b", + base_provider = "meta", + best_provider = RetryProvider([Llama, HuggingChat]) ) codellama_34b_instruct = Model( @@ -306,6 +318,8 @@ class ModelUtils: 'llama2-7b' : llama2_7b, 'llama2-13b': llama2_13b, 'llama2-70b': llama2_70b, + 'llama3-8b' : llama3_8b, + 'llama3-70b': llama3_70b, 'codellama-34b-instruct': codellama_34b_instruct, 'codellama-70b-instruct': codellama_70b_instruct, -- cgit v1.2.3