Instructions to use devon-ai/devonai-dev0.1-7b 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 devon-ai/devonai-dev0.1-7b 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 devon-ai/devonai-dev0.1-7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf devon-ai/devonai-dev0.1-7b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf devon-ai/devonai-dev0.1-7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf devon-ai/devonai-dev0.1-7b: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 devon-ai/devonai-dev0.1-7b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf devon-ai/devonai-dev0.1-7b:Q4_K_M
Use Docker
docker model run hf.co/devon-ai/devonai-dev0.1-7b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use devon-ai/devonai-dev0.1-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devon-ai/devonai-dev0.1-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devon-ai/devonai-dev0.1-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/devon-ai/devonai-dev0.1-7b:Q4_K_M
- Ollama
How to use devon-ai/devonai-dev0.1-7b with Ollama:
ollama run hf.co/devon-ai/devonai-dev0.1-7b:Q4_K_M
- Unsloth Desktop
- Pi
How to use devon-ai/devonai-dev0.1-7b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devon-ai/devonai-dev0.1-7b:Q4_K_M
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "devon-ai/devonai-dev0.1-7b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use devon-ai/devonai-dev0.1-7b with Docker Model Runner:
docker model run hf.co/devon-ai/devonai-dev0.1-7b:Q4_K_M
- Lemonade
How to use devon-ai/devonai-dev0.1-7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devon-ai/devonai-dev0.1-7b:Q4_K_M
Run and chat with the model
lemonade run user.devonai-dev0.1-7b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use devon-ai/devonai-dev0.1-7b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devon-ai/devonai-dev0.1-7b: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:9931/v1 hermes config set model.default devon-ai/devonai-dev0.1-7b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use devon-ai/devonai-dev0.1-7b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devon-ai/devonai-dev0.1-7b: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:9931/v1 \ --custom-model-id "devon-ai/devonai-dev0.1-7b: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"
Upload training_config.yaml with huggingface_hub
Browse files- training_config.yaml +67 -0
training_config.yaml
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dev0.1 訓練設定(YAML)
|
| 2 |
+
# ============================================================
|
| 3 |
+
# 目標:在 Qwen2.5-3B-Instruct 基礎上,以 LoRA 內化 DevonAI 的
|
| 4 |
+
# 工具呼叫協定({"tool": ..., "args": {...}})與簡短思考習慣。
|
| 5 |
+
|
| 6 |
+
project:
|
| 7 |
+
name: "dev0.1"
|
| 8 |
+
output_dir: "training/output/dev0.1-lora"
|
| 9 |
+
merged_dir: "training/output/dev0.1-hf"
|
| 10 |
+
gguf_dir: "models"
|
| 11 |
+
gguf_name: "dev0.1-q4_k_m.gguf"
|
| 12 |
+
|
| 13 |
+
# 基座模型(Hugging Face ID 或本機路徑)
|
| 14 |
+
base_model: "Qwen/Qwen2.5-3B-Instruct"
|
| 15 |
+
|
| 16 |
+
# 資料
|
| 17 |
+
data:
|
| 18 |
+
train_file: "training/dataset/dev0.1_train.jsonl"
|
| 19 |
+
val_file: "training/dataset/dev0.1_val.jsonl"
|
| 20 |
+
max_seq_length: 2048
|
| 21 |
+
# LoRA 設定(3B 於 12GB VRAM 可跑;16GB+ 可把 r 提高到 32)
|
| 22 |
+
lora:
|
| 23 |
+
r: 16
|
| 24 |
+
alpha: 16
|
| 25 |
+
dropout: 0.05
|
| 26 |
+
bias: "none"
|
| 27 |
+
target_modules:
|
| 28 |
+
- "q_proj"
|
| 29 |
+
- "k_proj"
|
| 30 |
+
- "v_proj"
|
| 31 |
+
- "o_proj"
|
| 32 |
+
- "gate_proj"
|
| 33 |
+
- "up_proj"
|
| 34 |
+
- "down_proj"
|
| 35 |
+
|
| 36 |
+
# 訓練超參數
|
| 37 |
+
training:
|
| 38 |
+
backend: "auto" # auto | unsloth | peft(自動偵測 unsloth 是否安裝)
|
| 39 |
+
epochs: 3
|
| 40 |
+
per_device_batch_size: 2
|
| 41 |
+
gradient_accumulation_steps: 8 # 有效 batch = 16(16GB VRAM 可用;12GB 改 1+16)
|
| 42 |
+
learning_rate: 0.0002 # 2e-4,LoRA 常用區間 1e-4~3e-4
|
| 43 |
+
warmup_steps: 10 # trl>=1.17 以步數取代 warmup_ratio
|
| 44 |
+
lr_scheduler: "cosine"
|
| 45 |
+
weight_decay: 0.01
|
| 46 |
+
max_grad_norm: 1.0
|
| 47 |
+
logging_steps: 10
|
| 48 |
+
save_steps: 200
|
| 49 |
+
eval_steps: 100
|
| 50 |
+
seed: 42
|
| 51 |
+
gradient_checkpointing: true # 省顯存;unsloth 下會自動啟用 optimized 版本
|
| 52 |
+
packing: false # 開啟可加速但樣本較長時需注意
|
| 53 |
+
max_steps: -1 # -1 = 跑完整 epochs(smoke 時改為小數值)
|
| 54 |
+
|
| 55 |
+
# 量化(GGUF 轉換)
|
| 56 |
+
quantization:
|
| 57 |
+
type: "Q4_K_M"
|
| 58 |
+
llama_cpp_dir: "third_party/llama.cpp" # 不存在時自動 clone
|
| 59 |
+
|
| 60 |
+
# 評估
|
| 61 |
+
eval:
|
| 62 |
+
samples: 30 # 生成樣本數(工具呼叫合法率評估)
|
| 63 |
+
temperature: 0.2 # 貼近實戰的確定性輸出
|
| 64 |
+
max_new_tokens: 256
|
| 65 |
+
pass_criteria: # 合格線(未達標請增加資料或 epochs)
|
| 66 |
+
tool_call_valid_rate: 0.9 # 工具呼叫 JSON 合法率 ≥ 90%
|
| 67 |
+
plain_reply_rate: 0.85 # 純對話樣本不亂呼叫工具的比例 ≥ 85%
|