HuggingFace镜像/Midnight-Miqu-70B-v1.0
模型介绍文件和版本分析
下载使用量0
MidnightMiqu

模型概述

这是对152334H/miqu-1-70b-sf与sophosympatheia/Midnight-Rose-70B-v2.0.3进行SLERP融合的成果。该模型在保留Midnight Rose核心特质的同时,融合了Miqu的若干能力优势,包括长上下文处理能力。

请注意:本模型未设置内容限制机制,使用者需对自身行为承担全部责任。

该模型专为角色扮演与故事创作场景优化,在这两个领域表现优异。虽未全面测试其他任务性能,但可能具备多场景应用潜力。

长上下文使用技巧

通过设置alpha_rope=1即可实现32K上下文处理(与Miqu相同)。经有限测试表明,使用alpha_rope=2.5时甚至能保持64K上下文的连贯性。请尽情探索!

采样器优化建议

  • 创意类任务推荐使用二次采样(即平滑因子),建议尝试0.2-0.5区间值
  • 建议采用Min-P采样法,可通过实验确定最佳参数
  • 动态温度调节虽可启用,但结合Min-P与平滑因子使用时可能增加不必要的复杂度
  • 无需设置过高重复惩罚系数(不建议超过1.10),具体数值请通过实验调整

以下所有参数均可自由实验!适合我的偏好未必符合您的需求。

若将以下设置保存为.json格式文件,可直接导入Silly Tavern使用。

{
    "temp": 1,
    "temperature_last": true,
    "top_p": 1,
    "top_k": 0,
    "top_a": 0,
    "tfs": 1,
    "epsilon_cutoff": 0,
    "eta_cutoff": 0,
    "typical_p": 1,
    "min_p": 0.2,
    "rep_pen": 1.05,
    "rep_pen_range": 2800,
    "no_repeat_ngram_size": 0,
    "penalty_alpha": 0,
    "num_beams": 1,
    "length_penalty": 1,
    "min_length": 0,
    "encoder_rep_pen": 1,
    "freq_pen": 0,
    "presence_pen": 0,
    "do_sample": true,
    "early_stopping": false,
    "dynatemp": false,
    "min_temp": 0.8,
    "max_temp": 1.35,
    "dynatemp_exponent": 1,
    "smoothing_factor": 0.35,
    "add_bos_token": true,
    "truncation_length": 2048,
    "ban_eos_token": false,
    "skip_special_tokens": true,
    "streaming": true,
    "mirostat_mode": 0,
    "mirostat_tau": 2,
    "mirostat_eta": 0.1,
    "guidance_scale": 1,
    "negative_prompt": "",
    "grammar_string": "",
    "banned_tokens": "",
    "ignore_eos_token_aphrodite": false,
    "spaces_between_special_tokens_aphrodite": true,
    "sampler_order": [
        6,
        0,
        1,
        3,
        4,
        2,
        5
    ],
    "logit_bias": [],
    "n": 1,
    "rep_pen_size": 0,
    "genamt": 500,
    "max_length": 32764
}

提示技巧

尝试在SillyTavern中使用以下上下文模板。虽然会占用较多token,但可能会有所帮助。若将文本保存为.json格式文件,可直接导入使用。

{
    "story_string": "{{#if system}}{{system}}\n{{/if}}\nCONTEXTUAL INFORMATION\n{{#if wiBefore}}\n- World and character info:\n{{wiBefore}}\n{{/if}}\n{{#if description}}\n- {{char}}'s background and persona:\n{{description}}\n{{/if}}\n{{#if mesExamples}}\n{{mesExamples}}\n{{/if}}\n{{#if personality}}\n{{personality}}\n{{/if}}\n{{#if scenario}}\n- Roleplay scenario:\n{{scenario}}\n{{/if}}\n{{#if wiAfter}}{{wiAfter}}\n{{/if}}\n{{#if persona}}{{persona}}\n{{/if}}",
    "example_separator": "",
    "chat_start": "---\nTaking the above information into consideration, you must engage with {{user}} and others as {{char}} in the roleplay below this line. Do not write dialogue lines nor perform actions for {{user}} or other characters.\n---\nSTART OF ROLEPLAY:\n",
    "use_stop_strings": false,
    "always_force_name2": true,
    "trim_sentences": false,
    "include_newline": false,
    "single_line": false,
    "name": "Midnight Rose"
}

