- An Introduction to Variational Autoencoders
https://arxiv.org/abs/1906.02691
- Batch Normalization
https://arxiv.org/abs/1502.03167 - Layer Normalization
https://arxiv.org/abs/1607.06450 - Deep Residual Learning for Image Recognition
https://arxiv.org/abs/1512.03385
- Attention Is All You Need
https://arxiv.org/abs/1706.03762 - BERT
https://arxiv.org/abs/1810.04805 - Language Models are Unsupervised Multitask Learners
https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf
- Transformers for Image Recognition at Scale
https://arxiv.org/abs/2010.11929 - Learning Transferable Visual Models From Natural Language Supervision
https://arxiv.org/abs/2103.00020 - LoRA: Low-Rank Adaptation of Large Language Models
https://arxiv.org/abs/2106.09685
- Let's Verify Step by Step
https://arxiv.org/abs/2305.20050 - Reflexion: Language Agents with Verbal Reinforcement Learning
https://arxiv.org/abs/2303.11366 - Self-RAG
https://arxiv.org/abs/2310.11511
- Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
https://arxiv.org/abs/2006.16236 - Linformer: Self-Attention with Linear Complexity
https://arxiv.org/abs/2006.04768 - Fast Inference from Transformers via Speculative Decoding
https://arxiv.org/abs/2211.17192 - EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty
https://arxiv.org/abs/2401.15077
- A General Theoretical Paradigm to Understand Learning from Human Preferences
https://arxiv.org/abs/1706.03741 - Trust Region Policy Optimization
https://arxiv.org/abs/1502.05477 - High-Dimensional Continuous Control Using Generalized Advantage Estimation
https://arxiv.org/abs/1506.02438 - Asynchronous Methods for Deep Reinforcement Learning
https://arxiv.org/abs/1602.01783 - Proximal Policy Optimization Algorithms
https://arxiv.org/abs/1707.06347 - Training language models to follow instructions with human feedback
https://arxiv.org/abs/2203.02155 - Token-level Direct Preference Optimization
https://arxiv.org/abs/2404.19733 - It Takes Two: Your GRPO Is Secretly DPO
https://arxiv.org/abs/2402.14767 - Search-R1
https://arxiv.org/abs/2403.05583
請確認你符合以下條件(你前面描述是 OK 的):
- Windows 10 / 11(64 位元)
- NVIDIA GPU(例如 GTX 1650,4GB VRAM)
- 系統 RAM ≥ 16GB(32GB 更佳)
- 不用安裝 Python、不用 Docker
- 打開檔案總管
- 到
D:\(或任一你喜歡的磁碟) - 新增資料夾,命名為:
AI_Project
後面所有東西都放這裡。
-
下載:
llama-b4512-bin-win-cuda-cu12.4-x64.zip -
來源:ggml-org / llama.cpp 官方 release
操作:
- 解壓縮
- 把裡面所有
.exe檔案 👉 全部複製到AI_Project根目錄
-
下載:
cudart-llama-bin-win-cuda-12.4-x64.zip
操作:
- 解壓縮
- 把裡面所有
.dll檔案 👉 全部複製到AI_Project根目錄 - 確認
.exe和.dll在同一層
模型名稱(請照這個):
Qwen2.5-Coder-7B-Instruct-Q4_K_M.gguf
操作:
- 下載
.gguf - 直接放進
AI_Project資料夾 - 不用解壓縮
AI_Project
│
├─ llama-server.exe
├─ llama-cli.exe
├─ (其他 .exe)
├─ *.dll
├─ Qwen2.5-Coder-7B-Instruct-Q4_K_M.gguf
- 在
AI_Project空白處 → 右鍵 - 新增 → 文字文件
- 改名為:
run_server.bat
.bat,不是 .txt
@echo off
CHCP 65001 > nul
TITLE Qwen2.5-Coder-7B Server
:: GTX 1650 / 4GB VRAM 穩定設定
llama-server.exe ^
-m Qwen2.5-Coder-7B-Instruct-Q4_K_M.gguf ^
-ngl 99 ^
-fa ^
-ctk q8_0 ^
-ctv q8_0 ^
-c 6144 ^
--host 0.0.0.0 ^
--port 8080
pause存檔後關閉。
- 雙擊
run_server.bat - 第一次會載入模型(30 秒~1 分鐘)
- 看到以下訊息代表成功:
HTTP server listening on 0.0.0.0:8080
👉 這個視窗不要關
- 前往:AnythingLLM 官網
- 下載 Windows 版並完成安裝
- 啟動 AnythingLLM
- 左下角 ⚙️ Settings
- 點 LLM Preference
- 設定如下(照填):
| 欄位 | 值 |
|---|---|
| LLM Provider | Generic OpenAI |
| Base URL | http://127.0.0.1:8080/v1 |
| API Key | 123(隨便) |
| Model Name | qwen2.5-coder-7b |
| Token Limit | 6144 |
- 點 Save
-
回到 AnythingLLM 主畫面
-
建立 Workspace:
Code_Refactor -
進入 Workspace
-
上傳:
.cs / .cpp / .py / .js- 專案資料夾
- 技術 PDF
-
點 Save and Embed
-
等待嵌入完成
幫我優化這段程式
請在 不改 public API 的前提下 重構我剛上傳的
xxx.cs要求:
- 行為必須與原本一致
- 提升可讀性與維護性
- 明確列出你實際修改的地方
👉 這是 Qwen2.5-Coder-7B 的最佳用法
- Chrome / Edge
- Discord
- 遊戲啟動器
- VSCode GPU 加速(可選)
依序嘗試:
- 把
-c 6144改成5632 - 把
-ngl 99改成-ngl 60 - 重新啟動
run_server.bat