Downloads · 30 days
16
11% of all-time downloads
prithivMLmods/Pocket-Llama-3.2-3B-Instruct
Pocket-Llama-3.2-3B-Instruct is a text generation model from prithivMLmods. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
16
11% of all-time downloads
All-time downloads
141
Public
Parameters
3.2B
6.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.4 GB · 100%
From the Hugging Face model README

Pocket-Llama-3.2-3B-Instruct is based on the Llama 3.2 architecture, designed as a lightweight and efficient general-purpose chat assistant. Optimized for fast inference while maintaining strong problem-solving, mathematical reasoning, and scientific capabilities. This model is fine-tuned for enhanced structured reasoning, minimal token wastage, and high-quality technical responses.
Here is a code snippet to load the tokenizer and model using apply_chat_template for structured input formatting:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Pocket-Llama-3.2-3B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Explain the theory of relativity in simple terms."
messages = [
{"role": "system", "content": "You are an advanced assistant specialized in science and mathematics."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=6090
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)