Skip to content

Commit

Permalink
Merge pull request #122 from alan-turing-institute/hf-default
Browse files Browse the repository at this point in the history
Make microsoft/phi-1_5 default hf model
  • Loading branch information
rchan26 authored Sep 28, 2023
2 parents 3d45855 + 3557677 commit ee98c67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MODELS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ reginald_run \
--device auto
```

Note currently the [`microsoft/phi-1_5`](https://huggingface.co/microsoft/phi-1_5) model has a predefined maximum length of 2048 context length. Hence, we must set the `--max-input-size` argument to be less than or equal to 2048 as the default value for this argument is 4096. We also set the `--device` argument to be `auto` so that the model will be run on the GPU if available.
Note currently the [`microsoft/phi-1_5`](https://huggingface.co/microsoft/phi-1_5) model has a predefined maximum length of 2048 context length. Hence, we must set the `--max-input-size` argument to be less than or equal to 2048 as the default value for this argument is 4096 as we tend to use the `llama-cpp-python` model more. We also set the `--device` argument to be `auto` so that the model will be run on any hardware acceleration if available.

## `llama-index` models using an API

Expand Down
2 changes: 1 addition & 1 deletion reginald/models/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"chat-completion-openai": "gpt-3.5-turbo",
"hello": None,
"llama-index-llama-cpp": "https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF/resolve/main/llama-2-13b-chat.Q6_K.gguf",
"llama-index-hf": "StabilityAI/stablelm-tuned-alpha-3b",
"llama-index-hf": "microsoft/phi-1_5",
"llama-index-gpt-azure": "reginald-gpt35-turbo",
"llama-index-gpt-openai": "gpt-3.5-turbo",
}
Expand Down
4 changes: 2 additions & 2 deletions reginald/models/models/llama_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def _prep_llm(self) -> LLM:
class LlamaIndexHF(LlamaIndex):
def __init__(
self,
model_name: str = "StabilityAI/stablelm-tuned-alpha-3b",
model_name: str = "microsoft/phi-1_5",
device: str = "auto",
*args: Any,
**kwargs: Any,
Expand All @@ -632,7 +632,7 @@ def __init__(
----------
model_name : str, optional
Model name from Huggingface's model hub,
by default "StabilityAI/stablelm-tuned-alpha-3b".
by default "microsoft/phi-1_5".
device : str, optional
Device map to use for the LLM, by default "auto".
"""
Expand Down

0 comments on commit ee98c67

Please sign in to comment.