-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from corenting/add_groq_cloud
feat: add groq cloud + llama3 model
- Loading branch information
Showing
15 changed files
with
232 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
"""Constants used in the code.""" | ||
|
||
from roboquote.entities.text_model import TextModel | ||
|
||
FONTS_PATH = "fonts" | ||
|
||
HUGGING_FACE_BASE_API_URL = "https://api-inference.huggingface.co/models/" | ||
|
||
DEFAULT_WEB_TEXT_MODEL = TextModel.MISTRAL_8X7B_INSTRUCT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from dataclasses import dataclass | ||
from enum import Enum | ||
|
||
|
||
class LargeLanguageModelPromptType(Enum): | ||
CONTINUE = "continue" # where the model continues an existing sentence | ||
INSTRUCT = "instruct" # where we instruct the model | ||
|
||
|
||
class LargeLanguageModelAPI(Enum): | ||
GROQ_CLOUD = "GroqCloud" | ||
HUGGING_FACE = "Hugging Face" | ||
|
||
|
||
@dataclass | ||
class LargeLanguageModel: | ||
name: str | ||
prompt_type: LargeLanguageModelPromptType | ||
api: LargeLanguageModelAPI | ||
prompt_start: str | None = None | ||
prompt_end: str | None = None | ||
|
||
|
||
# Ordered by preferred models | ||
AVAILABLE_LARGE_LANGUAGE_MODELS = [ | ||
LargeLanguageModel( | ||
name="llama3-70b-8192", | ||
prompt_type=LargeLanguageModelPromptType.INSTRUCT, | ||
api=LargeLanguageModelAPI.GROQ_CLOUD, | ||
), | ||
LargeLanguageModel( | ||
name="mistralai/Mixtral-8x7B-Instruct-v0.1", | ||
prompt_type=LargeLanguageModelPromptType.INSTRUCT, | ||
api=LargeLanguageModelAPI.HUGGING_FACE, | ||
prompt_start="<s>[[INST]", | ||
prompt_end="[/INST]", | ||
), | ||
LargeLanguageModel( | ||
name="bigscience/bloom", | ||
prompt_type=LargeLanguageModelPromptType.CONTINUE, | ||
api=LargeLanguageModelAPI.HUGGING_FACE, | ||
), | ||
] | ||
|
||
AVAILABLE_LARGE_LANGUAGE_MODELS_NAMES = [ | ||
model.name for model in AVAILABLE_LARGE_LANGUAGE_MODELS | ||
] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.