Instructions to use Tree-AI-lab/kouman-edge-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Tree-AI-lab/kouman-edge-1b 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 Tree-AI-lab/kouman-edge-1b:Q4_K_M # Run inference directly in the terminal: llama cli -hf Tree-AI-lab/kouman-edge-1b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Tree-AI-lab/kouman-edge-1b:Q4_K_M # Run inference directly in the terminal: llama cli -hf Tree-AI-lab/kouman-edge-1b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Tree-AI-lab/kouman-edge-1b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Tree-AI-lab/kouman-edge-1b:Q4_K_M
Use Docker
docker model run hf.co/Tree-AI-lab/kouman-edge-1b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Tree-AI-lab/kouman-edge-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tree-AI-lab/kouman-edge-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tree-AI-lab/kouman-edge-1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tree-AI-lab/kouman-edge-1b:Q4_K_M
- Ollama
How to use Tree-AI-lab/kouman-edge-1b with Ollama:
ollama run hf.co/Tree-AI-lab/kouman-edge-1b:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Tree-AI-lab/kouman-edge-1b with Docker Model Runner:
docker model run hf.co/Tree-AI-lab/kouman-edge-1b:Q4_K_M
- Lemonade
How to use Tree-AI-lab/kouman-edge-1b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Tree-AI-lab/kouman-edge-1b:Q4_K_M
Run and chat with the model
lemonade run user.kouman-edge-1b-Q4_K_M
List all available models
lemonade list
- Atomic Chat
🇨🇮📱 Kouman Edge 1B (Tree-AI-lab/kouman-edge-1b)
Kouman Edge 1B est le modèle d'intelligence artificielle mobile & hors-ligne (on-device) développé par Tree AI Lab (Côte d'Ivoire) sur une architecture Llama 3.2 1B (1,24B paramètres). Il comprend, répond et traduit dans 4 langues : Baoulé (bci), Dioula (dyu), Français (fr) et Anglais (en).
Ce dépôt réunit au même endroit :
- Le modèle Instruct 1B complet en
bfloat16(model.safetensors,2,36 Go, natiftransformers/vLLM/Ollama, zérotrust_remote_code), - Toute la gamme GGUF
llama.cppdeQ8_0jusqu'àQ2_K, calibrée avec uneimatrix4 langues (kouman-edge-1b.imatrix) pour préserver la finesse du Baoulé et du Dioula sur smartphone, - Le script d'inférence prêt à l'emploi
inference_kouman_edge_1b.py(compatible GGUF ettransformersBF16).
📊 Performances CPT (~1,70B tokens, 6 488 steps WSD)
| Langue | Base Llama 3.2 1B (PPL) | Kouman Edge 1B CPT (PPL) | Progrès |
|---|---|---|---|
🇨🇮 Baoulé (bci) |
20,74 | 2,90 | -17,84 (÷ 7,2×) |
🇨🇮 Dioula (dyu) |
19,58 | 2,25 | -17,33 (÷ 8,7×) |
🇫🇷 Français (fr) |
9,33 | 4,40 | -4,93 (0 % d'oubli) |
🇬🇧 Anglais (en) |
6,77 | 5,12 | -1,65 (0 % d'oubli) |
- Alignement conversationnel (SFT) : jeu LIMA calibré à 3 000 dialogues propres (
~0,1 %du volume CPT) pour apprendre le dialogue sans mémorisation par cœur ni dégradation des langues.
📦 Fichiers GGUF disponibles (llama.cpp • Q8_0 → Q2_K)
| Fichier GGUF | Quant | Taille | imatrix |
Usage recommandé |
|---|---|---|---|---|
kouman-edge-1b-Q8_0.gguf |
Q8_0 |
1,23 Go | — | Quasi sans perte (desktop / flagship 8+ Go RAM) |
kouman-edge-1b-Q6_K.gguf |
Q6_K |
975 Mo | ✅ | Qualité quasi-BF16, excellent compromis |
kouman-edge-1b-Q5_K_M.gguf |
Q5_K_M |
869 Mo | ✅ | Haute qualité (smartphones haut de gamme / PC) |
kouman-edge-1b-Q5_K_S.gguf |
Q5_K_S |
851 Mo | ✅ | Haute qualité compacte |
kouman-edge-1b-Q4_K_M.gguf |
Q4_K_M |
770 Mo | ✅ | ⭐ Recommandé mobile Android / iOS (quasi zéro perte vs Q8_0) |
kouman-edge-1b-Q4_K_S.gguf |
Q4_K_S |
740 Mo | ✅ | Mobile compact 4 bits |
kouman-edge-1b-Q4_0.gguf |
Q4_0 |
737 Mo | ✅ | Mobile ultra-rapide CPU ARM (NEON / i8mm) |
kouman-edge-1b-Q3_K_M.gguf |
Q3_K_M |
659 Mo | ✅ | Validé smartphones entrée de gamme (4 Go RAM) |
kouman-edge-1b-Q3_K_S.gguf |
Q3_K_S |
612 Mo | ✅ | Très compact 3 bits |
kouman-edge-1b-Q2_K.gguf |
Q2_K |
554 Mo | ✅ | ⚠️ Expérimental 2 bits (dégradation attendue sur 1B — préférer Q3_K_M ou Q4_K_M) |
Conseil de choix (issu de nos benchmarks réels 4 langues) :
Q4_K_M(770 Mo) offre la meilleure expérience mobile avec une fidélité quasi identique auQ8_0en Baoulé, Dioula, Français et Anglais.Q3_K_M(659 Mo) reste très cohérent sur les téléphones à mémoire limitée grâce à la calibrationimatrix4 langues.Q2_K(554 Mo) est fourni à titre expérimental uniquement : à 2 bits sur un modèle de 1 milliard de paramètres, des pertes de suivi de consigne et des hallucinations apparaissent.
🚀 Utilisation rapide
1. Sur téléphone (Android / iOS, 100 % hors-ligne)
Téléchargez kouman-edge-1b-Q4_K_M.gguf (recommandé) ou kouman-edge-1b-Q3_K_M.gguf dans PocketPal AI, ChatterUI ou toute application basée sur llama.cpp.
2. Avec le script officiel inference_kouman_edge_1b.py (GGUF ou BF16)
pip install huggingface_hub llama-cpp-python
# Question rapide avec Q4_K_M (770 Mo)
python inference_kouman_edge_1b.py --question "I ni sɔgɔma !"
# Chat interactif multi-tour (Baoulé, Dioula, Français, Anglais)
python inference_kouman_edge_1b.py --interactif
# Utiliser le modèle Instruct BF16 complet (GPU)
python inference_kouman_edge_1b.py --moteur transformers --question "Bonjour, qui es-tu ?"
3. Directement avec llama.cpp
llama-cli -hf Tree-AI-lab/kouman-edge-1b:Q4_K_M -cnv
4. Directement avec transformers (modèle Instruct BF16)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Tree-AI-lab/kouman-edge-1b"
tok = AutoTokenizer.from_pretrained(repo)
mod = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.bfloat16, device_map="auto")
prompt = tok.apply_chat_template(
[{"role": "user", "content": "I ni sɔgɔma !"}],
tokenize=False,
add_generation_prompt=True,
)
ids = tok(prompt, return_tensors="pt", add_special_tokens=False).to(mod.device)
out = mod.generate(**ids, max_new_tokens=256, temperature=0.35, top_p=0.9, repetition_penalty=1.08)
print(tok.decode(out[0, ids["input_ids"].shape[1]:], skip_special_tokens=True))
- Downloads last month
- 224