Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ Answer:
|
|
| 60 |
)
|
| 61 |
|
| 62 |
llm = HuggingFacePipeline.from_model_id(
|
| 63 |
-
model_id="meta-llama/Llama-3.2-1B
|
| 64 |
task="text-generation",
|
| 65 |
pipeline_kwargs=dict(
|
| 66 |
repetition_penalty=1.5,
|
|
@@ -69,7 +69,8 @@ llm = HuggingFacePipeline.from_model_id(
|
|
| 69 |
do_sample=True
|
| 70 |
)
|
| 71 |
)
|
| 72 |
-
llm.pipeline.tokenizer.pad_token_id = llm.pipeline.tokenizer.eos_token_id
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
#replace lines 62 to 73 with 77 to 82 if running with OLlama locally
|
|
|
|
| 60 |
)
|
| 61 |
|
| 62 |
llm = HuggingFacePipeline.from_model_id(
|
| 63 |
+
model_id="meta-llama/Llama-3.2-1B",
|
| 64 |
task="text-generation",
|
| 65 |
pipeline_kwargs=dict(
|
| 66 |
repetition_penalty=1.5,
|
|
|
|
| 69 |
do_sample=True
|
| 70 |
)
|
| 71 |
)
|
| 72 |
+
#llm.pipeline.tokenizer.pad_token_id = llm.pipeline.tokenizer.eos_token_id
|
| 73 |
+
#this was an attempt to circumvent issues loading Llama 3.2 Instruct, however, it seems to have an issue loading so we'll stick to normal Llama 3.2
|
| 74 |
|
| 75 |
|
| 76 |
#replace lines 62 to 73 with 77 to 82 if running with OLlama locally
|