Text Generation
GGUF
PEFT
French
English
llama.cpp
code
php
html
css
sql
javascript
lora
cpu
webcoder
conversational
Instructions to use kanaton/webcoder-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kanaton/webcoder-3b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kanaton/webcoder-3b 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 kanaton/webcoder-3b:Q8_0 # Run inference directly in the terminal: llama cli -hf kanaton/webcoder-3b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kanaton/webcoder-3b:Q8_0 # Run inference directly in the terminal: llama cli -hf kanaton/webcoder-3b:Q8_0
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 kanaton/webcoder-3b:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf kanaton/webcoder-3b:Q8_0
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 kanaton/webcoder-3b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf kanaton/webcoder-3b:Q8_0
Use Docker
docker model run hf.co/kanaton/webcoder-3b:Q8_0
- LM Studio
- Jan
- vLLM
How to use kanaton/webcoder-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kanaton/webcoder-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kanaton/webcoder-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kanaton/webcoder-3b:Q8_0
- Ollama
How to use kanaton/webcoder-3b with Ollama:
ollama run hf.co/kanaton/webcoder-3b:Q8_0
- Unsloth Desktop
- Pi
How to use kanaton/webcoder-3b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kanaton/webcoder-3b:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "kanaton/webcoder-3b:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use kanaton/webcoder-3b with Docker Model Runner:
docker model run hf.co/kanaton/webcoder-3b:Q8_0
- Lemonade
How to use kanaton/webcoder-3b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kanaton/webcoder-3b:Q8_0
Run and chat with the model
lemonade run user.webcoder-3b-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use kanaton/webcoder-3b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kanaton/webcoder-3b:Q8_0
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 kanaton/webcoder-3b:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use kanaton/webcoder-3b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kanaton/webcoder-3b:Q8_0
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 "kanaton/webcoder-3b:Q8_0" \ --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"
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- fr
|
| 4 |
+
- en
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
library_name: llama.cpp
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
base_model: Qwen/Qwen2.5-Coder-3B-Instruct
|
| 9 |
+
tags:
|
| 10 |
+
- code
|
| 11 |
+
- php
|
| 12 |
+
- html
|
| 13 |
+
- css
|
| 14 |
+
- sql
|
| 15 |
+
- javascript
|
| 16 |
+
- gguf
|
| 17 |
+
- llama.cpp
|
| 18 |
+
- lora
|
| 19 |
+
- peft
|
| 20 |
+
- cpu
|
| 21 |
+
- webcoder
|
| 22 |
+
- fr
|
| 23 |
+
model_name: webcoder-3b
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# WebCoder 3B (webcoder-3b)
|
| 27 |
+
|
| 28 |
+
Assistant local de **développement Web** (PHP, HTML, CSS, SQL, JavaScript), adapté par LoRA,
|
| 29 |
+
fusionné puis quantifié en GGUF. Conçu pour tourner **sur CPU, sans GPU**.
|
| 30 |
+
|
| 31 |
+
- **Auteur / identité** : **WebCoder**, créé par **Pierre Jean Duvivier** (l'identité est apprise et vérifiée).
|
| 32 |
+
- **Base** : [`Qwen/Qwen2.5-Coder-3B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-Coder-3B-Instruct) @ `488639f1ff808d1d3d0ba301aef8c11461451ec5` (Apache-2.0).
|
| 33 |
+
- **Format** : GGUF (`Q8_0`), prêt pour `llama.cpp` / `llama-server`.
|
| 34 |
+
- **Fichier** : `webcoder-3b-q8_0.gguf` (~3,06 Gio).
|
| 35 |
+
|
| 36 |
+
## Description
|
| 37 |
+
|
| 38 |
+
`webcoder-3b` est un petit modèle spécialisé pour **écrire et corriger du code Web**.
|
| 39 |
+
Il combine :
|
| 40 |
+
|
| 41 |
+
1. une base **Qwen2.5-Coder-3B-Instruct** (même famille que le 1,5B utilisé auparavant) ;
|
| 42 |
+
2. un **LoRA « seed »** (rang 8, `q_proj`/`v_proj`) appris sur des corpus d'**identité**, de **chat**
|
| 43 |
+
et de **worker** (`format de blocs ```file:CHEMIN``` pour éditer des fichiers) ;
|
| 44 |
+
3. une **fusion** dans les poids de base, puis une **quantification Q8_0** en GGUF.
|
| 45 |
+
|
| 46 |
+
Le modèle répond en **français** par défaut, connaît son identité (« WebCoder »), et sait produire
|
| 47 |
+
du code Web dans le **format worker** (un bloc par fichier, contenu complet).
|
| 48 |
+
|
| 49 |
+
## Utilisation (llama.cpp / llama-server, CPU)
|
| 50 |
+
|
| 51 |
+
```sh
|
| 52 |
+
llama-server --model webcoder-3b-q8_0.gguf \
|
| 53 |
+
--ctx-size 4096 --parallel 1 --n-gpu-layers 0 \
|
| 54 |
+
--threads 6 --host 127.0.0.1 --port 8081
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
Puis, via l'API OpenAI-compatible :
|
| 58 |
+
|
| 59 |
+
```sh
|
| 60 |
+
curl http://127.0.0.1:8081/v1/chat/completions -H "Content-Type: application/json" -d '{
|
| 61 |
+
"model": "webcoder-3b",
|
| 62 |
+
"messages": [{"role":"user","content":"Ecris une fonction PHP qui inverse une chaine."}],
|
| 63 |
+
"max_tokens": 256, "temperature": 0.2
|
| 64 |
+
}'
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Le **format worker** attend un bloc par fichier modifié :
|
| 68 |
+
|
| 69 |
+
````text
|
| 70 |
+
```file:src/exemple.php
|
| 71 |
+
<?php
|
| 72 |
+
...contenu complet du fichier...
|
| 73 |
+
```
|
| 74 |
+
````
|
| 75 |
+
|
| 76 |
+
## Entraînement (résumé)
|
| 77 |
+
|
| 78 |
+
| Élément | Valeur |
|
| 79 |
+
|---|---|
|
| 80 |
+
| Base | Qwen2.5-Coder-3B-Instruct @ `488639f1…` |
|
| 81 |
+
| Méthode | LoRA (PEFT), rang 8, alpha 16, dropout 0.05–0.1, cibles `q_proj`,`v_proj` |
|
| 82 |
+
| Corpus seed | identité + chat + worker (`chat_corpus` + `t28g_corpus`, 317 ex.) |
|
| 83 |
+
| Pas | 150 microsteps, LR 5e-5, sélection sur validation |
|
| 84 |
+
| Précision | base FP32 (CPU, sans GPU) |
|
| 85 |
+
| Export | fusion (PEFT `merge_and_unload`) → GGUF f16 → `llama-quantize` Q8_0 |
|
| 86 |
+
| Dtype servi | Q8_0 (~3,06 Gio) |
|
| 87 |
+
|
| 88 |
+
Entraînement **CPU uniquement** (politique CPU-first du projet).
|
| 89 |
+
|
| 90 |
+
## Évaluation (banc interne « apps PHP », format worker)
|
| 91 |
+
|
| 92 |
+
Réussite au 1er essai sur des tâches PHP **from-scratch** (réserve tenue à l'écart) :
|
| 93 |
+
|
| 94 |
+
| Famille | Score |
|
| 95 |
+
|---|---|
|
| 96 |
+
| Fonctions courtes (facile) | 8/8 |
|
| 97 |
+
| Multi-fonctions / état (`z`) | 5/5 |
|
| 98 |
+
| Divers (`y`) | 4/5 |
|
| 99 |
+
| Programmes multi-fichiers (`p`) | 2/4 |
|
| 100 |
+
| **Identité** (`identity_check`) | **OK** |
|
| 101 |
+
| **Chat** (4 questions) | **4/4** |
|
| 102 |
+
|
| 103 |
+
Comparé à un modèle 1,5B (même recette), la 3B est **nettement meilleure** sur les tâches dures
|
| 104 |
+
(la capacité était le facteur limitant).
|
| 105 |
+
|
| 106 |
+
## Limites
|
| 107 |
+
|
| 108 |
+
- **Pas agentique** : pas de *tool-calling* structuré ; à utiliser comme **assistant de code / worker** derrière un orchestrateur déterministe.
|
| 109 |
+
- **Applications Web complètes depuis zéro** (ex. un jeu du pendu web fonctionnel) : **encore hors de portée** (échec mesuré ; persistance d'état en session).
|
| 110 |
+
- Le code généré **n'est pas garanti sûr** ; revue humaine requise pour paiements, authentification, migrations.
|
| 111 |
+
- Qualité hors du périmètre Web (PHP/HTML/CSS/SQL/JS) **non mesurée**.
|
| 112 |
+
- Inférence CPU lente au premier message (préfill), rapide ensuite (cache KV).
|
| 113 |
+
|
| 114 |
+
## Licence
|
| 115 |
+
|
| 116 |
+
Modèle de base sous **Apache-2.0**. Les adaptations et l'export conservent cette licence.
|
| 117 |
+
Voir le `LICENSE` du modèle de base.
|
| 118 |
+
|
| 119 |
+
## Citation / attribution
|
| 120 |
+
|
| 121 |
+
```
|
| 122 |
+
WebCoder 3B (webcoder-3b) — Pierre Jean Duvivier.
|
| 123 |
+
Base : Qwen2.5-Coder-3B-Instruct (Alibaba Cloud, Apache-2.0).
|
| 124 |
+
```
|