Views
No views yet
1Model: djuna/Q2.5-Veltha-14B-0.5
2Architecture: Qwen 2.5 14B (merged model)
3Fine-tuning Method: LoRA (Low-Rank Adaptation)
4
5LoRA Configuration:
6 - Rank (r): 32
7 - Alpha: 16
8 - Dropout: 0.05
9 - Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
10 - Trainable Parameters: 137.6M (1.66% of total)
11
12Training Hyperparameters:
13 - Learning Rate: 5e-5 (cosine schedule)
14 - Batch Size: 2 (per device)
15 - Gradient Accumulation: 8 steps
16 - Effective Batch Size: 16
17 - Epochs: 1
18 - Optimizer: AdamW 8-bit
19 - Weight Decay: 0.01
20 - Warmup Ratio: 0.1
21 - Mixed Precision: BF16
22
23Hardware:
24 - GPU: NVIDIA L40S (48GB)
25 - Framework: Unsloth + TRL
26 - Quantization: 4-bit NF4| Test | Words | Quality | Repetition |
|---|---|---|---|
| Fantasy Opening Scene | 541 | ⭐⭐⭐⭐½ | ✅ None |
| Sci-Fi First Contact | 533 | ⭐⭐⭐⭐⭐ | ✅ None |
| Character Development | 507 | ⭐⭐⭐⭐ | ✅ None |
| Long-Form Coherence (1000w) | 753 | ⭐⭐⭐⭐ | ✅ None |
"Master Alaric," whispered Elara as she slipped into the shadows between two towering bookcases, her breath misting in the chill air. The moonlight filtered through stained glass windows, casting eerie patterns across rows upon rows of dusty tomes. She had been ordered not to come here; the Forbidden Archives were off-limits to apprentices like herself.But curiosity was her greatest flaw. When Master Alaric left for his nightly meeting with Lord Reginald, Elara couldn't resist exploring this mysterious part of the library where whispers echoed instead of footsteps...
The Starlight Voyager had sailed the void of space for two hundred years, its passengers living in cramped quarters that smelled of dust and hope. They were a ragged band—scientists, dreamers, criminals—and they'd made it this far by necessity rather than virtue...Colors bled across metal walls, through glass, into skin. Crew members screamed or laughed; some fell to their knees while others stretched out their hands as if embracing light itself...
1from unsloth import FastLanguageModel
2
3# Load model
4model, tokenizer = FastLanguageModel.from_pretrained(
5 model_name="writetoasik/Veltha-14B-StoryCraft-v1",
6 max_seq_length=2048,
7 dtype=None,
8 load_in_4bit=True, # For 24GB VRAM GPUs
9)
10
11# Prepare for inference
12FastLanguageModel.for_inference(model)
13
14# Create a writing prompt
15messages = [
16 {"role": "system", "content": "You are a creative novel writer specializing in fantasy and science fiction. Write engaging, coherent narratives with vivid descriptions and strong plot structure."},
17 {"role": "user", "content": "Write the opening scene of a fantasy novel about a dragon rider who discovers their dragon can speak."}
18]
19
20# Format and generate
21inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
22
23outputs = model.generate(
24 input_ids=inputs,
25 max_new_tokens=800,
26 temperature=0.8,
27 top_p=0.9,
28 do_sample=True,
29 repetition_penalty=1.1,
30)
31
32print(tokenizer.decode(outputs[0], skip_special_tokens=True))1# For longer outputs (up to 2048 tokens)
2outputs = model.generate(
3 input_ids=inputs,
4 max_new_tokens=1500,
5 temperature=0.85, # Higher for more creativity
6 top_p=0.92, # Slightly higher for more diversity
7 top_k=50,
8 do_sample=True,
9 repetition_penalty=1.15, # Stronger penalty if needed
10 no_repeat_ngram_size=3, # Prevent 3-gram repetition
11)1generation_config = {
2 "temperature": 0.8, # Balanced creativity
3 "top_p": 0.9, # Nucleus sampling
4 "repetition_penalty": 1.1, # Gentle repetition prevention
5 "max_new_tokens": 800, # ~600 words
6 "do_sample": True, # Enable sampling
7}| Quantization | VRAM Required | Speed |
|---|---|---|
| 4-bit (NF4) | 10-12GB | ~15 tok/s |
| 8-bit | 18-20GB | ~18 tok/s |
| FP16 | 28-30GB | ~22 tok/s |
1@misc{veltha-storycraft-v1,
2 title={Veltha-14B-StoryCraft-v1: A Fine-Tuned Model for Fantasy and Science Fiction Writing},
3 author={writetoasik},
4 year={2025},
5 publisher={HuggingFace},
6 howpublished={\url{https://huggingface.co/writetoasik/Veltha-14B-StoryCraft-v1}},
7}