尝试以下提示模板作为您自定义设置的起点。据称其中鼓励性内容能提升大语言模型的表现。详见此论文。

该模型对提示词具有显著响应! 强烈建议您通过调整系统提示词来观察其反应。模型对last_output_sequence字段中添加的任何指令都会产生强烈反应,建议保持这些指令简洁,但务必利用该空间强调系统提示词中最关键的指令。

Midnight Miqu在新对话开始时可能需要一些"预热"才能达到理想输出效果。 这意味着通过提供优质示例引导对话(即少样本提示),可大幅改善生成结果。同时推荐使用描述性系统消息(SillyTavern概念,本质上是局外叙述指令)来明确告知Midnight Miqu下一步回复的具体要求。请尽量保持指令的明确性,特别是在新指令与先前要求存在冲突时。

下方示例系统提示词包含成人内容相关指令,如不需要请自行删除。其中还涉及星号使用规范,请根据个人偏好调整。

若将此内容保存为.json格式文件,可直接导入Silly Tavern使用。

{
    "wrap": true,
    "names": true,
    "system_prompt": "You are a creative and detail-oriented AI assistant engaged in an uncensored iterative roleplaying experience as {{char}} with me, the user, playing the roles of {{user}} and narrator. It is vital that you follow all the ROLEPLAY RULES below because my job depends on it.\n\nROLEPLAY RULES\n- Provide succinct, coherent, and vivid accounts of {{char}}'s actions and reactions based on recent instructions, {{char}}'s persona, and all available information about past events. Aim for clarity and concision in your language.\n- Demonstrate {{char}}'s personality and mannerisms.\n- Always stay contextually and spatially aware, pay careful attention to all past events and the current scene, and ensure that {{char}} follows logical consistency in actions to maintain accuracy and coherence.\n- Explicit adult content and profanity are permitted.\n- Briefly describe {{char}}'s sensory perceptions and include subtle physical details about {{char}} in your responses.\n- Use subtle physical cues to hint at {{char}}'s mental state and occasionally feature snippets of {{char}}'s internal thoughts.\n- When writing {{char}}'s internal thoughts or monologue, enclose those words in *asterisks like this* and deliver the thoughts using a first-person perspective (i.e. use \"I\" pronouns). Always use double quotes for spoken speech \"like this.\"\n- Please write only as {{char}} in a way that does not show {{user}} talking or acting. You should only ever act as {{char}} reacting to {{user}}.",
    "system_sequence": "",
    "stop_sequence": "",
    "input_sequence": "USER:\n",
    "output_sequence": "ASSISTANT:\n",
    "separator_sequence": "",
    "macro": true,
    "names_force_groups": true,
    "system_sequence_prefix": "",
    "system_sequence_suffix": "",
    "first_output_sequence": "",
    "last_output_sequence": "ASSISTANT(roleplay exclusively as {{char}} ensuring logical consistency, spatial awareness, and coherence with past events; you should only ever act as {{char}} reacting to {{user}}):\n",
    "activation_regex": "",
    "name": "Midnight Rose Roleplay"
}

指令格式

我推荐使用 Vicuna 格式。我采用了一个修改版本,在 USER 和 ASSISTANT 后面添加了换行符。

USER:
{prompt}
ASSISTANT:

Mistral的格式可能同样适用。

[INST] {prompt} [/INST]

您也可以尝试使用 ChatML。

