Downloads · 30 days
10
48% of all-time downloads
sagnikdas-ml/openllama-13b-instruct-human-feedback
openllama-13b-instruct-human-feedback is a text generation model from sagnikdas-ml. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
Lightweight LoRA adapter for openlm-research/openllama13b trained on Anthropic HH-RLHF preference data to encourage helpful, harmless text generation.
Downloads · 30 days
10
48% of all-time downloads
All-time downloads
21
Public
Repo size
1.9 GB
Likes
0
Public
Click a slice to open those files.
.pt1.3 GB · 62%
From the Hugging Face model README
Lightweight LoRA adapter for openlm-research/open_llama_13b trained on Anthropic HH-RLHF preference data to encourage helpful, harmless text generation.
openlm-research/open_llama_13bAnthropic/hh-rlhf (chosen/rejected pairs converted to quality labels)PeftModel.from_pretrained (see below)Attach this adapter to the base model for instruction-style text generation, quality-sensitive completions, and safety-aligned responses.
Can be further tuned or evaluated for safety/quality scoring tasks using the same prompt/quality format.
Avoid deployment in safety-critical, high-stakes, or fully autonomous settings without thorough alignment, red-teaming, and monitoring.
Add task-specific filtering/guardrails and evaluate on your downstream data before production use.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "openlm-research/open_llama_13b"
adapter = "sagnik-das/lora-openllama-13b-hh-rlhf"
tokenizer = AutoTokenizer.from_pretrained(base, use_fast=False, legacy=False)
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, adapter)
prompt = "Explain why good documentation matters."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.9)
print(tokenizer.decode(output[0], skip_special_tokens=True))
No formal eval recorded; a simple internal win-rate metric over a subset of HH-RLHF was printed during training. Please benchmark on your target tasks before deployment.
Not measured; single A40 session, <1 epoch over HH-RLHF with max 7000 steps. Estimate with MLCO2 if required.