模型简介
模型特点
模型能力
使用案例
🚀 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