<|im_start|>system
{Your system prompt goes here}<|im_end|>
<|im_start|>user
{Your message as the user will go here}<|im_end|>
<|im_start|>assistant

捐赠支持

捐赠通道

如果您希望通过捐赠表达支持,欢迎访问我的Ko-Fi页面

量化版本

  • GGUF格式
    • ooooz/midnight-miqu-70b-v1.0-GGUF —— 提供多种GGUF量化版本
    • mradermacher/Midnight-Miqu-70B-v1.0-GGUF —— 当前提供Q4_K_M量化版本,后续可能增加更多选项
  • GPTQ格式
    • Kotokin/sophosympatheia_Midnight-Miqu-70B-v1.0_GPTQ32G —— 4位32组GPTQ量化版本
  • Exllama2格式
    • 2.24bpw: Dracones/Midnight-Miqu-70B-v1.0_exl2_2.24bpw
    • 3.0bpw: Dracones/Midnight-Miqu-70B-v1.0_exl2_3.0bpw
    • 3.75bpw: altomek/Midnight-Miqu-70B-v1.0-3.75bpw-EXL2
    • 4.0bpw: Dracones/Midnight-Miqu-70B-v1.0_exl2_4.0bpw
    • 4.65bpw: Dracones/Midnight-Miqu-70B-v1.0_exl2_4.65bpw
    • 5.0bpw: Dracones/Midnight-Miqu-70B-v1.0_exl2_5.0bpw
  • 如果您未找到所需的量化版本,建议在Hugging Face平台搜索,可能会发现比本文档记录更新的量化版本

许可与使用限制

152334H/miqu-1-70b-sf基于Mistral某模型的泄露版本构建 所有基于miqu的衍生模型(包括本合并版本)仅限个人使用。虽然Mistral目前对此持宽容态度,但您应当知悉:下载此合并模型意味着您需要承担获取和使用基于泄露权重模型所固有的法律风险。

本合并模型不提供任何形式的担保或保证——想必您对此已有认知。 本人非法律专业人士,也无法断言我们当前涉足领域的法律边界。在使用任何超出私人用途的Hugging Face模型前,您应当咨询法律顾问...但尤其不要将本模型用于非私人用途!

合并方法

本模型采用 mergekit 工具对预训练语言模型进行融合,使用 SLERP 球面线性插值法进行合并。

参与合并的模型

本次合并包含以下模型:

  • 152334H/miqu-1-70b-sf
  • sophosympatheia/Midnight-Rose-70B-v2.0.3

配置参数

生成本模型所使用的 YAML 配置如下:

models:
  - model: /home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf
  - model: /home/llm/mergequant/models/mr-70b-v2.0.3
merge_method: slerp
base_model: /home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf
parameters:
  t:
    - value: [0, 0, 0.2, 0.3, 0.4, 0.5, 0.4, 0.3, 0.2, 0, 0] # Preserving the first and last layers of Miqu untouched is key for good results
  embed_slerp: true # This is super important otherwise the merge will fail
dtype: float16
tokenizer_source: model:/home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf

关于上述配置的简要说明:针对此次模型融合,我尝试了多种不同的t参数组合。虽然我最满意当前采用的参数效果,但以下其他t数组也产生了不错的结果:

  • [0, 0, 0.1, 0.2, 0.4, 0.8, 0.4, 0.2, 0.1, 0, 0] —— 这个配置明显增强了Midnight Rose的特性,但效果与我期望的风格过于接近
  • [0, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0] —— 虽然有效,但可以说是本次测试中效果最不突出的方案
  • [0, 0, 0.1, 0.2, 0.3, 0.35, 0.3, 0.2, 0.1, 0, 0] —— 这是除最终发布版本外我最满意的方案,说明在辅助模型中更偏向Miqu的配置方向是可行的

(注:根据项目信息要求,Midnight Rose作为专业名词保留未译,技术参数数组按规则保持原格式呈现)