πŸ¦™ TinyLlama PEFT Merged

A fully merged, production-ready TinyLlama model fine-tuned with PEFT LoRA


πŸ“Œ Quick Facts

Attribute Value
Model Size 2.2 GB
Parameters 1.1 Billion
Format PyTorch Safetensors
Precision FP16
Context 2048 tokens
Training Framework PEFT + TRL
Inference No PEFT required

πŸš€ Quick Start

from transformers import AutoTokenizer, AutoModelForCausalLM

# One-liner to load
tokenizer = AutoTokenizer.from_pretrained("arif-butt/tinyllama-peft-merged")
model = AutoModelForCausalLM.from_pretrained(
    "arif-butt/tinyllama-peft-merged",
    torch_dtype=torch.float16,
    device_map="auto"
)

# Generate
prompt = "Q: What courses does Arif teach?\nA:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

πŸ“¦ What's Inside
tinyllama-peft-merged/
β”œβ”€β”€ model.safetensors      # 2.2 GB β€” merged weights
β”œβ”€β”€ config.json            # Model architecture
β”œβ”€β”€ generation_config.json # Default generation settings
β”œβ”€β”€ tokenizer.json         # Vocabulary (1.76 MB)
β”œβ”€β”€ tokenizer_config.json  # Tokenizer settings
└── special_tokens_map.json # Special tokens

No adapter files. No PEFT needed. Just load and go.


πŸ”§ Generation Settings
outputs = model.generate(
    **inputs,
    max_new_tokens=150,
    temperature=0.7,
    top_p=0.95,
    do_sample=True,
    repetition_penalty=1.1,
    pad_token_id=tokenizer.eos_token_id,
)


πŸ’¬ Prompt Format
Q: Your question here?
A:
Example:

  Q: What is deep learning?
A: Deep learning is a subset of machine learning...


Q: What is Python?
A: Python is a high-level, interpreted programming language known for its simple, readable syntax. It supports multiple programming paradigms including object-oriented, imperative, and functional programming.

Q: Explain gradient descent
A: Gradient descent is an optimization algorithm used to minimize the loss function in machine learning models. It works by iteratively moving parameters in the direction of the negative gradient.

Q: Name Arif's courses
A: Dr. Muhammad Arif Butt teaches Python Programming, Data Structures & Algorithms, Machine Learning, and Deep Learning courses.

Epoch 1: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘ 0.8
Epoch 2: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 0.4
Epoch 3: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 0.05
Downloads last month
1,951
Safetensors
Model size
1B params
Tensor type
F16
Β·
Inference Providers NEW
Input a message to start chatting with abubakaraabi786/tinyllama-peft-merged.

Model tree for abubakaraabi786/tinyllama-peft-merged

Adapter
(1508)
this model

Dataset used to train abubakaraabi786/tinyllama-peft-merged