Instructions to use Trina-QwQ/wt-copilot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Trina-QwQ/wt-copilot with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Trina-QwQ/wt-copilot", filename="wtc_q4.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Trina-QwQ/wt-copilot 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 Trina-QwQ/wt-copilot # Run inference directly in the terminal: llama cli -hf Trina-QwQ/wt-copilot
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Trina-QwQ/wt-copilot # Run inference directly in the terminal: llama cli -hf Trina-QwQ/wt-copilot
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 Trina-QwQ/wt-copilot # Run inference directly in the terminal: ./llama-cli -hf Trina-QwQ/wt-copilot
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 Trina-QwQ/wt-copilot # Run inference directly in the terminal: ./build/bin/llama-cli -hf Trina-QwQ/wt-copilot
Use Docker
docker model run hf.co/Trina-QwQ/wt-copilot
- LM Studio
- Jan
- vLLM
How to use Trina-QwQ/wt-copilot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Trina-QwQ/wt-copilot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Trina-QwQ/wt-copilot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Trina-QwQ/wt-copilot
- Ollama
How to use Trina-QwQ/wt-copilot with Ollama:
ollama run hf.co/Trina-QwQ/wt-copilot
- Unsloth Studio
How to use Trina-QwQ/wt-copilot with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Trina-QwQ/wt-copilot to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Trina-QwQ/wt-copilot to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Trina-QwQ/wt-copilot to start chatting
- Pi
How to use Trina-QwQ/wt-copilot with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trina-QwQ/wt-copilot
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Trina-QwQ/wt-copilot" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Trina-QwQ/wt-copilot with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trina-QwQ/wt-copilot
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 Trina-QwQ/wt-copilot
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Trina-QwQ/wt-copilot with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trina-QwQ/wt-copilot
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 "Trina-QwQ/wt-copilot" \ --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"
- Docker Model Runner
How to use Trina-QwQ/wt-copilot with Docker Model Runner:
docker model run hf.co/Trina-QwQ/wt-copilot
- Lemonade
How to use Trina-QwQ/wt-copilot with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Trina-QwQ/wt-copilot
Run and chat with the model
lemonade run user.wt-copilot-{{QUANT_TAG}}List all available models
lemonade list
| <html lang="zh-CN"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>WT - Copilot</title> | |
| <style> | |
| body { | |
| margin: 0; | |
| display: flex; | |
| height: 100vh; | |
| font-family: "PingFang SC", "Microsoft YaHei", serif; | |
| background-color: #f5f5f5; | |
| } | |
| /* 侧边栏 */ | |
| #sidebar { | |
| width: 280px; | |
| background: #fff; | |
| border-right: 1px solid #ddd; | |
| padding: 20px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 15px; | |
| box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); | |
| z-index: 10; | |
| } | |
| .setting-item { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 5px; | |
| } | |
| .setting-item label { | |
| font-size: 12px; | |
| color: #666; | |
| font-weight: bold; | |
| } | |
| input { | |
| padding: 8px; | |
| border: 1px solid #ccc; | |
| border-radius: 4px; | |
| } | |
| /* 编辑区域 */ | |
| #main-container { | |
| flex: 1; | |
| padding: 40px; | |
| display: flex; | |
| justify-content: center; | |
| overflow-y: auto; | |
| } | |
| #editor { | |
| width: 100%; | |
| max-width: 800px; | |
| min-height: 85vh; | |
| background: white; | |
| padding: 40px; | |
| box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | |
| outline: none; | |
| font-size: 18px; | |
| line-height: 1.8; | |
| color: #333; | |
| white-space: pre-wrap; | |
| word-wrap: break-word; | |
| /* 确保内容垂直对齐 */ | |
| display: block; | |
| } | |
| /* Ghost Text 样式 - 关键:禁止选中,颜色淡化 */ | |
| .ghost-text { | |
| color: #aaa; | |
| user-select: none; | |
| pointer-events: none; | |
| font-style: italic; | |
| } | |
| .status-box { | |
| font-size: 12px; | |
| margin-top: auto; | |
| color: #888; | |
| background: #f9f9f9; | |
| padding: 10px; | |
| border-radius: 5px; | |
| } | |
| .kbd { | |
| background: #eee; | |
| padding: 2px 4px; | |
| border-radius: 3px; | |
| border: 1px solid #ccc; | |
| color: #333; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="sidebar"> | |
| <h3>WTC - WebUI</h3> | |
| <div class="setting-item"> | |
| <label>API Endpoint</label> | |
| <input type="text" id="api-url" value="http://localhost:8080/v1/chat/completions"> | |
| </div> | |
| <div class="setting-item"> | |
| <label>Temperature</label> | |
| <input type="number" id="temp" value="0.7" step="0.1" min="0" max="2"> | |
| </div> | |
| <div class="setting-item"> | |
| <label>Max Tokens</label> | |
| <input type="number" id="max-tokens" value="150"> | |
| </div> | |
| <div class="status-box"> | |
| <p>✨ <span class="kbd">Tab</span> 触发续写</p> | |
| <p>🤝 <span class="kbd">Tab</span> 接受建议</p> | |
| <p>Powered by WT-Copilot™ | Trina AI Lab</p> | |
| <hr> | |
| <p id="info-display">状态:就绪</p> | |
| </div> | |
| </div> | |
| <div id="main-container"> | |
| <div id="editor" contenteditable="true" spellcheck="false">在这里输入故事开头...</div> | |
| </div> | |
| <script> | |
| const editor = document.getElementById('editor'); | |
| const infoDisplay = document.getElementById('info-display'); | |
| let isFetching = false; | |
| editor.addEventListener('paste', (e) => { | |
| e.preventDefault(); | |
| const text = (e.originalEvent || e).clipboardData.getData('text/plain'); | |
| document.execCommand('insertText', false, text); | |
| }); | |
| function periodicSanitize() { | |
| if (isFetching) return; | |
| const ghost = editor.querySelector('.ghost-text'); | |
| if (!ghost) { | |
| const hasComplexHTML = Array.from(editor.childNodes).some(node => | |
| node.nodeType === 1 && node.tagName !== 'SPAN' && node.tagName !== 'BR' | |
| ); | |
| if (hasComplexHTML) { | |
| const selection = window.getSelection(); | |
| const offset = selection.focusOffset; | |
| editor.innerText = editor.innerText; | |
| } | |
| } | |
| } | |
| setInterval(periodicSanitize, 5000); | |
| function getContext() { | |
| const tempDiv = document.createElement('div'); | |
| tempDiv.innerHTML = editor.innerHTML; | |
| const ghost = tempDiv.querySelector('.ghost-text'); | |
| if (ghost) ghost.remove(); | |
| const fullText = tempDiv.innerText; | |
| return fullText.slice(-1000); | |
| } | |
| function removeGhost() { | |
| const ghost = editor.querySelector('.ghost-text'); | |
| if (ghost) ghost.remove(); | |
| } | |
| function acceptGhost() { | |
| const ghost = editor.querySelector('.ghost-text'); | |
| if (ghost) { | |
| const text = ghost.innerText; | |
| removeGhost(); | |
| document.execCommand('insertText', false, text); | |
| } | |
| } | |
| async function fetchCompletion() { | |
| if (isFetching) return; | |
| const context = getContext(); | |
| const apiUrl = document.getElementById('api-url').value; | |
| const temp = parseFloat(document.getElementById('temp').value); | |
| const maxTokens = parseInt(document.getElementById('max-tokens').value); | |
| isFetching = true; | |
| infoDisplay.innerText = "状态:AI 正在思考..."; | |
| try { | |
| const response = await fetch(apiUrl, { | |
| method: 'POST', | |
| headers: {'Content-Type': 'application/json'}, | |
| body: JSON.stringify({ | |
| "messages": [{"role": "user", "content": `续写:${context}\n/no_think`}], | |
| "temperature": temp, | |
| "max_tokens": maxTokens | |
| }) | |
| }); | |
| const data = await response.json(); | |
| let rawContent = data.choices[0].message.content; | |
| const cleanContent = rawContent.replace(/<think>[\s\S]*?<\/think>/g, '').trimStart(); | |
| if (cleanContent) { | |
| showGhost(cleanContent); | |
| infoDisplay.innerText = "状态:已生成 (Tab 接受)"; | |
| } else { | |
| infoDisplay.innerText = "状态:未生成有效补全"; | |
| } | |
| } catch (error) { | |
| infoDisplay.innerText = "状态:API 连接失败"; | |
| } finally { | |
| isFetching = false; | |
| } | |
| } | |
| function showGhost(text) { | |
| removeGhost(); | |
| const selection = window.getSelection(); | |
| if (selection.rangeCount > 0) { | |
| const range = selection.getRangeAt(0); | |
| const ghostSpan = document.createElement('span'); | |
| ghostSpan.className = 'ghost-text'; | |
| ghostSpan.innerText = text; | |
| range.insertNode(ghostSpan); | |
| range.setStartBefore(ghostSpan); | |
| range.collapse(true); | |
| } | |
| } | |
| editor.addEventListener('keydown', (e) => { | |
| const hasGhost = !!editor.querySelector('.ghost-text'); | |
| if (e.key === 'Tab') { | |
| e.preventDefault(); | |
| if (hasGhost) { | |
| acceptGhost(); | |
| } else { | |
| fetchCompletion(); | |
| } | |
| return; | |
| } | |
| if (hasGhost && !['Control', 'Alt', 'Shift', 'Meta'].includes(e.key)) { | |
| removeGhost(); | |
| infoDisplay.innerText = "状态:就绪"; | |
| } | |
| }); | |
| editor.addEventListener('focus', function () { | |
| if (this.innerText === '在这里输入故事开头...') { | |
| this.innerText = ''; | |
| } | |
| }, {once: true}); | |
| </script> | |
| </body> | |
| </html> |