Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ model_name = "meta-llama/Llama-3.2-1B"
|
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name, token=api_token)
|
17 |
model = AutoModelForCausalLM.from_pretrained(model_name, token=api_token)
|
18 |
|
19 |
-
pipe = pipeline("text-generation", model=
|
20 |
|
21 |
pipe("How are you doing?")
|
22 |
|
|
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name, token=api_token)
|
17 |
model = AutoModelForCausalLM.from_pretrained(model_name, token=api_token)
|
18 |
|
19 |
+
pipe = pipeline("text-generation", model=model_name, torch_dtype=torch.bfloat16, device_map="auto")
|
20 |
|
21 |
pipe("How are you doing?")
|
22 |
|