license: apache-2.0
tags:
  - tinyllama
  - causal-lm
  - merged-lora
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
merged_from:
  - snaplora-adapted
---

# TinyLlama (Merged LoRA)

This repository contains a TinyLlama model with LoRA weights merged into the base.

- **Base model:** `TinyLlama/TinyLlama-1.1B-Chat-v1.0`  
- **Adapter:** `snaplora-adapted`  
- **Merge date:** 2025-09-14 23:12:26Z UTC

## Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "<this-repo-id>"
tok = AutoTokenizer.from_pretrained(model_id, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")

prompt = "Write a haiku about tiny models."
inputs = tok(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
    out = model.generate(**inputs, max_new_tokens=64)
print(tok.decode(out[0], skip_special_tokens=True))
```

## Notes

- The adapter was merged into the base weights using `peft.PeftModel.merge_and_unload()`.
- Files are saved with `safetensors` when possible.
Downloads last month
13
Safetensors
Model size
1B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for pharrow/TinyLlama-HTMLWeb-coder

Finetuned
(473)
this model
Quantizations
1 model

Dataset used to train pharrow/TinyLlama-HTMLWeb-coder