Downloads · 30 days
0
jdgomez/TinyLlama
TinyLlama is a machine learning model from jdgomez. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as unknown.
model = "TinyLlama/TinyLlamav1.1" tokenizer = AutoTokenizer.frompretrained(model)
Downloads · 30 days
0
Access
Public
Updated Oct 23, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 61%
From the Hugging Face model README
model = "TinyLlama/TinyLlama_v1.1" tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline( "text-generation", model=model, tokenizer=tokenizer ) prompt = "Explain to me the difference between nuclear fission and fusion." response = pipeline( prompt, max_length=500, truncation = True, do_sample=True, top_k=10, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id, ) print(response[0]['generated_text'])