Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Notes:
The following models from Hugging Face hub are currently supported
- [microsoft/phi-2](https://huggingface.co/microsoft/phi-2)
- [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)
- [microsoft/Phi-3.5-mini-instruct](https://huggingface.co/microsoft/Phi-3.5-mini-instruct)
- [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b)
- [meta-llama/Llama-2-13b-hf](https://huggingface.co/meta-llama/Llama-2-13b)
- [meta-llama/Llama-2-70b-hf](https://huggingface.co/meta-llama/Llama-2-70b)
Expand Down
2 changes: 1 addition & 1 deletion experiments/bo_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def lora_target_map(model: str):
'lm_head',
],
}
case 'microsoft/Phi-3-mini-4k-instruct':
case 'microsoft/Phi-3-mini-4k-instruct' | 'microsoft/Phi-3.5-mini-instruct':
return {
'qkv_proj': ['qkv_proj'],
'attn_head': ['qkv_proj', 'o_proj'],
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"numpy",
"torch",
"tqdm",
"transformers==4.41.0",
"transformers==4.46.3",
]

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/slicegpt/adapters/phi3_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def _from_pretrained(
local_files_only: bool = False,
token: str | bool | None = None,
) -> ModelAdapter | None:
if not model_name.startswith("microsoft/Phi-3-mini-4k-instruct"):
if (not model_name.startswith("microsoft/Phi-3-mini-4k-instruct") and not model_name.startswith("microsoft/Phi-3.5-mini-instruct")):
return None

model = Phi3ForCausalLM.from_pretrained(
Expand Down
Loading