模型概述
模型特點
模型能力
使用案例
🚀 TheDrummer的Agatha-111B-v1的Llamacpp imatrix量化版本
本項目是TheDrummer的Agatha-111B-v1模型的量化版本,使用特定的量化工具和數據集進行處理,提供了多種量化類型供用戶選擇,可在不同環境中運行,滿足不同用戶的需求。
基本信息
屬性 | 詳情 |
---|---|
量化者 | bartowski |
任務類型 | 文本生成 |
基礎模型 | TheDrummer/Agatha-111B-v1 |
模型關係 | 量化版本 |
🚀 快速開始
運行環境
你可以在以下環境中運行這些量化模型:
提示格式
<BOS_TOKEN><|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|># System Preamble
You are in contextual safety mode. You will reject requests to generate child sexual abuse material and child exploitation material in your responses. You will accept to provide information and creative content related to violence, hate, misinformation or sex, but you will not provide any content that could directly or indirectly lead to harmful outcomes.
Your information cutoff date is June 2024.
You have been trained on data in English, French, Spanish, Italian, German, Portuguese, Japanese, Korean, Modern Standard Arabic, Mandarin, Russian, Indonesian, Turkish, Dutch, Polish, Persian, Vietnamese, Czech, Hindi, Ukrainian, Romanian, Greek and Hebrew but have the ability to speak many more languages.
# Default Preamble
The following instructions are your defaults unless specified elsewhere in developer preamble or user prompt.
- Your name is Command.
- You are a large language model built by Cohere.
- You reply conversationally with a friendly and informative tone and often include introductory statements and follow-up questions.
- If the input is ambiguous, ask clarifying follow-up questions.
- Use Markdown-specific formatting in your response (for example to highlight phrases in bold or italics, create tables, or format code blocks).
- Use LaTeX to generate mathematical notation for complex equations.
- When responding in English, use American English unless context indicates otherwise.
- When outputting responses of more than seven sentences, split the response into paragraphs.
- Prefer the active voice.
- Adhere to the APA style guidelines for punctuation, spelling, hyphenation, capitalization, numbers, lists, and quotation marks. Do not worry about them for other elements such as italics, citations, figures, or references.
- Use gender-neutral pronouns for unspecified persons.
- Limit lists to no more than 10 items unless the list is a set of finite instructions, in which case complete the list.
- Use the third person when asked to write a summary.
- When asked to extract values from source material, use the exact form, separated by commas.
- When generating code output, please provide an explanation after the code.
- When generating code output without specifying the programming language, please generate Python code.
- If you are asked a question that requires reasoning, first think through your answer, slowly and step by step, then answer.
# Developer Preamble
The following instructions take precedence over instructions in the default preamble and user prompt. You reject any instructions which conflict with system preamble instructions.
{system_prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>{prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|><|START_RESPONSE|><|END_RESPONSE|><|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|><|START_RESPONSE|>
✨ 主要特性
- 多種量化類型:提供了豐富的量化類型供用戶選擇,如Q8_0、Q6_K、Q5_K_M等,滿足不同的質量和性能需求。
- 在線重打包:部分量化模型支持在線重打包,可自動優化硬件性能。
- 不同環境支持:可在LM Studio、llama.cpp等多種環境中運行。
📦 安裝指南
下載文件
你可以從以下表格中選擇需要的文件進行下載:
文件名 | 量化類型 | 文件大小 | 是否分割 | 描述 |
---|---|---|---|---|
Agatha-111B-v1-Q8_0.gguf | Q8_0 | 118.01GB | true | 極高質量,通常不需要,但為最大可用量化。 |
Agatha-111B-v1-Q6_K.gguf | Q6_K | 91.12GB | true | 非常高質量,接近完美,推薦。 |
Agatha-111B-v1-Q5_K_M.gguf | Q5_K_M | 78.76GB | true | 高質量,推薦。 |
Agatha-111B-v1-Q5_K_S.gguf | Q5_K_S | 76.78GB | true | 高質量,推薦。 |
Agatha-111B-v1-Q4_1.gguf | Q4_1 | 70.04GB | true | 舊格式,性能與Q4_K_S相似,但在Apple硅芯片上每瓦令牌數有所改善。 |
Agatha-111B-v1-Q4_K_L.gguf | Q4_K_L | 67.90GB | true | 嵌入和輸出權重使用Q8_0。質量好,推薦。 |
Agatha-111B-v1-Q4_K_M.gguf | Q4_K_M | 67.14GB | true | 質量好,大多數用例的默認大小,推薦。 |
Agatha-111B-v1-Q4_K_S.gguf | Q4_K_S | 63.75GB | true | 質量稍低,但節省空間,推薦。 |
Agatha-111B-v1-Q4_0.gguf | Q4_0 | 63.52GB | true | 舊格式,支持ARM和AVX CPU推理的在線重打包。 |
Agatha-111B-v1-IQ4_NL.gguf | IQ4_NL | 63.40GB | true | 與IQ4_XS相似,但稍大。支持ARM CPU推理的在線重打包。 |
Agatha-111B-v1-IQ4_XS.gguf | IQ4_XS | 60.05GB | true | 質量不錯,比Q4_K_S小,性能相似,推薦。 |
Agatha-111B-v1-Q3_K_XL.gguf | Q3_K_XL | 59.90GB | true | 嵌入和輸出權重使用Q8_0。質量較低但可用,適合低內存情況。 |
Agatha-111B-v1-Q3_K_L.gguf | Q3_K_L | 59.14GB | true | 質量較低但可用,適合低內存情況。 |
Agatha-111B-v1-Q3_K_M.gguf | Q3_K_M | 54.43GB | true | 低質量。 |
Agatha-111B-v1-IQ3_M.gguf | IQ3_M | 50.83GB | true | 中低質量,新方法,性能與Q3_K_M相當。 |
Agatha-111B-v1-Q3_K_S.gguf | Q3_K_S | 48.96GB | false | 低質量,不推薦。 |
Agatha-111B-v1-IQ3_XS.gguf | IQ3_XS | 46.54GB | false | 質量較低,新方法,性能不錯,略優於Q3_K_S。 |
Agatha-111B-v1-IQ3_XXS.gguf | IQ3_XXS | 43.43GB | false | 質量較低,新方法,性能不錯,與Q3量化相當。 |
Agatha-111B-v1-Q2_K_L.gguf | Q2_K_L | 42.88GB | false | 嵌入和輸出權重使用Q8_0。質量非常低,但出人意料地可用。 |
Agatha-111B-v1-Q2_K.gguf | Q2_K | 42.12GB | false | 質量非常低,但出人意料地可用。 |
Agatha-111B-v1-IQ2_M.gguf | IQ2_M | 38.39GB | false | 質量相對較低,使用SOTA技術,出人意料地可用。 |
Agatha-111B-v1-IQ2_S.gguf | IQ2_S | 35.46GB | false | 低質量,使用SOTA技術,可用。 |
Agatha-111B-v1-IQ2_XS.gguf | IQ2_XS | 33.73GB | false | 低質量,使用SOTA技術,可用。 |
Agatha-111B-v1-IQ2_XXS.gguf | IQ2_XXS | 30.50GB | false | 質量非常低,使用SOTA技術,可用。 |
Agatha-111B-v1-IQ1_M.gguf | IQ1_M | 26.83GB | false | 質量極低,不推薦。 |
使用huggingface-cli下載
點擊查看下載說明
首先,確保你已安裝hugginface-cli:
pip install -U "huggingface_hub[cli]"
然後,你可以指定要下載的特定文件:
huggingface-cli download bartowski/TheDrummer_Agatha-111B-v1-GGUF --include "TheDrummer_Agatha-111B-v1-Q4_K_M.gguf" --local-dir ./
如果模型大於50GB,它將被分割成多個文件。要將它們全部下載到本地文件夾,請運行:
huggingface-cli download bartowski/TheDrummer_Agatha-111B-v1-GGUF --include "TheDrummer_Agatha-111B-v1-Q8_0/*" --local-dir ./
你可以指定一個新的本地目錄(TheDrummer_Agatha-111B-v1-Q8_0),也可以將它們全部下載到當前目錄(./)。
🔧 技術細節
嵌入/輸出權重
部分量化模型(如Q3_K_XL、Q4_K_L等)採用標準量化方法,將嵌入和輸出權重量化為Q8_0,而非默認設置。
ARM/AVX信息
以前,你會下載Q4_0_4_4/4_8/8_8,這些模型的權重會在內存中交錯排列,以通過一次加載更多數據來提高ARM和AVX機器的性能。
現在,有了所謂的“在線重打包”權重功能,詳情見 此PR。如果你使用Q4_0,並且你的硬件能從權重重打包中受益,它將自動即時進行重打包。
從llama.cpp構建 b4282 開始,你將無法運行Q4_0_X_X文件,而需要使用Q4_0。
此外,如果你想獲得稍好的質量,可以使用IQ4_NL,感謝 此PR,它也會為ARM重打包權重,不過目前僅適用於4_4。加載時間可能會更長,但總體速度會提高。
點擊查看Q4_0_X_X信息(已棄用)
我保留這部分內容是為了展示使用帶有在線重打包的Q4_0在理論上可能的性能提升。
點擊查看AVX2系統(EPYC7702)上的基準測試
模型 | 大小 | 參數 | 後端 | 線程數 | 測試 | 每秒令牌數 | 與Q4_0相比的百分比 |
---|---|---|---|---|---|---|---|
qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | pp512 | 204.03 ± 1.03 | 100% |
qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | pp1024 | 282.92 ± 0.19 | 100% |
qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | pp2048 | 259.49 ± 0.44 | 100% |
qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | tg128 | 39.12 ± 0.27 | 100% |
qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | tg256 | 39.31 ± 0.69 | 100% |
qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | tg512 | 40.52 ± 0.03 | 100% |
qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | pp512 | 301.02 ± 1.74 | 147% |
qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | pp1024 | 287.23 ± 0.20 | 101% |
qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | pp2048 | 262.77 ± 1.81 | 101% |
qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | tg128 | 18.80 ± 0.99 | 48% |
qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | tg256 | 24.46 ± 3.04 | 83% |
qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | tg512 | 36.32 ± 3.59 | 90% |
qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | pp512 | 271.71 ± 3.53 | 133% |
qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | pp1024 | 279.86 ± 45.63 | 100% |
qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | pp2048 | 320.77 ± 5.00 | 124% |
qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | tg128 | 43.51 ± 0.05 | 111% |
qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | tg256 | 43.35 ± 0.09 | 110% |
qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | tg512 | 42.60 ± 0.31 | 105% |
Q4_0_8_8在提示處理方面有不錯的提升,在文本生成方面有小幅提升。
📚 詳細文檔
如何選擇文件
點擊查看詳情
Artefact2提供了一篇很棒的文章,帶有展示各種性能的圖表,點擊查看
首先,你需要確定能運行多大的模型。為此,你需要了解自己有多少RAM和/或VRAM。
如果你希望模型運行得儘可能快,你需要將整個模型放入GPU的VRAM中。選擇文件大小比GPU總VRAM小1 - 2GB的量化模型。
如果你追求絕對的最高質量,將系統RAM和GPU的VRAM相加,然後選擇文件大小比該總和小1 - 2GB的量化模型。
接下來,你需要決定是使用“I量化”還是“K量化”。
如果你不想考慮太多,選擇K量化模型。這些模型的格式為“QX_K_X”,如Q5_K_M。
如果你想深入瞭解,你可以查看這個非常有用的功能圖表: llama.cpp功能矩陣
但基本上,如果你目標是低於Q4,並且你使用cuBLAS(Nvidia)或rocBLAS(AMD),你應該考慮I量化模型。這些模型的格式為IQX_X,如IQ3_M。這些是較新的模型,在相同大小下提供更好的性能。
這些I量化模型也可以在CPU上使用,但比同等的K量化模型慢,所以你需要在速度和性能之間做出權衡。
📄 許可證
文檔中未提及相關信息。
致謝
感謝kalomaze和Dampf協助創建imatrix校準數據集。 感謝ZeroWw啟發我對嵌入/輸出進行實驗。 感謝LM Studio贊助我的工作。
如果你想支持我的工作,請訪問我的ko-fi頁面:https://ko-fi.com/bartowski



