Downloads · 30 days
4
12% of all-time downloads
imdatta0/spt
spt is a machine learning model from imdatta0. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
NanoLlama is a compact language model trained on Sherlock Holmes stories.
Downloads · 30 days
4
12% of all-time downloads
All-time downloads
33
Public
Parameters
97.7M
391 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors391 MB · 100%
From the Hugging Face model README
NanoLlama is a compact language model trained on Sherlock Holmes stories.
You can use this model with the Hugging Face Transformers library:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("imdatta0/spt")
model = AutoModelForCausalLM.from_pretrained("imdatta0/spt")
# Generate text
input_text = "Sherlock and I were "
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
output = model.generate(input_ids, max_length=50, num_return_sequences=1)
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
This model was trained on Sherlock Holmes' stories on a single A100 with a batch size of 2 and gradient accumulation steps of 32 effective batch size of 64. It was trained on 1024 length character sequences for 10000 steps.