Downloads · 30 days
6
4% of all-time downloads
syed-aliredha/llama-31-8b-creativity-iti-full
llama-31-8b-creativity-iti-full is a text generation model from syed-aliredha. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
- Correct Training Method: Now extracts activations from complete code solutions (not just prompts) - New Optimal α: 0.1 (previously 0.4) - Efficient Design: Uses only top 11 heads (previously 48) with similar perform…
Downloads · 30 days
6
4% of all-time downloads
All-time downloads
145
Public
Parameters
8B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
| Metric | Previous | Current |
|---|---|---|
| Alpha (α) | 0.4 | 0.1 |
| Active Heads | 48 | 11 |
| Training Method | Prompt-only | Full solutions |
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model with auto-ITI
model = AutoModelForCausalLM.from_pretrained(
"syed-aliredha/llama-31-8b-creativity-iti-full",
trust_remote_code=True, # Enables automatic ITI
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(
"syed-aliredha/llama-31-8b-creativity-iti-full"
)
# Generate creative code (ITI automatically applied with α=0.1)
prompt = "Write a function to check if a number is prime"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.8)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
If you want to adjust parameters locally:
from huggingface_hub import hf_hub_download
import pickle
# Download components
top_heads = pickle.load(open(hf_hub_download(repo_id, "iti_top_heads.pkl", repo_type="model"), 'rb'))
directions = pickle.load(open(hf_hub_download(repo_id, "iti_directions.pkl", repo_type="model"), 'rb'))
# Apply with custom alpha
custom_alpha = 0.2 # Your value
Based on: Li et al., "Inference-Time Intervention: Eliciting Truthful Answers from a Language Model" (NeurIPS 2023)