Spaces:
Runtime error
Runtime error
chrisociepa
commited on
Commit
•
3659f6f
1
Parent(s):
2325cd3
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from transformers import LlamaForCausalLM, PreTrainedTokenizerFast, pipeline
|
|
6 |
model_name = "Azurro/APT3-1B-Instruct-v1"
|
7 |
|
8 |
tokenizer = PreTrainedTokenizerFast.from_pretrained(model_name)
|
9 |
-
model = LlamaForCausalLM.from_pretrained(model_name, torch_dtype=torch.
|
10 |
|
11 |
def generate_text(prompt, max_length, temperature, top_k, top_p):
|
12 |
prompt = f'<s>[INST] {prompt.strip()} [/INST]'
|
|
|
6 |
model_name = "Azurro/APT3-1B-Instruct-v1"
|
7 |
|
8 |
tokenizer = PreTrainedTokenizerFast.from_pretrained(model_name)
|
9 |
+
model = LlamaForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
|
10 |
|
11 |
def generate_text(prompt, max_length, temperature, top_k, top_p):
|
12 |
prompt = f'<s>[INST] {prompt.strip()} [/INST]'
|