pharrow/TinyLlama-HTMLWeb-coder
014
1---2datasets:3- Tesslate/UIGEN-T24base_model:5- TinyLlama/TinyLlama-1.1B-Chat-v1.06---7---8 license: apache-2.09 tags:10 - tinyllama11 - causal-lm12 - merged-lora13 base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.014 merged_from:15 - snaplora-adapted16 ---17 18 # TinyLlama (Merged LoRA)19 20 This repository contains a TinyLlama model with LoRA weights merged into the base.21 22 - **Base model:** `TinyLlama/TinyLlama-1.1B-Chat-v1.0` 23 - **Adapter:** `snaplora-adapted` 24 - **Merge date:** 2025-09-14 23:12:26Z UTC25 26 ## Usage27 28 ```python29 from transformers import AutoModelForCausalLM, AutoTokenizer30 import torch31 32 model_id = "<this-repo-id>"33 tok = AutoTokenizer.from_pretrained(model_id, use_fast=True)34 model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")35 36 prompt = "Write a haiku about tiny models."37 inputs = tok(prompt, return_tensors="pt").to(model.device)38 with torch.no_grad():39 out = model.generate(**inputs, max_new_tokens=64)40 print(tok.decode(out[0], skip_special_tokens=True))41 ```42 43 ## Notes44 45 - The adapter was merged into the base weights using `peft.PeftModel.merge_and_unload()`.46 - Files are saved with `safetensors` when possible.