https://github.com/lappom/meetingqwen
LoRA fine-tuning pipeline to turn meeting transcripts into structured JSON — Qwen3.5-2B, Unsloth, GGUF/Ollama.
https://github.com/lappom/meetingqwen
fine-tuning json qwen
Last synced: 26 days ago
JSON representation
LoRA fine-tuning pipeline to turn meeting transcripts into structured JSON — Qwen3.5-2B, Unsloth, GGUF/Ollama.
- Host: GitHub
- URL: https://github.com/lappom/meetingqwen
- Owner: Lappom
- Created: 2026-06-04T01:23:50.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-06-04T01:50:08.000Z (about 1 month ago)
- Last Synced: 2026-06-04T03:11:11.981Z (about 1 month ago)
- Topics: fine-tuning, json, qwen
- Language: Python
- Homepage:
- Size: 5.44 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MeetingQwen-2B
Fine-tuning pipeline for a lightweight meeting analysis model based on **Qwen3.5-2B** (`unsloth/Qwen3.5-2B`).
**Input:** meeting transcript (optional speaker labels, timestamps)
**Output:** structured JSON (summary, decisions, action items, risks, open questions, next steps)
Target: local inference on consumer hardware, GGUF + Ollama compatible.
## Pipeline
```text
Audio → Faster-Whisper → Transcript → MeetingQwen-2B → JSON → PDF / Markdown / Notion / Jira
```
## Project layout
```text
meetingqwen/
├── data/raw/ # Downloaded corpora
├── data/generated/ # DeepSeek teacher labels
├── data/cleaned/ # Validated samples
├── data/train/ # train.jsonl + val.jsonl
├── scripts/ # Data pipeline
├── training/ # Unsloth train / merge / GGUF
├── notebooks/ # Colab training notebook
└── configs/training.yaml
```
## Setup
```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
copy .env.example .env
# Edit .env — set DEEPSEEK_API_KEY
```
## Phase 1 — Download datasets
```powershell
python scripts/download_datasets.py
```
Sources: QMSum, MeetingBank (Hugging Face). AMI requires manual registration — see `data/raw/ami_README.txt`.
## Phase 2-3 — Generate teacher labels
```powershell
$env:DEEPSEEK_API_KEY = "sk-..."
python scripts/generate_labels.py --limit 100 # test batch
python scripts/generate_labels.py # full run (target: 3000–25000)
```
## Phase 4 — Validate
```powershell
python scripts/validate_dataset.py
```
## Phase 5 — Build SFT dataset
```powershell
python scripts/build_sft_dataset.py
```
Only `data/train/` is needed for fine-tuning (not `data/generated/` or `data/cleaned/`).
### Dataset size targets
| Level | Examples | Use case |
|-------|----------|----------|
| Pipeline test | 100–500 | Verify train → merge → GGUF workflow |
| Minimum | 3,000 | First usable model |
| Recommended | 10,000 | Good quality / cost balance |
| Ideal | 25,000 | Best generalization |
## Phase 6 — Fine-tune (GPU required)
Unsloth requires an **NVIDIA GPU with CUDA**. It does not run on CPU or AMD GPUs (Windows).
### Option A — Google Colab (recommended)
1. Push the repo to GitHub with `data/train/` (use `git add -f` — see `.gitignore`).
2. Open `notebooks/train_colab.ipynb` on Colab (Runtime → T4 GPU).
3. Run all cells: train → merge → export GGUF → download `outputs/`.
### Option B — Local CUDA machine
```powershell
pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
pip install torch transformers trl accelerate bitsandbytes
python training/train_unsloth.py
```
Config: `configs/training.yaml` (LoRA r=16, 3 epochs, seq 32768).
## Phase 7 — Evaluate
```powershell
python scripts/evaluate.py --limit 100
```
Metrics: ROUGE-L, BERTScore, JSON validity rate.
## Phase 8 — Merge LoRA
```powershell
python training/merge_lora.py
```
Output: `outputs/MeetingQwen-2B-merged/`
## Phase 9 — GGUF export
```powershell
python training/export_gguf.py
python training/export_gguf.py --ollama-create
```
Quantizations: Q4_K_M, Q5_K_M, Q8_0 → `outputs/gguf/`
Local inference with Ollama:
```powershell
cd outputs\gguf
ollama create meetingqwen-2b -f Modelfile
ollama run meetingqwen-2b
```
## Phase 10 — Hugging Face release
Upload merged weights, LoRA adapters, GGUF files, model card, and evaluation results to `MeetingQwen-2B`.
## Output schema
```json
{
"executive_summary": "",
"decisions": [],
"action_items": [{ "owner": "", "task": "", "deadline": "" }],
"risks": [],
"open_questions": [],
"next_steps": []
}
```
## Hardware targets
- 8 GB RAM minimum
- CPU inference possible (Q4_K_M GGUF via Ollama)
- Fine-tuning: NVIDIA GPU (Colab T4 or local CUDA)
- Consumer laptops, local-first
## License
Base model: follow Qwen3.5 license. Dataset sources: see respective corpus licenses.