Downloads · 30 days
0
nyri/mistral-7b-threads-finetuned
mistral-7b-threads-finetuned is a machine learning model from nyri. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A fine-tuned version of Mistral 7B Instruct v0.3, specialized in writing viral Twitter/X threads with hooks, storytelling, analogies, and CTAs.
Downloads · 30 days
0
Access
Public
Updated Mar 7, 2026
Repo size
336 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 97%
From the Hugging Face model README
A fine-tuned version of Mistral 7B Instruct v0.3, specialized in writing viral Twitter/X threads with hooks, storytelling, analogies, and CTAs.
| Param | Value |
|---|---|
| Dataset | 500 viral Twitter/X thread examples |
| Epochs | 2 |
| Batch size | 1 (gradient accumulation: 8) |
| Learning rate | 2e-4 |
| Optimizer | paged_adamw_8bit |
| Precision | fp16 |
| Max seq length | 512 |
| GPU | NVIDIA T4 16GB (Google Colab free tier) |
| Training time | ~2 hours |
| Cost | $0 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
# Load base model in 4-bit
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
)
base_model = AutoModelForCausalLM.from_pretrained(
"mistralai/Mistral-7B-Instruct-v0.3",
quantization_config=bnb_config,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("nyri/mistral-7b-threads-finetuned")
# Load LoRA adapters
model = PeftModel.from_pretrained(base_model, "nyri/mistral-7b-threads-finetuned")
# Generate
prompt = '<s>[INST] You are an expert at writing viral Twitter/X threads. Write a viral thread about the psychology of pricing. [/INST]'
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=300, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Generating engaging Twitter/X thread drafts. The model produces structured threads (hook → body → CTA) optimized for engagement.