Instructions to use ali-thowfeek/Charty-1B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ali-thowfeek/Charty-1B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ali-thowfeek/Charty-1B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ali-thowfeek/Charty-1B-GGUF") model = AutoModelForCausalLM.from_pretrained("ali-thowfeek/Charty-1B-GGUF", device_map="auto") - llama-cpp-python
How to use ali-thowfeek/Charty-1B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ali-thowfeek/Charty-1B-GGUF", filename="Chart-1B-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ali-thowfeek/Charty-1B-GGUF 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 ali-thowfeek/Charty-1B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ali-thowfeek/Charty-1B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ali-thowfeek/Charty-1B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ali-thowfeek/Charty-1B-GGUF: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 ali-thowfeek/Charty-1B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ali-thowfeek/Charty-1B-GGUF: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 ali-thowfeek/Charty-1B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ali-thowfeek/Charty-1B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ali-thowfeek/Charty-1B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ali-thowfeek/Charty-1B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ali-thowfeek/Charty-1B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ali-thowfeek/Charty-1B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ali-thowfeek/Charty-1B-GGUF:Q4_K_M
- SGLang
How to use ali-thowfeek/Charty-1B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ali-thowfeek/Charty-1B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ali-thowfeek/Charty-1B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ali-thowfeek/Charty-1B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ali-thowfeek/Charty-1B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use ali-thowfeek/Charty-1B-GGUF with Ollama:
ollama run hf.co/ali-thowfeek/Charty-1B-GGUF:Q4_K_M
- Unsloth Studio
How to use ali-thowfeek/Charty-1B-GGUF 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 ali-thowfeek/Charty-1B-GGUF 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 ali-thowfeek/Charty-1B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ali-thowfeek/Charty-1B-GGUF to start chatting
- Pi
How to use ali-thowfeek/Charty-1B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ali-thowfeek/Charty-1B-GGUF: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": "ali-thowfeek/Charty-1B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ali-thowfeek/Charty-1B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ali-thowfeek/Charty-1B-GGUF: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 ali-thowfeek/Charty-1B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use ali-thowfeek/Charty-1B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ali-thowfeek/Charty-1B-GGUF: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 "ali-thowfeek/Charty-1B-GGUF: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 ali-thowfeek/Charty-1B-GGUF with Docker Model Runner:
docker model run hf.co/ali-thowfeek/Charty-1B-GGUF:Q4_K_M
- Lemonade
How to use ali-thowfeek/Charty-1B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ali-thowfeek/Charty-1B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Charty-1B-GGUF-Q4_K_M
List all available models
lemonade list
Charty-1B — GGUF
Quantized GGUF versions of Charty-1B, a compact text-to-Mermaid diagram generation model fine-tuned from LFM2.5-1.2B-Instruct. Designed for on-device, mobile, and CPU-only inference.
For the original 16-bit safetensors, see ali-thowfeek/Charty-1B.
📦 Available Quantizations
| File | Quantization | Size (approx.) | Quality | Best For |
|---|---|---|---|---|
Charty-1B-F16.gguf |
F16 (full) | ~2.3 GB | ★★★★★ Maximum | GPU inference, maximum fidelity |
Charty-1B-Q8_0.gguf |
Q8_0 | ~1.2 GB | ★★★★☆ Near-lossless | Balanced CPU / edge deployment |
Charty-1B-Q4_K_M.gguf |
Q4_K_M | ~0.7 GB | ★★★☆☆ Good | Mobile phones, low-RAM devices |
🗒️ Model Details
| Field | Value |
|---|---|
| Base model | unsloth/LFM2.5-1.2B-Instruct |
| Architecture | LFM2 (hybrid: 10 double-gated LIV convolution blocks + 6 GQA attention blocks) |
| Parameters | 1.17B |
| Context length | 32,768 tokens |
| Vocabulary size | 65,536 |
| Fine-tuning method | LoRA (SFT) via Unsloth + Hugging Face TRL |
| Training dataset | ali-thowfeek/text-to-mermaid (3,837 examples) |
| Developed by | ali-thowfeek |
💬 Chat Template (Unsloth's Fixed Template)
This model ships with Unsloth's fixed Jinja chat template embedded in the GGUF versions and is applied automatically by llama.cpp with --jinja.
🎯 Intended Use
Generate Mermaid diagram syntax (flowcharts, sequence, class, state, ER, Gantt, pie, git graphs, mindmaps, quadrant charts, …) from plain-text prompts. Run on low-end hardware: mobile phones, edge devices, laptops, embedded systems. Power apps that need offline, private, diagram-as-code generation.
What it does
Input (user prompt):
Create a flowchart showing the user login process with MFA verification.
Output (model response):
graph TD
A[User Visits Login Page] --> B[Enter Credentials]
B --> C{Credentials Valid?}
C -->|No| D[Show Error Message]
D --> B
C -->|Yes| E[Send MFA Code]
E --> F[Enter MFA Code]
F --> G{MFA Valid?}
G -->|No| H[Show MFA Error]
H --> F
G -->|Yes| I[Grant Access]
The model outputs only the Mermaid syntax code. No wrapping text, no mermaid fences.
🏃 Inference
Recommended Generation Parameters
| Parameter | Value |
|---|---|
| temperature | 0.1 |
| top_k | 50 |
| top_p | 0.1 |
| repetition_penalty | 1.05 |
📊 Training Details
| Detail | Value |
|---|---|
| Framework | Unsloth + Hugging Face TRL |
| Method | LoRA Supervised Fine-Tuning (SFT), merged into full weights |
| Dataset | ali-thowfeek/text-to-mermaid |
| Dataset size | 3,837 examples |
| Dataset source | Derived from Celiadraw/text-to-mermaid-2, cleaned, reworded, and validated against Mermaid v11 (core) |
| Validation | 100% of training examples produce valid Mermaid v11 core syntax |
| Output format | Raw Mermaid syntax only (no markdown fences, no explanations) |
📜 License
This model is a derivative work of LFM2.5-1.2B-Instruct by Liquid AI and is released under the LFM Open License v1.0.
Key terms:
- ✅ Free for research, personal, and non-commercial use.
- ✅ Commercial use permitted for entities with < $10M annual revenue.
- ❌ Commercial use by entities with ≥ $10M annual revenue is not licensed.
- You must include a copy of the LICENSE with any redistribution.
- You must retain all copyright and attribution notices.
See the full LICENSE file in this repository for complete terms.
📚 Citation
If you use this model, please cite the base model and this work:
@article{liquidai2025lfm2,
title = {LFM2 Technical Report},
author = {Liquid AI},
journal = {arXiv preprint arXiv:2511.23404},
year = {2025}
}
@misc{thowfeek2026charty,
title = {Charty-1B: A Text-to-Mermaid Diagram Generation Model},
author = {ali-thowfeek},
year = {2026},
url = {https://huggingface.co/ali-thowfeek/Charty-1B}
}
🙏 Acknowledgements
- Liquid AI — LFM2.5 base model
- Unsloth — 2× faster fine-tuning framework
- Celiadraw — Original text-to-mermaid dataset source
- Hugging Face — TRL library and model hosting
- Downloads last month
- -
4-bit
8-bit
16-bit
Model tree for ali-thowfeek/Charty-1B-GGUF
Base model
LiquidAI/LFM2.5-1.2B-Base