Spaces:
Running
Running
Kang Suhyun
commited on
Commit
•
8d7d881
1
Parent(s):
5352a13
[#128] Add Gemma 2 models (#129)
Browse filesThere have been a request to add support for the Gemma 2 models.
This change adds the Gemma 2 models to the supported models using [deepinfra](https://deepinfra.com/) API.
README.md
CHANGED
@@ -57,6 +57,7 @@ Get Involved: [Discuss and contribute on GitHub](https://github.com/yanolja/aren
|
|
57 |
MISTRAL_API_KEY=<your key> \
|
58 |
GEMINI_API_KEY=<your key> \
|
59 |
GROQ_API_KEY=<your key> \
|
|
|
60 |
python3 app.py
|
61 |
```
|
62 |
|
|
|
57 |
MISTRAL_API_KEY=<your key> \
|
58 |
GEMINI_API_KEY=<your key> \
|
59 |
GROQ_API_KEY=<your key> \
|
60 |
+
DEEPINFRA_API_KEY=<your key> \
|
61 |
python3 app.py
|
62 |
```
|
63 |
|
model.py
CHANGED
@@ -43,7 +43,7 @@ class Model:
|
|
43 |
"system",
|
44 |
"content":
|
45 |
instruction + """
|
46 |
-
Output following this JSON format:
|
47 |
{"result": "your result here"}"""
|
48 |
}, {
|
49 |
"role": "user",
|
@@ -166,6 +166,8 @@ supported_models: List[Model] = [
|
|
166 |
Model("mistral-large-2402", provider="mistral"),
|
167 |
Model("llama3-8b-8192", provider="groq"),
|
168 |
Model("llama3-70b-8192", provider="groq"),
|
|
|
|
|
169 |
EeveModel("yanolja/EEVE-Korean-Instruct-10.8B-v1.0",
|
170 |
provider="openai",
|
171 |
api_base=os.getenv("EEVE_API_BASE"),
|
@@ -177,7 +179,9 @@ def check_models(models: List[Model]):
|
|
177 |
for model in models:
|
178 |
print(f"Checking model {model.name}...")
|
179 |
try:
|
180 |
-
model.completion(
|
|
|
|
|
181 |
print(f"Model {model.name} is available.")
|
182 |
|
183 |
# This check is designed to verify the availability of the models
|
|
|
43 |
"system",
|
44 |
"content":
|
45 |
instruction + """
|
46 |
+
Output following this JSON format without using code blocks:
|
47 |
{"result": "your result here"}"""
|
48 |
}, {
|
49 |
"role": "user",
|
|
|
166 |
Model("mistral-large-2402", provider="mistral"),
|
167 |
Model("llama3-8b-8192", provider="groq"),
|
168 |
Model("llama3-70b-8192", provider="groq"),
|
169 |
+
Model("google/gemma-2-9b-it", provider="deepinfra"),
|
170 |
+
Model("google/gemma-2-27b-it", provider="deepinfra"),
|
171 |
EeveModel("yanolja/EEVE-Korean-Instruct-10.8B-v1.0",
|
172 |
provider="openai",
|
173 |
api_base=os.getenv("EEVE_API_BASE"),
|
|
|
179 |
for model in models:
|
180 |
print(f"Checking model {model.name}...")
|
181 |
try:
|
182 |
+
model.completion(
|
183 |
+
"""Output following this JSON format without using code blocks:
|
184 |
+
{"result": "your result here"}""", "How are you?")
|
185 |
print(f"Model {model.name} is available.")
|
186 |
|
187 |
# This check is designed to verify the availability of the models
|