Text Generation
Safetensors
GGUF
English
qwen2
fine-tuned
lora
speech-to-text
text-cleanup
unsloth
conversational
Instructions to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Abdullahu5mani/flowscribe-qwen2.5-0.5b", filename="model_q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M # Run inference directly in the terminal: llama cli -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M # Run inference directly in the terminal: llama cli -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Use Docker
docker model run hf.co/Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Abdullahu5mani/flowscribe-qwen2.5-0.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Abdullahu5mani/flowscribe-qwen2.5-0.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
- Ollama
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with Ollama:
ollama run hf.co/Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
- Unsloth Studio
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Abdullahu5mani/flowscribe-qwen2.5-0.5b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Abdullahu5mani/flowscribe-qwen2.5-0.5b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Abdullahu5mani/flowscribe-qwen2.5-0.5b to start chatting
- Pi
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with Docker Model Runner:
docker model run hf.co/Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
- Lemonade
How to use Abdullahu5mani/flowscribe-qwen2.5-0.5b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Abdullahu5mani/flowscribe-qwen2.5-0.5b:Q4_K_M
Run and chat with the model
lemonade run user.flowscribe-qwen2.5-0.5b-Q4_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
base_model: Qwen/Qwen2.5-0.5B-Instruct
|
| 6 |
+
tags:
|
| 7 |
+
- text-generation
|
| 8 |
+
- fine-tuned
|
| 9 |
+
- lora
|
| 10 |
+
- gguf
|
| 11 |
+
- speech-to-text
|
| 12 |
+
- text-cleanup
|
| 13 |
+
- unsloth
|
| 14 |
+
- qwen2
|
| 15 |
+
pipeline_tag: text-generation
|
| 16 |
+
datasets:
|
| 17 |
+
- Abdullahu5mani/flowscribe-dataset
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# FlowScribe — Qwen2.5-0.5B Speech Transcript Formatter
|
| 21 |
+
|
| 22 |
+
A fine-tuned version of [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) that converts raw, messy speech-to-text output into clean, formatted text across multiple writing styles.
|
| 23 |
+
|
| 24 |
+
**GitHub:** [github.com/Abdullahu5mani/flowscribe](https://github.com/Abdullahu5mani/flowscribe)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## The Problem
|
| 29 |
+
|
| 30 |
+
Voice dictation tools like Whisper produce transcripts full of filler words (`um`, `uh`, `like`), self-corrections (`make it 5... no wait, 6`), and no punctuation or formatting. This model post-processes those transcripts into polished text, with awareness of the desired output style.
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Styles
|
| 35 |
+
|
| 36 |
+
| Style | Behavior |
|
| 37 |
+
|---|---|
|
| 38 |
+
| `Auto` | Intelligent default — removes fillers, fixes grammar, handles self-corrections, applies structure |
|
| 39 |
+
| `Professional` | Formal business tone, structured layout, perfect grammar |
|
| 40 |
+
| `Casual` | Keeps the speaker's voice, light cleanup, contractions preserved |
|
| 41 |
+
| `Verbatim` | Preserves exact wording, only strips `um`/`uh` and applies spoken formatting commands |
|
| 42 |
+
| `Software_Dev` | Formats code terms, variable names (`camelCase`, `snake_case`), technical jargon |
|
| 43 |
+
| `Enthusiastic` | High energy, exclamation marks, positive phrasing |
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## Usage
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 51 |
+
import torch
|
| 52 |
+
|
| 53 |
+
model_id = "Abdullahu5mani/flowscribe-qwen2.5-0.5b"
|
| 54 |
+
|
| 55 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 56 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 57 |
+
model_id,
|
| 58 |
+
torch_dtype=torch.float16,
|
| 59 |
+
device_map="auto"
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
+
def format_transcript(raw_text, style="Auto"):
|
| 63 |
+
messages = [
|
| 64 |
+
{
|
| 65 |
+
"role": "system",
|
| 66 |
+
"content": "You are a helpful assistant that transcribes and formats text based on a specific style instruction."
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"role": "user",
|
| 70 |
+
"content": f"Transcribe and format this with style: {style}\nInput: {raw_text}"
|
| 71 |
+
}
|
| 72 |
+
]
|
| 73 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 74 |
+
inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 75 |
+
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
|
| 76 |
+
output_ids = outputs[0][len(inputs.input_ids[0]):]
|
| 77 |
+
return tokenizer.decode(output_ids, skip_special_tokens=True)
|
| 78 |
+
|
| 79 |
+
# Examples
|
| 80 |
+
print(format_transcript(
|
| 81 |
+
"um so the meeting is at 5... no wait make it 6 and uh we need to discuss the q3 budget",
|
| 82 |
+
style="Professional"
|
| 83 |
+
))
|
| 84 |
+
# → "The meeting is at 6 PM to discuss the Q3 budget."
|
| 85 |
+
|
| 86 |
+
print(format_transcript(
|
| 87 |
+
"the api endpoint is slash api slash users new line it takes a POST request with JSON",
|
| 88 |
+
style="Software_Dev"
|
| 89 |
+
))
|
| 90 |
+
# → "The API endpoint is `/api/users`\nIt takes a POST request with JSON."
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
---
|
| 94 |
+
|
| 95 |
+
## GGUF (Quantized) Usage
|
| 96 |
+
|
| 97 |
+
A Q4_K_M quantized GGUF version is included in this repository for fast CPU/GPU inference via [llama-cpp-python](https://github.com/abetlen/llama-cpp-python).
|
| 98 |
+
|
| 99 |
+
```python
|
| 100 |
+
from llama_cpp import Llama
|
| 101 |
+
|
| 102 |
+
llm = Llama(
|
| 103 |
+
model_path="model_q4_k_m.gguf",
|
| 104 |
+
n_ctx=2048,
|
| 105 |
+
n_gpu_layers=-1, # Set to 0 for CPU-only
|
| 106 |
+
verbose=False
|
| 107 |
+
)
|
| 108 |
+
|
| 109 |
+
response = llm.create_chat_completion(
|
| 110 |
+
messages=[
|
| 111 |
+
{
|
| 112 |
+
"role": "system",
|
| 113 |
+
"content": "You are a helpful assistant that transcribes and formats text based on a specific style instruction."
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"role": "user",
|
| 117 |
+
"content": "Transcribe and format this with style: Casual\nInput: hey um so i was thinking we could like grab lunch tomorrow you know around noon ish"
|
| 118 |
+
}
|
| 119 |
+
],
|
| 120 |
+
max_tokens=256,
|
| 121 |
+
temperature=0.1,
|
| 122 |
+
)
|
| 123 |
+
print(response["choices"][0]["message"]["content"])
|
| 124 |
+
# → "Hey, I was thinking we could grab lunch tomorrow around noon."
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
## Model Details
|
| 130 |
+
|
| 131 |
+
| Property | Value |
|
| 132 |
+
|---|---|
|
| 133 |
+
| Base model | Qwen/Qwen2.5-0.5B-Instruct |
|
| 134 |
+
| Fine-tuning method | LoRA (via [Unsloth](https://github.com/unslothai/unsloth)) |
|
| 135 |
+
| Parameters | ~500M |
|
| 136 |
+
| Training epochs | 3 |
|
| 137 |
+
| Learning rate | 2e-5 |
|
| 138 |
+
| Effective batch size | 16 (batch 2 × grad accumulation 8) |
|
| 139 |
+
| Sequence length | 2048 |
|
| 140 |
+
| Optimizer | AdamW 8-bit |
|
| 141 |
+
| Training hardware | NVIDIA RTX 3060 8GB VRAM |
|
| 142 |
+
| Chat template | ChatML |
|
| 143 |
+
| Quantization | Q4_K_M (via llama.cpp) |
|
| 144 |
+
|
| 145 |
+
---
|
| 146 |
+
|
| 147 |
+
## Training Data
|
| 148 |
+
|
| 149 |
+
Trained on ~19,800 synthetically generated examples from [flowscribe-dataset](https://huggingface.co/datasets/Abdullahu5mani/flowscribe-dataset).
|
| 150 |
+
|
| 151 |
+
Each example is an Alpaca-style JSON object:
|
| 152 |
+
```json
|
| 153 |
+
{
|
| 154 |
+
"instruction": "Transcribe and format this with style: Professional",
|
| 155 |
+
"input": "um so like the uh proposal is due friday and we need to finalize the, i mean confirm the budget",
|
| 156 |
+
"output": "The proposal is due Friday and we need to confirm the budget."
|
| 157 |
+
}
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
Data was generated using Google Gemini (primary) and 16 free OpenRouter models (fallback) across 10 domain scenarios: business email, software dev, personal messages, productivity lists, medical notes, and more.
|
| 161 |
+
|
| 162 |
+
---
|
| 163 |
+
|
| 164 |
+
## Limitations
|
| 165 |
+
|
| 166 |
+
- Optimized for English only
|
| 167 |
+
- Training data is synthetic — real-world dictation edge cases may vary
|
| 168 |
+
- The 0.5B parameter size prioritizes speed and local deployment over raw capability
|
| 169 |
+
- Dataset reached ~19.8K examples (target was 50K); further training on more data would improve robustness
|
| 170 |
+
|
| 171 |
+
---
|
| 172 |
+
|
| 173 |
+
## Files
|
| 174 |
+
|
| 175 |
+
| File | Description |
|
| 176 |
+
|---|---|
|
| 177 |
+
| `model.safetensors` | Full-precision fine-tuned weights |
|
| 178 |
+
| `model_q4_k_m.gguf` | Q4_K_M quantized GGUF for llama.cpp |
|
| 179 |
+
| `config.json` | Model configuration |
|
| 180 |
+
| `tokenizer.json` | Tokenizer |
|
| 181 |
+
| `chat_template.jinja` | ChatML chat template |
|
| 182 |
+
|
| 183 |
+
---
|
| 184 |
+
|
| 185 |
+
## License
|
| 186 |
+
|
| 187 |
+
MIT — see [LICENSE](https://github.com/Abdullahu5mani/flowscribe/blob/main/LICENSE)
|