Spaces:
Sleeping
Sleeping
Update llm.py
Browse files
llm.py
CHANGED
|
@@ -8,7 +8,8 @@ from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
|
|
| 8 |
text_generator = pipeline(
|
| 9 |
"text-generation", # Task type
|
| 10 |
model="google/gemma-3n-e4b-it",
|
| 11 |
-
device="cuda" if torch.cuda.is_available() else "cpu",
|
|
|
|
| 12 |
torch_dtype=torch.bfloat16,
|
| 13 |
max_new_tokens=500 # Limit output length
|
| 14 |
)
|
|
|
|
| 8 |
text_generator = pipeline(
|
| 9 |
"text-generation", # Task type
|
| 10 |
model="google/gemma-3n-e4b-it",
|
| 11 |
+
# device="cuda" if torch.cuda.is_available() else "cpu",
|
| 12 |
+
device= "cpu",,
|
| 13 |
torch_dtype=torch.bfloat16,
|
| 14 |
max_new_tokens=500 # Limit output length
|
| 15 |
)
|