Downloads · 30 days
2
2% of all-time downloads
JordyBach/ft-llm-storytelling-lora
ft-llm-storytelling-lora is a text generation model from JordyBach. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapters for Qwen 2.5 7B Instruct, fine-tuned to generate immersive YouTube storytelling scripts in French and English (style EGO, Feldup, Lemmino, Squeezie…).
Downloads · 30 days
2
2% of all-time downloads
All-time downloads
92
Public
Repo size
173 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 93%
From the Hugging Face model README
LoRA adapters for Qwen 2.5 7B Instruct, fine-tuned to generate immersive YouTube storytelling scripts in French and English (style EGO, Feldup, Lemmino, Squeezie…).
Learning project — exploring LLM fine-tuning via QLoRA and Unsloth end-to-end.
Full pipeline and code: github.com/JordyBacherot/FineTunning_LLM_StoryTelling
unsloth/Qwen2.5-7B-Instruct-bnb-4bit273 examples built from transcripts of 20 YouTube channels known for storytelling quality:
Pipeline: yt-dlp extraction → Ollama cleaning (Scribe Fidèle, style-preserving) → Groq reverse prompting → ChatML format with 3 persona levels (base / archetype / youtuber-specific).
| Parameter | Value |
|---|---|
| Method | QLoRA 4-bit (SFTTrainer) |
LoRA rank r | 16 |
| LoRA alpha | 32 |
| Target modules | q, k, v, o, gate, up, down proj |
| Learning rate | 2e-5 |
| Epochs | 3 (early stopping patience=2) |
| Batch size | 1 (gradient accumulation ×16) |
| Max sequence length | 16 384 |
| Training regime | bf16 |
| Hardware | RTX 5060 Ti 16 GB (Blackwell, CUDA 13.0) |
| Training time | ~41 min |
Best checkpoint: epoch 3 — val_loss = 2.3515
| Metric | Value | Threshold | Status |
|---|---|---|---|
| LLM-as-Judge (/25) | 18.8 | ≥ 15 | ✅ |
| Catastrophic forgetting | 0 / 12 degraded | ≤ 3 | ✅ |
| Vanilla baseline | 19.8 / 25 | — | reference |
Judge: Llama 3.3 70B via Groq — 5 criteria: accroche, tension narrative, rétention, naturel du style, fidélité style.
The vanilla baseline scores slightly higher on the automated judge, which tends to favor generic fluent prose. The fine-tuned model has acquired YouTube storytelling characteristics (energy, narrative tension, direct address) that the LLM judge partially penalizes.
Known limitations:
repetition_penalty: 1.3)ego_one)These are LoRA adapters — not a standalone model. You must merge them with the base model before serving with vLLM.
import torch, gc
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-7B-Instruct", dtype=torch.bfloat16, device_map="cpu"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
model = PeftModel.from_pretrained(base, "JordyBach/ft-llm-storytelling-lora")
model = model.merge_and_unload()
gc.collect()
model.save_pretrained("merged_model", max_shard_size="2GB")
tokenizer.save_pretrained("merged_model")
system_prompt = "Tu es un narrateur-storyteller YouTube..." # or channel-specific persona
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "[LANG:FR]\nTon sujet ici"},
]
The
[LANG:FR]/[LANG:EN]prefix in the user message is critical — it was present in all training examples.
python -m vllm.entrypoints.openai.api_server \
--model merged_model \
--quantization bitsandbytes \
--load-format bitsandbytes \
--max-model-len 16000 \
--enforce-eager
Recommended inference params: repetition_penalty=1.3, stop=["---", "\n#", "**Note"]