first add

This commit is contained in:
lingyuzeng
2025-08-27 16:14:23 +08:00
commit 01a4190a28
3 changed files with 298 additions and 0 deletions

46
README.md Normal file
View File

@@ -0,0 +1,46 @@
## Agent
自建基于llama-box启动qwen3-code-flash-1M 的 AI Agent 代码仓库
### llama-box 启动参数
注意:
添加 --enable-reasoning这个参数对 Qwen3 模型的工具调用非常重要,能够提升推理能力。
添加 --jinja这个参数用于加载 Jinja 模板Qwen3 模型需要使用 Jinja 模板进行推理。、
启动参数参考:
```bash
llama-box \
--host 0.0.0.0 \
--port 8080 \
--model /Volumes/long990max/gpustack_data/unsloth/Qwen3-Coder-30B-A3B-Instruct-1M-GGUF/Qwen3-Coder-30B-A3B-Instruct-1M-UD-Q4_K_XL.gguf \
--chat-template chatml \
--jinja \
--enable-reasoning \
--flash-attn \
--cache-type-k q4_0 \
--cache-type-v q4_0 \
--ctx-size 262144 \
--gpu-layers 49 \
--threads 12 \
--threads-batch 16 \
--threads-http 16 \
--batch-size 1024 \
--ubatch-size 1024 \
--defrag-thold -1 \
--no-context-shift
```
### 安装环境
```bash
uv venv --managed-python -p 3.12 --seed .venv
source .venv/bin/activate
git clone https://github.com/hotwa/Qwen-Agent
cd Qwen-Agent
uv pip install -e ./"[gui,rag,code_interpreter,mcp]"
cd ..
python qwen3_coder_with_qwen_agent.py
```