Prompt template : chatml
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
model = "aloobun/falcon-1b-test1-lima-elmv3"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.bfloat16,
device_map="auto",
)
sequences = pipeline(
"<|im_start|>user\nDoes P=NP?<|im_end|>\n<|im_start|>assistant\n",
max_length=256,
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")
- Downloads last month
- 25
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.