Spaces:
Sleeping
Sleeping
Commit
·
7f65aed
1
Parent(s):
b943d34
fix: bug
Browse files- requirements.txt +3 -1
- src/streamlit_app.py +2 -0
requirements.txt
CHANGED
|
@@ -4,4 +4,6 @@ streamlit>=1.46.1
|
|
| 4 |
# transformers==4.53.0
|
| 5 |
torch==2.7.0
|
| 6 |
sentence-transformers>=3.0.0
|
| 7 |
-
huggingface_hub>=0.33.1
|
|
|
|
|
|
|
|
|
| 4 |
# transformers==4.53.0
|
| 5 |
torch==2.7.0
|
| 6 |
sentence-transformers>=3.0.0
|
| 7 |
+
huggingface_hub>=0.33.1
|
| 8 |
+
bitsandbytes
|
| 9 |
+
accelerate>=0.26.0
|
src/streamlit_app.py
CHANGED
|
@@ -11,6 +11,7 @@ from transformers import pipeline
|
|
| 11 |
# model_id = "mistralai/Mistral-7B-Instruct-v0.1"
|
| 12 |
# model_id = "meta-llama/Llama-3.2-1B"
|
| 13 |
model_id = "choco-conoz/TwinLlama-3.1-8B"
|
|
|
|
| 14 |
processor = pipeline(
|
| 15 |
"text-generation",
|
| 16 |
model=model_id,
|
|
@@ -20,6 +21,7 @@ processor = pipeline(
|
|
| 20 |
"low_cpu_mem_usage": True,
|
| 21 |
},
|
| 22 |
)
|
|
|
|
| 23 |
terminators = [
|
| 24 |
processor.tokenizer.eos_token_id,
|
| 25 |
processor.tokenizer.convert_tokens_to_ids(""),
|
|
|
|
| 11 |
# model_id = "mistralai/Mistral-7B-Instruct-v0.1"
|
| 12 |
# model_id = "meta-llama/Llama-3.2-1B"
|
| 13 |
model_id = "choco-conoz/TwinLlama-3.1-8B"
|
| 14 |
+
|
| 15 |
processor = pipeline(
|
| 16 |
"text-generation",
|
| 17 |
model=model_id,
|
|
|
|
| 21 |
"low_cpu_mem_usage": True,
|
| 22 |
},
|
| 23 |
)
|
| 24 |
+
|
| 25 |
terminators = [
|
| 26 |
processor.tokenizer.eos_token_id,
|
| 27 |
processor.tokenizer.convert_tokens_to_ids(""),
|