Downloads · 30 days
13
57% of all-time downloads
Shankarblr/Llama-3.2-3B-TechWriter-LoRA
Llama-3.2-3B-TechWriter-LoRA is a text generation model from Shankarblr. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.2.
Downloads · 30 days
13
57% of all-time downloads
All-time downloads
23
Public
Repo size
115 MB
Likes
0
Public
Click a slice to open those files.
.safetensors97.3 MB · 85%
From the Hugging Face model README
Built with Llama
This is not a standalone model.
It is the PEFT LoRA adapter trained with QLoRA on meta-llama/Llama-3.2-3B-Instruct for semiconductor / data-center interconnect technical writing.
You must have Hugging Face access to the gated Llama 3.2 3B Instruct base (and a token) to load this adapter. For drop-in inference without the gated base, use the merged repo:
Shankarblr/Llama-3.2-3B-TechWriter-Instruct
Use this repo to resume training, attach the adapter on the frozen 4-bit base, or keep a small artifact.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
BASE = "meta-llama/Llama-3.2-3B-Instruct"
ADAPTER = "Shankarblr/Llama-3.2-3B-TechWriter-LoRA"
tok = AutoTokenizer.from_pretrained(ADAPTER)
if tok.pad_token is None:
tok.pad_token = tok.eos_token
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.float16,
)
base = AutoModelForCausalLM.from_pretrained(BASE, quantization_config=bnb, device_map="auto")
model = PeftModel.from_pretrained(base, ADAPTER)
model.eval()
The tokenizer is Llama 3.2 Instruct. Format prompts with tok.apply_chat_template(...) — not Qwen ChatML.
Merge if you want a single folder like the inference repo:
merged = model.merge_and_unload()
merged.save_pretrained("./llama-techwriter-merged")
tok.save_pretrained("./llama-techwriter-merged")
Same run as the merged card:
q/k/v/o/gate/up/down_projSave-time PEFT warning (401 fetching the gated config.json, “assume vocabulary was not modified”) is expected if the Hub fetch is unauthenticated. Vocab was not modified.
Upload only adapter_config.json, adapter_model.safetensors, tokenizer files, and this README. Leave out checkpoint-* and optimizer states.
Built with Llama
Llama 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
Use must also follow the Llama 3.2 Acceptable Use Policy. Unofficial style model; not affiliated with any semiconductor vendor.