|
40 | 40 | LLAMA_3_8B_CHAT_FP4 = "llama-3-8b-chat-fp4"
|
41 | 41 | MIXTRAL_8X7B_INSTRUCT = "mixtral-8x7b-instruct"
|
42 | 42 | MIXTRAL_8X7B_INSTRUCT_FP8 = "mixtral-8x7b-instruct-fp8"
|
43 |
| -PHI_2 = "phi-2" |
44 | 43 |
|
45 | 44 |
|
46 | 45 | parser = argparse.ArgumentParser()
|
@@ -183,6 +182,18 @@ def __init__(self, model: str, display_model: Optional[str] = None):
|
183 | 182 | )
|
184 | 183 |
|
185 | 184 |
|
| 185 | +class _MistralLlm(_Llm): |
| 186 | + """See https://docs.mistral.ai/getting-started/models""" |
| 187 | + |
| 188 | + def __init__(self, model: str, display_model: Optional[str] = None): |
| 189 | + super().__init__( |
| 190 | + model, |
| 191 | + "mistral.ai/" + (display_model or model), |
| 192 | + api_key=os.getenv("MISTRAL_API_KEY"), |
| 193 | + base_url="https://api.mistral.ai/v1", |
| 194 | + ) |
| 195 | + |
| 196 | + |
186 | 197 | class _NvidiaLlm(_Llm):
|
187 | 198 | """See https://build.nvidia.com/explore/discover"""
|
188 | 199 |
|
@@ -330,6 +341,9 @@ def _text_models():
|
330 | 341 | _Llm("gemini-pro"),
|
331 | 342 | _Llm(GEMINI_1_5_PRO),
|
332 | 343 | _Llm(GEMINI_1_5_FLASH),
|
| 344 | + # Mistral |
| 345 | + _MistralLlm("mistral-large-latest", "mistral-large"), |
| 346 | + _MistralLlm("open-mistral-nemo", "mistral-nemo"), |
333 | 347 | # Mistral 8x7b
|
334 | 348 | _DatabricksLlm("databricks-mixtral-8x7b-instruct", MIXTRAL_8X7B_INSTRUCT),
|
335 | 349 | _DeepInfraLlm("mistralai/Mixtral-8x7B-Instruct-v0.1", MIXTRAL_8X7B_INSTRUCT),
|
@@ -484,6 +498,7 @@ def _image_models():
|
484 | 498 | _FireworksLlm(
|
485 | 499 | "accounts/fireworks/models/phi-3-vision-128k-instruct", "phi-3-vision"
|
486 | 500 | ),
|
| 501 | + _MistralLlm("pixtral-latest", "pixtral"), |
487 | 502 | ]
|
488 | 503 |
|
489 | 504 |
|
|
0 commit comments