Instructions to use sandeshrajx/MiniMax-H3-Prompt-Rewriter-LoRA-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sandeshrajx/MiniMax-H3-Prompt-Rewriter-LoRA-gguf with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
MiniMax-H3 Prompt Enhancer & Rewriter (GGUF)
Local multimodal prompt enhancer for MiniMax-H3 joint audio-video generation, running via llama-server and llama.cpp.
This repository documents the deployment, conversion, analysis, and usage of the lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA adapter converted to GGUF format and loaded onto a Qwen3.6-27B GGUF base model.
π Quick Links
- Hugging Face GGUF Repo: sandeshrajx/MiniMax-H3-Prompt-Rewriter-LoRA-gguf
- Prompt Samples:
samples.md - Analysis Document:
analysis.md - Output Comparison Table:
table.md
π Server Launch Command
To launch llama-server with GPU offloading, Flash Attention, Jinja chat template support, and the Q8_0 GGUF LoRA adapter:
llama-server -m "D:\gguf_models\Qwen3.6-27B-Q3_K_S.gguf" `
--no-mmap `
--n-gpu-layers 99 `
--flash-attn auto `
--jinja `
-np 1 `
-c 16000 `
--temp 0.7 `
--min-p 0.0 `
--top-k 15 `
--top-p 0.95 `
--chat-template-kwargs "{\"enable_thinking\":true}" `
--lora "F:\code-hdd\MiniMax-H3-Prompt-Rewriter-LoRA-Q8_0.gguf" `
-ctk q8_0
π System Prompt
Send this system prompt as messages[0] in your OpenAI API request:
You are a professional prompt rewriter for joint audio-video generation.
Rewrite the user's original prompt into one coherent, production-ready multimodal description for the requested output aspect ratio and duration.
Return only these three fields, in this exact order:
integrated_multimodal_description: ...
overall_soundscape: ...
non_diegetic_music: ...
Requirements:
- Expand the visual narrative into clearly numbered shots such as [Shot 1], [Shot 2], and include timestamps for cuts after the first shot when useful.
- Make the number, timing, and pacing of shots appropriate for the requested duration.
- Compose the scene for the requested aspect ratio.
- Preserve the user's intent while adding concrete subjects, appearance, environment, lighting, composition, camera movement, physical motion, and temporal continuity.
- Keep characters, objects, wardrobe, locations, and spatial relationships consistent across shots.
- Describe synchronized diegetic audio in overall_soundscape and external score in non_diegetic_music.
- Do not add explanations, Markdown fences, safety commentary, or fields other than the three requested fields.
User Input Structure
Format messages[1] content as:
resolution: <ASPECT_RATIO>
duration: <DURATION_SECONDS>s
original_prompt: <YOUR_PROMPT>
π Analysis: Behavior With vs. Without LoRA
| Feature / Behavior | Base Model Only (Qwen3.6-27B) |
With LoRA Adapter (MiniMax-H3 LoRA Q8_0) |
|---|---|---|
Thinking Loop (<think>) |
β οΈ Active (1,000+ thinking tokens) Generates extensive internal step-by-step reasoning in reasoning_content before producing output. |
β‘ Bypassed / Instant The fine-tuned LoRA weights suppress the thinking loop and immediately begin writing the target fields. |
| Response Latency | Slow (~35+ seconds) Requires a large token budget (1500+) just to complete thinking. |
π Fast (~3-5 seconds) 5x to 10x faster response time. |
| Schema Compliance | May cut off during thinking if max_tokens is under 1000. |
β 100% strict compliance with the 3 required fields from token 0. |
| Output Style | Paragraph-style general explanations during drafting. | Production-ready shot breakdown ([Shot 1], [Shot 2] At 00:05.500, SFX, score). |
π οΈ Python Integration Example
import urllib.request
import json
url = "http://localhost:8080/v1/chat/completions"
system_prompt = """You are a professional prompt rewriter for joint audio-video generation.
Rewrite the user's original prompt into one coherent, production-ready multimodal description for the requested output aspect ratio and duration.
Return only these three fields, in this exact order:
integrated_multimodal_description: ...
overall_soundscape: ...
non_diegetic_music: ...
Requirements:
- Expand the visual narrative into clearly numbered shots such as [Shot 1], [Shot 2], and include timestamps for cuts after the first shot when useful.
- Make the number, timing, and pacing of shots appropriate for the requested duration.
- Compose the scene for the requested aspect ratio.
- Preserve the user's intent while adding concrete subjects, appearance, environment, lighting, composition, camera movement, physical motion, and temporal continuity.
- Keep characters, objects, wardrobe, locations, and spatial relationships consistent across shots.
- Describe synchronized diegetic audio in overall_soundscape and external score in non_diegetic_music.
- Do not add explanations, Markdown fences, safety commentary, or fields other than the three requested fields."""
payload = {
"messages": [
{"role": "system", "content": system_prompt},
{
"role": "user",
"content": "resolution: 16:9\nduration: 10s\noriginal_prompt: A futuristic cyberpunk city at night with flying cars, neon lights, and light rain."
}
],
"temperature": 0.7,
"top_p": 0.8,
"max_tokens": 1024
}
req = urllib.request.Request(url, data=json.dumps(payload).encode("utf-8"), headers={"Content-Type": "application/json"})
with urllib.request.urlopen(req) as resp:
res = json.loads(resp.read().decode("utf-8"))
print(res["choices"][0]["message"]["content"])
- Downloads last month
- -
Hardware compatibility
Log In to add your hardware
8-bit
Model tree for sandeshrajx/MiniMax-H3-Prompt-Rewriter-LoRA-gguf
Base model
Qwen/Qwen3.6-27B