forked from lingyuzeng/agent
273e6088fc567f54e123141d81add9bb5d558447
Agent
自建基于llama-box启动qwen3-code-flash-1M 的 AI Agent 代码仓库
llama-box 启动参数
注意: 添加 --enable-reasoning:这个参数对 Qwen3 模型的工具调用非常重要,能够提升推理能力。 添加 --jinja:这个参数用于加载 Jinja 模板,Qwen3 模型需要使用 Jinja 模板进行推理。、
启动参数参考:
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
安装环境
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
Description
Languages
Python
100%