Updated 6 days ago
ollama run enghamzasalem77/pyxon-txt2kg
Updated 6 days ago
6 days ago
093ab1122b34 · 1.6GB ·
First Pyxon / Ollama-published specialist for document → Mermaid knowledge graphs
Built by PYXON.AI · published under enghamzasalem77
Turn Arabic (and multilingual) legal / administrative text into a compact
graph TDMermaid knowledge graph — on-device, offline, via Ollama.
| Pull | ollama run enghamzasalem77/pyxon-txt2kg |
| Hub | ollama.com/enghamzasalem77/pyxon-txt2kg |
| Base | Qwen2.5-Coder-1.5B-Instruct |
| Method | LoRA SFT · teacher = Gemini Mermaid/KG pairs · GGUF q8_0 |
| Size | ~1.6 GB (q8_0) |
| Output | Mermaid graph TD only |
Most small instruct models answer in prose. pyxon-txt2kg is fine-tuned to emit structured knowledge graphs as Mermaid, optimized for:
It sits alongside other Pyxon edge models on the same account: pyxon-sllm-v0, pyxon-minilm-ar.
ollama pull enghamzasalem77/pyxon-txt2kg
ollama run enghamzasalem77/pyxon-txt2kg
Example prompt:
Extract a SMALL knowledge graph as Mermaid only.
First line must be: graph TD
Max 12 nodes, include --> edges, close subgraphs with end.
No JSON, no markdown fences.
### DOCUMENT
رقم القضية ٣٣٤٤/١٠/ق لعام ١٤٣٧ هـ
المدعية: مؤسسة …
المدعى عليها: وزارة التجارة …
المحكمة الإدارية حكمت بعدم الاختصاص الولائي.
Expected shape:
graph TD
subgraph أطراف
P1("المدعية")
P2("وزارة التجارة")
end
Court("المحكمة الإدارية") -->|عدم اختصاص| Case("٣٣٤٤/١٠/ق")
P1 --> Case
P2 --> Case
curl http://localhost:11434/api/chat -d '{
"model": "enghamzasalem77/pyxon-txt2kg",
"stream": false,
"messages": [
{"role": "user", "content": "### DOCUMENT\n...arabic text...\n\nOutput Mermaid graph TD only."}
],
"options": {"temperature": 0.2, "num_ctx": 4096, "num_predict": 384}
}'
txt_to_kg.jsonl (25 Diwan cases; 22 train / 3 holdout).Qwen2.5-Coder-1.5B-Instruct (r=16, α=32, 5 epochs, seq 4096).q8_0 GGUF → Ollama Modelfile (ChatML).See the companion technical report in pyxon-txt-kg/paper/ (LaTeX).
num_ctx 4096).num_predict ≤ 384 and post-validate Mermaid.Apache-2.0 for Pyxon packaging & adapters. Base Qwen weights remain under their upstream license.
Contact: hamzas@pyxon.ai · www.pyxon.ai