Text Generation
Transformers
Safetensors
hy_v4
hunyuan
hy4
Mixture of Experts
conversational
Eval Results
Instructions to use tencent/Hy4-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Hy4-preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tencent/Hy4-preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tencent/Hy4-preview", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/Hy4-preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/Hy4-preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hy4-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tencent/Hy4-preview
- SGLang
How to use tencent/Hy4-preview with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tencent/Hy4-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hy4-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "tencent/Hy4-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hy4-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tencent/Hy4-preview with Docker Model Runner:
docker model run hf.co/tencent/Hy4-preview
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- chat_template.jinja +309 -0
- config.json +303 -0
- generation_config.json +10 -0
- model-00001-of-00131.safetensors +3 -0
- model-00002-of-00131.safetensors +3 -0
- model-00003-of-00131.safetensors +3 -0
- model-00004-of-00131.safetensors +3 -0
- model-00005-of-00131.safetensors +3 -0
- model-00006-of-00131.safetensors +3 -0
- model-00007-of-00131.safetensors +3 -0
- model-00008-of-00131.safetensors +3 -0
- model-00009-of-00131.safetensors +3 -0
- model-00010-of-00131.safetensors +3 -0
- model-00011-of-00131.safetensors +3 -0
- model-00012-of-00131.safetensors +3 -0
- model-00013-of-00131.safetensors +3 -0
- model-00014-of-00131.safetensors +3 -0
- model-00015-of-00131.safetensors +3 -0
- model-00016-of-00131.safetensors +3 -0
- model-00017-of-00131.safetensors +3 -0
- model-00018-of-00131.safetensors +3 -0
- model-00019-of-00131.safetensors +3 -0
- model-00020-of-00131.safetensors +3 -0
- model-00021-of-00131.safetensors +3 -0
- model-00022-of-00131.safetensors +3 -0
- model-00023-of-00131.safetensors +3 -0
- model-00024-of-00131.safetensors +3 -0
- model-00025-of-00131.safetensors +3 -0
- model-00026-of-00131.safetensors +3 -0
- model-00027-of-00131.safetensors +3 -0
- model-00028-of-00131.safetensors +3 -0
- model-00029-of-00131.safetensors +3 -0
- model-00030-of-00131.safetensors +3 -0
- model-00031-of-00131.safetensors +3 -0
- model-00032-of-00131.safetensors +3 -0
- model-00033-of-00131.safetensors +3 -0
- model-00034-of-00131.safetensors +3 -0
- model-00035-of-00131.safetensors +3 -0
- model-00036-of-00131.safetensors +3 -0
- model-00037-of-00131.safetensors +3 -0
- model-00038-of-00131.safetensors +3 -0
- model-00039-of-00131.safetensors +3 -0
- model-00040-of-00131.safetensors +3 -0
- model-00041-of-00131.safetensors +3 -0
- model-00042-of-00131.safetensors +3 -0
- model-00043-of-00131.safetensors +3 -0
- model-00044-of-00131.safetensors +3 -0
- model-00045-of-00131.safetensors +3 -0
- model-00046-of-00131.safetensors +3 -0
- model-00047-of-00131.safetensors +3 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{#- ----------‑‑‑ special token variables ‑‑‑---------- -#}
|
| 2 |
+
{%- set HYTK = ':opensource' %}
|
| 3 |
+
{%- set hy_start_token = '<|hy_start{}|>'.format(HYTK) %}
|
| 4 |
+
{%- set hy_middle_token = '<|hy_middle{}|>'.format(HYTK) %}
|
| 5 |
+
{%- set hy_end_token = '<|hy_end{}|>'.format(HYTK) %}
|
| 6 |
+
{%- set think_begin_token = '<think{}>'.format(HYTK) %}
|
| 7 |
+
{%- set think_end_token = '</think{}>'.format(HYTK) %}
|
| 8 |
+
{%- set toolcalls_begin_token = '<tool_calls{}>'.format(HYTK) %}
|
| 9 |
+
{%- set toolcalls_end_token = '</tool_calls{}>'.format(HYTK) %}
|
| 10 |
+
{%- set toolcall_begin_token = '<tool_call{}>'.format(HYTK) %}
|
| 11 |
+
{%- set toolcall_end_token = '</tool_call{}>'.format(HYTK) %}
|
| 12 |
+
{%- set argkey_begin_token = '<arg_key{}>'.format(HYTK) %}
|
| 13 |
+
{%- set argkey_end_token = '</arg_key{}>'.format(HYTK) %}
|
| 14 |
+
{%- set argvalue_begin_token = '<arg_value{}>'.format(HYTK) %}
|
| 15 |
+
{%- set argvalue_end_token = '</arg_value{}>'.format(HYTK) %}
|
| 16 |
+
{%- set toolresponse_begin_token = '<tool_response{}>'.format(HYTK) %}
|
| 17 |
+
{%- set toolresponse_end_token = '</tool_response{}>'.format(HYTK) %}
|
| 18 |
+
{%- set reasoning_mode_token = '<|reasoning_mode{}|>'.format(HYTK) %}
|
| 19 |
+
|
| 20 |
+
{#- ----------‑‑‑ hyperparameters variables ‑‑‑---------- -#}
|
| 21 |
+
{%- if not add_generation_prompt is defined %}
|
| 22 |
+
{%- set add_generation_prompt = false %}
|
| 23 |
+
{%- endif %}
|
| 24 |
+
{%- if not preserved_thinking is defined %}
|
| 25 |
+
{%- if not tools %}
|
| 26 |
+
{%- set preserved_thinking = false %}
|
| 27 |
+
{%- else %}
|
| 28 |
+
{%- set preserved_thinking = true %}
|
| 29 |
+
{%- endif %}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
|
| 32 |
+
{%- if not reasoning_effort is defined %}
|
| 33 |
+
{%- set reasoning_effort = 'high' %}
|
| 34 |
+
{%- elif reasoning_effort not in ['high', 'no_think'] %}
|
| 35 |
+
{%- if reasoning_effort is none %}
|
| 36 |
+
{{- raise_exception('reasoning_effort error : None, should be no_think/high') }}
|
| 37 |
+
{%- else %}
|
| 38 |
+
{{- raise_exception('reasoning_effort error : ' + reasoning_effort + ', should be no_think/high') }}
|
| 39 |
+
{%- endif %}
|
| 40 |
+
{%- endif %}
|
| 41 |
+
|
| 42 |
+
{%- if fallback_strategy is defined and fallback_strategy == 'reasoning_toolcall_retry' %}
|
| 43 |
+
{%- set reasoning_effort = 'high' %}
|
| 44 |
+
{%- set add_generation_prompt = false %}
|
| 45 |
+
{%- endif %}
|
| 46 |
+
{%- if not raw_last_assistant is defined %}
|
| 47 |
+
{%- set raw_last_assistant = false %}
|
| 48 |
+
{%- endif %}
|
| 49 |
+
|
| 50 |
+
{%- macro tool_to_json(tool) -%}
|
| 51 |
+
{%- set ns_tool = namespace(first=true) -%}
|
| 52 |
+
{{- '{' -}}
|
| 53 |
+
{%- for k, v in tool.items() -%}
|
| 54 |
+
{%- if k != 'defer_loading' and k != 'strict' -%}
|
| 55 |
+
{%- if not ns_tool.first -%}{{- ', ' -}}{%- endif -%}
|
| 56 |
+
{%- set ns_tool.first = false -%}
|
| 57 |
+
{{- '"' ~ k ~ '": ' ~ (v | tojson(ensure_ascii=False)) -}}
|
| 58 |
+
{%- endif -%}
|
| 59 |
+
{%- endfor -%}
|
| 60 |
+
{{- '}' -}}
|
| 61 |
+
{%- endmacro -%}
|
| 62 |
+
|
| 63 |
+
{%- macro render_content(content) -%}
|
| 64 |
+
{%- if content is string -%}
|
| 65 |
+
{{- content -}}
|
| 66 |
+
{%- elif content is iterable and content is not mapping -%}
|
| 67 |
+
{%- for item in content -%}
|
| 68 |
+
{%- if item is mapping and item.type == 'text' -%}
|
| 69 |
+
{{- item.text -}}
|
| 70 |
+
{%- elif item is string -%}
|
| 71 |
+
{{- item -}}
|
| 72 |
+
{%- else -%}
|
| 73 |
+
{{- item | string -}}
|
| 74 |
+
{%- endif -%}
|
| 75 |
+
{%- endfor -%}
|
| 76 |
+
{%- elif content is none -%}
|
| 77 |
+
{{- '' -}}
|
| 78 |
+
{%- else -%}
|
| 79 |
+
{{- content | string -}}
|
| 80 |
+
{%- endif -%}
|
| 81 |
+
{%- endmacro -%}
|
| 82 |
+
|
| 83 |
+
{%- macro render_tools_prompt() -%}
|
| 84 |
+
{{- '# Tools\n\nYou may call one or more functions to assist with the user query.' -}}
|
| 85 |
+
{{- '\n\nYou are provided with function signatures within <tools></tools> XML tags:' -}}
|
| 86 |
+
{{- '\n<tools>\n' -}}
|
| 87 |
+
{%- set tool_ns = namespace(first=true) -%}
|
| 88 |
+
{%- for tool in tools -%}
|
| 89 |
+
{%- set t = tool['function'] if tool is mapping and 'function' in tool else tool -%}
|
| 90 |
+
{%- if t.defer_loading is not defined or not t.defer_loading -%}
|
| 91 |
+
{%- if not tool_ns.first -%}{{- '\n' -}}{%- endif -%}
|
| 92 |
+
{%- set tool_ns.first = false -%}
|
| 93 |
+
{{- tool_to_json(t) -}}
|
| 94 |
+
{%- endif -%}
|
| 95 |
+
{%- endfor -%}
|
| 96 |
+
{{- '\n</tools>\n\n' -}}
|
| 97 |
+
{{- 'For function call returns, you should first print ' ~ toolcalls_begin_token -}}
|
| 98 |
+
{{- '\nFor each function call, you should return object like:\n' -}}
|
| 99 |
+
{{- toolcall_begin_token ~ '{function-name}' -}}
|
| 100 |
+
{{- argkey_begin_token ~ '{arg-key-1}' ~ argkey_end_token -}}
|
| 101 |
+
{{- argvalue_begin_token ~ '{arg-value-1}' ~ argvalue_end_token -}}
|
| 102 |
+
{{- argkey_begin_token ~ '{arg-key-2}' ~ argkey_end_token -}}
|
| 103 |
+
{{- argvalue_begin_token ~ '{arg-value-2}' ~ argvalue_end_token -}}
|
| 104 |
+
{{- '...' -}}
|
| 105 |
+
{{- toolcall_end_token -}}
|
| 106 |
+
{{- '\nAt the end of function call returns, you should print ' ~ toolcalls_end_token -}}
|
| 107 |
+
{%- endmacro -%}
|
| 108 |
+
|
| 109 |
+
{%- macro render_tool_response(message) -%}
|
| 110 |
+
{%- set content = message['content'] -%}
|
| 111 |
+
{%- if content is string -%}
|
| 112 |
+
{{- toolresponse_begin_token ~ content ~ toolresponse_end_token -}}
|
| 113 |
+
{%- elif content is iterable and content is not mapping and content and content[0] is mapping and content[0].type == 'tool_reference' -%}
|
| 114 |
+
{{- toolresponse_begin_token -}}
|
| 115 |
+
{{- '<tools>\n' -}}
|
| 116 |
+
{%- for tr in content -%}
|
| 117 |
+
{%- for tool in tools -%}
|
| 118 |
+
{%- set t = tool['function'] if tool is mapping and 'function' in tool else tool -%}
|
| 119 |
+
{%- if t.name == tr.name -%}
|
| 120 |
+
{{- tool_to_json(t) ~ '\n' -}}
|
| 121 |
+
{%- endif -%}
|
| 122 |
+
{%- endfor -%}
|
| 123 |
+
{%- endfor -%}
|
| 124 |
+
{{- '</tools>' -}}
|
| 125 |
+
{{- toolresponse_end_token -}}
|
| 126 |
+
{%- elif content is iterable and content is not mapping and content and content[0] is mapping and content[0].output is defined -%}
|
| 127 |
+
{%- for tr in content -%}
|
| 128 |
+
{{- toolresponse_begin_token ~ tr.output ~ toolresponse_end_token -}}
|
| 129 |
+
{%- endfor -%}
|
| 130 |
+
{%- else -%}
|
| 131 |
+
{{- toolresponse_begin_token ~ render_content(content) ~ toolresponse_end_token -}}
|
| 132 |
+
{%- endif -%}
|
| 133 |
+
{%- endmacro -%}
|
| 134 |
+
|
| 135 |
+
{#- consecutive tool messages are clustered into a single tool message whose content is the list of the original tool messages; the result is written to merged_ns.messages (a macro cannot return a list) -#}
|
| 136 |
+
{%- set merged_ns = namespace(messages=[]) %}
|
| 137 |
+
{%- macro merge_tool_responses(messages) -%}
|
| 138 |
+
{%- set merge_ns = namespace(result=[], cluster=[]) -%}
|
| 139 |
+
{%- for message in messages -%}
|
| 140 |
+
{%- if message['role'] == 'tool' -%}
|
| 141 |
+
{%- set merge_ns.cluster = merge_ns.cluster + [message] -%}
|
| 142 |
+
{%- else -%}
|
| 143 |
+
{%- if merge_ns.cluster -%}
|
| 144 |
+
{%- set merge_ns.result = merge_ns.result + [{'role': 'tool', 'content': merge_ns.cluster}] -%}
|
| 145 |
+
{%- set merge_ns.cluster = [] -%}
|
| 146 |
+
{%- endif -%}
|
| 147 |
+
{%- set merge_ns.result = merge_ns.result + [message] -%}
|
| 148 |
+
{%- endif -%}
|
| 149 |
+
{%- endfor -%}
|
| 150 |
+
{%- if merge_ns.cluster -%}
|
| 151 |
+
{%- set merge_ns.result = merge_ns.result + [{'role': 'tool', 'content': merge_ns.cluster}] -%}
|
| 152 |
+
{%- endif -%}
|
| 153 |
+
{%- set merged_ns.messages = merge_ns.result -%}
|
| 154 |
+
{%- endmacro -%}
|
| 155 |
+
|
| 156 |
+
{#- render one tool cluster, reordered to follow the tool_call order of the preceding assistant turn; any missing / ambiguous id falls back to the original tool message order for the whole cluster -#}
|
| 157 |
+
{%- macro render_tool_responses(tool_messages, tool_call_ids) -%}
|
| 158 |
+
{%- set order_ns = namespace(ordered=[], matched=true) -%}
|
| 159 |
+
{%- if tool_call_ids and tool_call_ids | length == tool_messages | length -%}
|
| 160 |
+
{%- for tool_call_id in tool_call_ids -%}
|
| 161 |
+
{%- set hit_ns = namespace(count=0, message=none) -%}
|
| 162 |
+
{%- for tool_message in tool_messages -%}
|
| 163 |
+
{%- set message_id = tool_message['tool_call_id'] if tool_message['tool_call_id'] is defined else tool_message['id'] -%}
|
| 164 |
+
{%- if message_id is defined and message_id == tool_call_id -%}
|
| 165 |
+
{%- set hit_ns.count = hit_ns.count + 1 -%}
|
| 166 |
+
{%- set hit_ns.message = tool_message -%}
|
| 167 |
+
{%- endif -%}
|
| 168 |
+
{%- endfor -%}
|
| 169 |
+
{%- if hit_ns.count == 1 -%}
|
| 170 |
+
{%- set order_ns.ordered = order_ns.ordered + [hit_ns.message] -%}
|
| 171 |
+
{%- else -%}
|
| 172 |
+
{%- set order_ns.matched = false -%}
|
| 173 |
+
{%- endif -%}
|
| 174 |
+
{%- endfor -%}
|
| 175 |
+
{%- else -%}
|
| 176 |
+
{%- set order_ns.matched = false -%}
|
| 177 |
+
{%- endif -%}
|
| 178 |
+
{%- for tool_message in (order_ns.ordered if order_ns.matched else tool_messages) -%}
|
| 179 |
+
{{- render_tool_response(tool_message) -}}
|
| 180 |
+
{%- endfor -%}
|
| 181 |
+
{%- endmacro -%}
|
| 182 |
+
|
| 183 |
+
{%- set _ = merge_tool_responses(messages) %}
|
| 184 |
+
{%- set normed_messages = merged_ns.messages %}
|
| 185 |
+
|
| 186 |
+
{%- set ns = namespace(last_user_index=-1, has_leading_system=false) %}
|
| 187 |
+
{%- if normed_messages and normed_messages[0].role == 'system' %}
|
| 188 |
+
{%- set ns.has_leading_system = true %}
|
| 189 |
+
{%- endif %}
|
| 190 |
+
{%- for message in normed_messages %}
|
| 191 |
+
{%- if message['role'] == 'user' %}
|
| 192 |
+
{%- set ns.last_user_index = loop.index0 %}
|
| 193 |
+
{%- endif %}
|
| 194 |
+
{%- endfor %}
|
| 195 |
+
|
| 196 |
+
{#- no leading system: synthesize one for tools and/or reasoning_mode -#}
|
| 197 |
+
{%- if not ns.has_leading_system %}
|
| 198 |
+
{{- hy_start_token ~ 'system' ~ hy_middle_token -}}
|
| 199 |
+
{%- if tools %}
|
| 200 |
+
{{- render_tools_prompt() -}}
|
| 201 |
+
{%- endif %}
|
| 202 |
+
{{- reasoning_mode_token ~ 'reasoning_effort:' ~ reasoning_effort -}}
|
| 203 |
+
{{- hy_end_token -}}
|
| 204 |
+
{%- endif %}
|
| 205 |
+
|
| 206 |
+
{%- set last_ns = namespace(last_is_assistant=false) %}
|
| 207 |
+
{%- set prev_ns = namespace(tool_call_ids=[]) %}
|
| 208 |
+
{%- for message in normed_messages %}
|
| 209 |
+
{%- if message['role'] == 'system' %}
|
| 210 |
+
{{- hy_start_token ~ 'system' ~ hy_middle_token -}}
|
| 211 |
+
{#- tools / reasoning_mode only attach to the leading system (messages[0]) -#}
|
| 212 |
+
{%- if loop.first %}
|
| 213 |
+
{%- if tools %}
|
| 214 |
+
{{- render_tools_prompt() -}}
|
| 215 |
+
{%- endif %}
|
| 216 |
+
{%- set content = render_content(message['content']) -%}
|
| 217 |
+
{%- if tools and content -%}
|
| 218 |
+
{{- '\n\n' -}}
|
| 219 |
+
{%- endif -%}
|
| 220 |
+
{{- content -}}
|
| 221 |
+
{{- reasoning_mode_token ~ 'reasoning_effort:' ~ reasoning_effort -}}
|
| 222 |
+
{%- else %}
|
| 223 |
+
{{- render_content(message['content']) -}}
|
| 224 |
+
{%- endif %}
|
| 225 |
+
{{- hy_end_token -}}
|
| 226 |
+
{%- elif message['role'] == 'user' %}
|
| 227 |
+
{{- hy_start_token ~ 'user' ~ hy_middle_token -}}
|
| 228 |
+
{{- render_content(message['content']) -}}
|
| 229 |
+
{{- hy_end_token -}}
|
| 230 |
+
{%- elif message['role'] == 'assistant' %}
|
| 231 |
+
{%- set content_body = render_content(message['content']) -%}
|
| 232 |
+
{#- 'reasoning' takes precedence, fall back to 'reasoning_content' when it is empty -#}
|
| 233 |
+
{%- set reasoning_text = '' %}
|
| 234 |
+
{%- if message['reasoning'] is defined and message['reasoning'] is string and message['reasoning'] %}
|
| 235 |
+
{%- set reasoning_text = message['reasoning'] %}
|
| 236 |
+
{%- elif message['reasoning_content'] is defined and message['reasoning_content'] is string and message['reasoning_content'] %}
|
| 237 |
+
{%- set reasoning_text = message['reasoning_content'] %}
|
| 238 |
+
{%- endif %}
|
| 239 |
+
{#- no_think overrides preserved_thinking: history is always emitted with empty think tags -#}
|
| 240 |
+
{%- if reasoning_effort != 'no_think' and (preserved_thinking or loop.index0 > ns.last_user_index) and reasoning_text %}
|
| 241 |
+
{%- set content = think_begin_token ~ reasoning_text ~ think_end_token ~ content_body %}
|
| 242 |
+
{%- else %}
|
| 243 |
+
{%- set content = think_begin_token ~ think_end_token ~ content_body %}
|
| 244 |
+
{%- endif %}
|
| 245 |
+
{{- hy_start_token ~ 'assistant' ~ hy_middle_token -}}
|
| 246 |
+
{%- if message['tool_calls'] is defined and message['tool_calls'] %}
|
| 247 |
+
{#- remember the tool_call ids of this turn to order the following tool responses; an incomplete id set means "do not reorder" -#}
|
| 248 |
+
{%- set ids_ns = namespace(ids=[], complete=true) %}
|
| 249 |
+
{%- for tool in message['tool_calls'] %}
|
| 250 |
+
{%- set tool_call_id = tool['id'] if tool['id'] is defined and tool['id'] else tool['tool_call_id'] %}
|
| 251 |
+
{%- if tool_call_id is defined and tool_call_id %}
|
| 252 |
+
{%- set ids_ns.ids = ids_ns.ids + [tool_call_id] %}
|
| 253 |
+
{%- else %}
|
| 254 |
+
{%- set ids_ns.complete = false %}
|
| 255 |
+
{%- endif %}
|
| 256 |
+
{%- endfor %}
|
| 257 |
+
{%- set prev_ns.tool_call_ids = ids_ns.ids if ids_ns.complete else [] %}
|
| 258 |
+
{{- content -}}
|
| 259 |
+
{{- toolcalls_begin_token -}}
|
| 260 |
+
{%- for tool in message['tool_calls'] -%}
|
| 261 |
+
{%- set func = tool['function'] if tool is mapping and 'function' in tool else tool -%}
|
| 262 |
+
{%- set arguments = func['arguments'] -%}
|
| 263 |
+
{{- toolcall_begin_token ~ func['name'] -}}
|
| 264 |
+
{%- for key, value in arguments.items() -%}
|
| 265 |
+
{{- argkey_begin_token ~ key ~ argkey_end_token -}}
|
| 266 |
+
{%- if value is not string -%}
|
| 267 |
+
{%- set value = value | tojson(ensure_ascii=False) -%}
|
| 268 |
+
{%- endif -%}
|
| 269 |
+
{{- argvalue_begin_token ~ value ~ argvalue_end_token -}}
|
| 270 |
+
{%- endfor -%}
|
| 271 |
+
{{- toolcall_end_token -}}
|
| 272 |
+
{%- endfor -%}
|
| 273 |
+
{{- toolcalls_end_token -}}
|
| 274 |
+
{%- else %}
|
| 275 |
+
{%- if loop.last and raw_last_assistant %}
|
| 276 |
+
{{- content_body -}}
|
| 277 |
+
{%- else %}
|
| 278 |
+
{{- content -}}
|
| 279 |
+
{%- endif %}
|
| 280 |
+
{%- endif %}
|
| 281 |
+
{#- continuation / prefill: last assistant is still open, do not close with hy_end -#}
|
| 282 |
+
{%- if not (loop.last and raw_last_assistant) %}
|
| 283 |
+
{{- hy_end_token -}}
|
| 284 |
+
{%- endif %}
|
| 285 |
+
{%- elif message['role'] == 'tool' %}
|
| 286 |
+
{{- hy_start_token ~ 'tool' ~ hy_middle_token -}}
|
| 287 |
+
{{- render_tool_responses(message['content'], prev_ns.tool_call_ids) -}}
|
| 288 |
+
{{- hy_end_token -}}
|
| 289 |
+
{%- else %}
|
| 290 |
+
{{- hy_start_token ~ message['role'] ~ hy_middle_token -}}
|
| 291 |
+
{{- render_content(message['content']) -}}
|
| 292 |
+
{{- hy_end_token -}}
|
| 293 |
+
{%- endif %}
|
| 294 |
+
{%- if message['role'] != 'assistant' or not (message['tool_calls'] is defined and message['tool_calls']) %}
|
| 295 |
+
{%- set prev_ns.tool_call_ids = [] %}
|
| 296 |
+
{%- endif %}
|
| 297 |
+
{%- if loop.last and message['role'] == 'assistant' %}
|
| 298 |
+
{%- set last_ns.last_is_assistant = true %}
|
| 299 |
+
{%- endif %}
|
| 300 |
+
{%- endfor %}
|
| 301 |
+
{%- if add_generation_prompt %}
|
| 302 |
+
{%- if not last_ns.last_is_assistant %}
|
| 303 |
+
{%- if reasoning_effort == 'no_think' %}
|
| 304 |
+
{{- hy_start_token ~ 'assistant' ~ hy_middle_token ~ think_begin_token ~ think_end_token -}}
|
| 305 |
+
{%- else %}
|
| 306 |
+
{{- hy_start_token ~ 'assistant' ~ hy_middle_token ~ think_begin_token -}}
|
| 307 |
+
{%- endif %}
|
| 308 |
+
{%- endif %}
|
| 309 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"HYV4ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bitwise_backward_align": false,
|
| 8 |
+
"bos_token_id": 120000,
|
| 9 |
+
"dtype": "bfloat16",
|
| 10 |
+
"enable_ihc": true,
|
| 11 |
+
"enable_lm_head_fp32": true,
|
| 12 |
+
"eos_token_id": 120025,
|
| 13 |
+
"gated_mla": true,
|
| 14 |
+
"gating_type": "elementwise",
|
| 15 |
+
"hc_eps": 1e-06,
|
| 16 |
+
"hc_magnitude": 2.0,
|
| 17 |
+
"hc_mult": 4,
|
| 18 |
+
"head_dim": 64,
|
| 19 |
+
"hidden_act": "silu",
|
| 20 |
+
"hidden_size": 6144,
|
| 21 |
+
"index_head_dim": 128,
|
| 22 |
+
"index_n_heads": 32,
|
| 23 |
+
"index_topk": 2048,
|
| 24 |
+
"indexer_types": [
|
| 25 |
+
"full",
|
| 26 |
+
"full",
|
| 27 |
+
"shared",
|
| 28 |
+
"shared",
|
| 29 |
+
"shared",
|
| 30 |
+
"full",
|
| 31 |
+
"shared",
|
| 32 |
+
"shared",
|
| 33 |
+
"shared",
|
| 34 |
+
"full",
|
| 35 |
+
"shared",
|
| 36 |
+
"shared",
|
| 37 |
+
"shared",
|
| 38 |
+
"full",
|
| 39 |
+
"shared",
|
| 40 |
+
"shared",
|
| 41 |
+
"shared",
|
| 42 |
+
"full",
|
| 43 |
+
"shared",
|
| 44 |
+
"shared",
|
| 45 |
+
"shared",
|
| 46 |
+
"full",
|
| 47 |
+
"shared",
|
| 48 |
+
"shared",
|
| 49 |
+
"shared",
|
| 50 |
+
"full",
|
| 51 |
+
"shared",
|
| 52 |
+
"shared",
|
| 53 |
+
"shared",
|
| 54 |
+
"full",
|
| 55 |
+
"shared",
|
| 56 |
+
"shared",
|
| 57 |
+
"shared",
|
| 58 |
+
"full",
|
| 59 |
+
"shared",
|
| 60 |
+
"shared",
|
| 61 |
+
"shared",
|
| 62 |
+
"full",
|
| 63 |
+
"shared",
|
| 64 |
+
"shared",
|
| 65 |
+
"shared",
|
| 66 |
+
"full",
|
| 67 |
+
"shared",
|
| 68 |
+
"shared",
|
| 69 |
+
"shared",
|
| 70 |
+
"full",
|
| 71 |
+
"shared",
|
| 72 |
+
"shared",
|
| 73 |
+
"shared",
|
| 74 |
+
"full",
|
| 75 |
+
"shared",
|
| 76 |
+
"shared",
|
| 77 |
+
"shared",
|
| 78 |
+
"full",
|
| 79 |
+
"shared",
|
| 80 |
+
"shared",
|
| 81 |
+
"shared",
|
| 82 |
+
"full",
|
| 83 |
+
"shared",
|
| 84 |
+
"shared",
|
| 85 |
+
"shared",
|
| 86 |
+
"full",
|
| 87 |
+
"shared",
|
| 88 |
+
"shared",
|
| 89 |
+
"shared",
|
| 90 |
+
"full",
|
| 91 |
+
"shared",
|
| 92 |
+
"shared",
|
| 93 |
+
"shared",
|
| 94 |
+
"full",
|
| 95 |
+
"shared",
|
| 96 |
+
"shared",
|
| 97 |
+
"shared",
|
| 98 |
+
"full",
|
| 99 |
+
"shared",
|
| 100 |
+
"shared",
|
| 101 |
+
"shared",
|
| 102 |
+
"full"
|
| 103 |
+
],
|
| 104 |
+
"initializer_range": 0.006,
|
| 105 |
+
"intermediate_size": 18432,
|
| 106 |
+
"kv_lora_rank": 512,
|
| 107 |
+
"layer_types": [
|
| 108 |
+
"deepseek_sparse_attention",
|
| 109 |
+
"deepseek_sparse_attention",
|
| 110 |
+
"deepseek_sparse_attention",
|
| 111 |
+
"deepseek_sparse_attention",
|
| 112 |
+
"deepseek_sparse_attention",
|
| 113 |
+
"deepseek_sparse_attention",
|
| 114 |
+
"deepseek_sparse_attention",
|
| 115 |
+
"deepseek_sparse_attention",
|
| 116 |
+
"deepseek_sparse_attention",
|
| 117 |
+
"deepseek_sparse_attention",
|
| 118 |
+
"deepseek_sparse_attention",
|
| 119 |
+
"deepseek_sparse_attention",
|
| 120 |
+
"deepseek_sparse_attention",
|
| 121 |
+
"deepseek_sparse_attention",
|
| 122 |
+
"deepseek_sparse_attention",
|
| 123 |
+
"deepseek_sparse_attention",
|
| 124 |
+
"deepseek_sparse_attention",
|
| 125 |
+
"deepseek_sparse_attention",
|
| 126 |
+
"deepseek_sparse_attention",
|
| 127 |
+
"deepseek_sparse_attention",
|
| 128 |
+
"deepseek_sparse_attention",
|
| 129 |
+
"deepseek_sparse_attention",
|
| 130 |
+
"deepseek_sparse_attention",
|
| 131 |
+
"deepseek_sparse_attention",
|
| 132 |
+
"deepseek_sparse_attention",
|
| 133 |
+
"deepseek_sparse_attention",
|
| 134 |
+
"deepseek_sparse_attention",
|
| 135 |
+
"deepseek_sparse_attention",
|
| 136 |
+
"deepseek_sparse_attention",
|
| 137 |
+
"deepseek_sparse_attention",
|
| 138 |
+
"deepseek_sparse_attention",
|
| 139 |
+
"deepseek_sparse_attention",
|
| 140 |
+
"deepseek_sparse_attention",
|
| 141 |
+
"deepseek_sparse_attention",
|
| 142 |
+
"deepseek_sparse_attention",
|
| 143 |
+
"deepseek_sparse_attention",
|
| 144 |
+
"deepseek_sparse_attention",
|
| 145 |
+
"deepseek_sparse_attention",
|
| 146 |
+
"deepseek_sparse_attention",
|
| 147 |
+
"deepseek_sparse_attention",
|
| 148 |
+
"deepseek_sparse_attention",
|
| 149 |
+
"deepseek_sparse_attention",
|
| 150 |
+
"deepseek_sparse_attention",
|
| 151 |
+
"deepseek_sparse_attention",
|
| 152 |
+
"deepseek_sparse_attention",
|
| 153 |
+
"deepseek_sparse_attention",
|
| 154 |
+
"deepseek_sparse_attention",
|
| 155 |
+
"deepseek_sparse_attention",
|
| 156 |
+
"deepseek_sparse_attention",
|
| 157 |
+
"deepseek_sparse_attention",
|
| 158 |
+
"deepseek_sparse_attention",
|
| 159 |
+
"deepseek_sparse_attention",
|
| 160 |
+
"deepseek_sparse_attention",
|
| 161 |
+
"deepseek_sparse_attention",
|
| 162 |
+
"deepseek_sparse_attention",
|
| 163 |
+
"deepseek_sparse_attention",
|
| 164 |
+
"deepseek_sparse_attention",
|
| 165 |
+
"deepseek_sparse_attention",
|
| 166 |
+
"deepseek_sparse_attention",
|
| 167 |
+
"deepseek_sparse_attention",
|
| 168 |
+
"deepseek_sparse_attention",
|
| 169 |
+
"deepseek_sparse_attention",
|
| 170 |
+
"deepseek_sparse_attention",
|
| 171 |
+
"deepseek_sparse_attention",
|
| 172 |
+
"deepseek_sparse_attention",
|
| 173 |
+
"deepseek_sparse_attention",
|
| 174 |
+
"deepseek_sparse_attention",
|
| 175 |
+
"deepseek_sparse_attention",
|
| 176 |
+
"deepseek_sparse_attention",
|
| 177 |
+
"deepseek_sparse_attention",
|
| 178 |
+
"deepseek_sparse_attention",
|
| 179 |
+
"deepseek_sparse_attention",
|
| 180 |
+
"deepseek_sparse_attention",
|
| 181 |
+
"deepseek_sparse_attention",
|
| 182 |
+
"deepseek_sparse_attention",
|
| 183 |
+
"deepseek_sparse_attention",
|
| 184 |
+
"deepseek_sparse_attention",
|
| 185 |
+
"deepseek_sparse_attention"
|
| 186 |
+
],
|
| 187 |
+
"learnable_sink": true,
|
| 188 |
+
"learnable_sink_init": 0.0,
|
| 189 |
+
"max_position_embeddings": 1048576,
|
| 190 |
+
"mlp_layer_types": [
|
| 191 |
+
"dense",
|
| 192 |
+
"sparse",
|
| 193 |
+
"sparse",
|
| 194 |
+
"sparse",
|
| 195 |
+
"sparse",
|
| 196 |
+
"sparse",
|
| 197 |
+
"sparse",
|
| 198 |
+
"sparse",
|
| 199 |
+
"sparse",
|
| 200 |
+
"sparse",
|
| 201 |
+
"sparse",
|
| 202 |
+
"sparse",
|
| 203 |
+
"sparse",
|
| 204 |
+
"sparse",
|
| 205 |
+
"sparse",
|
| 206 |
+
"sparse",
|
| 207 |
+
"sparse",
|
| 208 |
+
"sparse",
|
| 209 |
+
"sparse",
|
| 210 |
+
"sparse",
|
| 211 |
+
"sparse",
|
| 212 |
+
"sparse",
|
| 213 |
+
"sparse",
|
| 214 |
+
"sparse",
|
| 215 |
+
"sparse",
|
| 216 |
+
"sparse",
|
| 217 |
+
"sparse",
|
| 218 |
+
"sparse",
|
| 219 |
+
"sparse",
|
| 220 |
+
"sparse",
|
| 221 |
+
"sparse",
|
| 222 |
+
"sparse",
|
| 223 |
+
"sparse",
|
| 224 |
+
"sparse",
|
| 225 |
+
"sparse",
|
| 226 |
+
"sparse",
|
| 227 |
+
"sparse",
|
| 228 |
+
"sparse",
|
| 229 |
+
"sparse",
|
| 230 |
+
"sparse",
|
| 231 |
+
"sparse",
|
| 232 |
+
"sparse",
|
| 233 |
+
"sparse",
|
| 234 |
+
"sparse",
|
| 235 |
+
"sparse",
|
| 236 |
+
"sparse",
|
| 237 |
+
"sparse",
|
| 238 |
+
"sparse",
|
| 239 |
+
"sparse",
|
| 240 |
+
"sparse",
|
| 241 |
+
"sparse",
|
| 242 |
+
"sparse",
|
| 243 |
+
"sparse",
|
| 244 |
+
"sparse",
|
| 245 |
+
"sparse",
|
| 246 |
+
"sparse",
|
| 247 |
+
"sparse",
|
| 248 |
+
"sparse",
|
| 249 |
+
"sparse",
|
| 250 |
+
"sparse",
|
| 251 |
+
"sparse",
|
| 252 |
+
"sparse",
|
| 253 |
+
"sparse",
|
| 254 |
+
"sparse",
|
| 255 |
+
"sparse",
|
| 256 |
+
"sparse",
|
| 257 |
+
"sparse",
|
| 258 |
+
"sparse",
|
| 259 |
+
"sparse",
|
| 260 |
+
"sparse",
|
| 261 |
+
"sparse",
|
| 262 |
+
"sparse",
|
| 263 |
+
"sparse",
|
| 264 |
+
"sparse",
|
| 265 |
+
"sparse",
|
| 266 |
+
"sparse",
|
| 267 |
+
"sparse",
|
| 268 |
+
"sparse"
|
| 269 |
+
],
|
| 270 |
+
"model_type": "hy_v4",
|
| 271 |
+
"moe_intermediate_size": 2048,
|
| 272 |
+
"mtp_loss_factor": 0.1,
|
| 273 |
+
"n_group": 1,
|
| 274 |
+
"n_routed_experts": 256,
|
| 275 |
+
"n_shared_experts": 1,
|
| 276 |
+
"norm_topk_prob": true,
|
| 277 |
+
"num_attention_heads": 64,
|
| 278 |
+
"num_experts_per_tok": 8,
|
| 279 |
+
"num_hidden_layers": 78,
|
| 280 |
+
"num_key_value_heads": 8,
|
| 281 |
+
"num_nextn_predict_layers": 1,
|
| 282 |
+
"pad_token_id": 120002,
|
| 283 |
+
"q_lora_rank": 2048,
|
| 284 |
+
"qk_head_dim": 256,
|
| 285 |
+
"qk_nope_head_dim": 192,
|
| 286 |
+
"qk_rope_head_dim": 64,
|
| 287 |
+
"rms_norm_eps": 1e-05,
|
| 288 |
+
"rope_parameters": {
|
| 289 |
+
"rope_theta": 10000000,
|
| 290 |
+
"rope_type": "default"
|
| 291 |
+
},
|
| 292 |
+
"routed_scaling_factor": 2.827,
|
| 293 |
+
"swiglu_limit": 10.0,
|
| 294 |
+
"tie_word_embeddings": false,
|
| 295 |
+
"topk_group": 1,
|
| 296 |
+
"transformers_version": "5.10.2",
|
| 297 |
+
"use_cache": true,
|
| 298 |
+
"use_dsa": true,
|
| 299 |
+
"use_mla": true,
|
| 300 |
+
"v_head_dim": 256,
|
| 301 |
+
"vocab_size": 120832,
|
| 302 |
+
"torch_dtype": "bfloat16"
|
| 303 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 120000,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": 120025,
|
| 5 |
+
"pad_token_id": 120002,
|
| 6 |
+
"temperature": 0.9,
|
| 7 |
+
"top_k": -1,
|
| 8 |
+
"top_p": 1,
|
| 9 |
+
"transformers_version": "5.10.2"
|
| 10 |
+
}
|
model-00001-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1466bb060b882d4c87cfc08a9b75e6693eca42dccea62ceb654ab6e1aac146c
|
| 3 |
+
size 19327353080
|
model-00002-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68508b2930a22ea7647b82becdddb7424d6b9569446b985f9977a76276faf661
|
| 3 |
+
size 19327353080
|
model-00003-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:343973567fefac38c5bb05bc731c85c7dcf203a11e6d53b962888cf940bc0518
|
| 3 |
+
size 19327353080
|
model-00004-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b230b1208a74cd5b287fca5e5864fca113c55a5bafc2d139d2133f479fce3391
|
| 3 |
+
size 19327353080
|
model-00005-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d672431ffd2b4e8c89234129155fe6835ccee8861bb7c4ffc8b5bd1b08c01f4d
|
| 3 |
+
size 19327353080
|
model-00006-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c32701f46b426fcbdd2ce30affedf397349242d292c6aac444fab00695f2b57
|
| 3 |
+
size 19327353080
|
model-00007-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:316642aaf64a434cc926e4c8225679aca8d173f3007ef00d8f6fa304c138a450
|
| 3 |
+
size 19327353080
|
model-00008-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0566210325918eeab2efeb5208802d124260f901725060c42e9c70a4c989d10
|
| 3 |
+
size 19327353080
|
model-00009-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1289a27921de91ea47be3c781a69b45b2861fad0aff4beeeb82a169096f1fdd
|
| 3 |
+
size 19327353080
|
model-00010-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f2c7046ffbfa7ffadf42dc85003f359f792e5b81751a906946e6f3ec53d0ce3c
|
| 3 |
+
size 19327353080
|
model-00011-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37577ce86c912e109a720faa23e5a4a09bbad2f527936b14c933fdcf43847ee7
|
| 3 |
+
size 19327353080
|
model-00012-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e239142bd5cb88a870d6f58b01914210f1e5d95dff40f1d95aa981e56acabdab
|
| 3 |
+
size 19327353080
|
model-00013-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df14d26d081bcfe5c892313520a8f21b4d7e337e284c64695915ed4dd3e935b7
|
| 3 |
+
size 19327353080
|
model-00014-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:27e7bddd536feab082d99627b0344f641391a2b1d44abc1c271ceb5cf1f6ca1d
|
| 3 |
+
size 19327353080
|
model-00015-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72b89829d36cc44ba93666f7419cb00f4d5632e4cd133f2b7e8f65582a7164ca
|
| 3 |
+
size 19327353080
|
model-00016-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f43c8fe56c3e7f458bb937304175928b7b49fd00bc7c62d3f7191bd44a1526e
|
| 3 |
+
size 19327353080
|
model-00017-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16d41f11e9b20b75d06350b4500f09e61dda98d583e2b6a12bdda6e3077dad1d
|
| 3 |
+
size 19327353080
|
model-00018-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43dfb68201f039c6f581a41bebdfd525e1ca495d583a97da9a0250a5f6b7364b
|
| 3 |
+
size 19327353080
|
model-00019-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bafdb0a78d19162c42757978cfe4e207f211a6848b234dee670be15d5dc00489
|
| 3 |
+
size 19327353080
|
model-00020-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dfe43cd45a1416d6781f77f185cedaa1f56acdfb036f763b36afc82ffb8b4662
|
| 3 |
+
size 19327353080
|
model-00021-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba8e49b122610d1aa425b4e36bbccf550f5e1bbdf8f89fbf6e18e04135ab354b
|
| 3 |
+
size 19327353080
|
model-00022-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:079f32996be0b68d0d3b018c61cb629b228ab98e2bf2cb225472cc5c45951767
|
| 3 |
+
size 19327353080
|
model-00023-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:376bf897344aaa2da57d0922d7d94388ce30b16aedb48435460b31ef0491efa6
|
| 3 |
+
size 19327353080
|
model-00024-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6763ca348236b1ff599f3665f4cce97a4772e082c7a488009508d234f16c4f8
|
| 3 |
+
size 19327353080
|
model-00025-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:038418e953a56bb6d2aeda5bb884a4d6281aff2d7fab5d667f22ace228e45028
|
| 3 |
+
size 19327353080
|
model-00026-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c050711221e81d5b7b443808f04544f938bb73fb38928ab003afd4abffd638e5
|
| 3 |
+
size 19327353080
|
model-00027-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e9b1b92fa85fa7d106bafd8093fc36f79fa6b58a2abaf80e0a7a436e08d0b9c
|
| 3 |
+
size 19327353080
|
model-00028-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9fe69006d0227e0157fda8829c0cfa1f1ef9ada7a6589ae8aca923988999a8e8
|
| 3 |
+
size 19327353080
|
model-00029-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd81f732d5f0084c9814b2331beee41af9251f2c29a68a750da6bec4b227cec2
|
| 3 |
+
size 19327353080
|
model-00030-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b87d30c9be1472756b4b8c64c3e6902ce6babf00a92b2cdebce8a448e3efa3d0
|
| 3 |
+
size 19327353080
|
model-00031-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:086bec982d81615b961a1e10ac9c9cb816859735dbce7e757190e99a03b8f793
|
| 3 |
+
size 19327353080
|
model-00032-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac221e822f6f78f1432911723a807febecc94f4c24e01dc21a73a13cc5812d3a
|
| 3 |
+
size 19327353080
|
model-00033-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d732a2dc94b96c24d98a29bb9de54e3c9a7fac9d34c08399bf36be361382a8c
|
| 3 |
+
size 19327353080
|
model-00034-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e6554c7282959edb36c251d53483b3f96971efd81cc8d5a0334f66515830a61b
|
| 3 |
+
size 19327353080
|
model-00035-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:096433fde7ac38913606ae6b37ee7c54ff10dad8a3c8ec893dd7f174d04db9ad
|
| 3 |
+
size 19327353080
|
model-00036-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d9633b88adac24f18fd71ed499354e35c1ad078d3317ed870e0442032864582
|
| 3 |
+
size 19327353080
|
model-00037-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1feb62e0af702ec092870c5dcd5a8e7ff76a32aa451a172bb25cbfb58909bee
|
| 3 |
+
size 19327353080
|
model-00038-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdd8189fddd88d47c3dd45a8d7c382616d542acd80625fe24f33f91db5affa40
|
| 3 |
+
size 19327353080
|
model-00039-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebefed41010ba0d0821e6e169b1e5ae9f89a35c04f64443c6fba80f45c9ef4c2
|
| 3 |
+
size 19327353080
|
model-00040-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b6f520466c9229912acad82956fe448514151620038a428f458ce6c73c4033f
|
| 3 |
+
size 19327353080
|
model-00041-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1be7be2ce99926c1026475ab25fbee77fde8ac6341421f185e3c0c961215ed55
|
| 3 |
+
size 19327353080
|
model-00042-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19768c9a009d3132f4f28178f9fe1d856d4626f4aab97a81289e9f7f294dfb65
|
| 3 |
+
size 12884902016
|
model-00043-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56aa56f7c8621565fa2720252cb7f3c3d5e20d1070e43317c67a59d805721c5d
|
| 3 |
+
size 19327353080
|
model-00044-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c3b065d08b3002a2e5ff9a7250866537bf0b4a759e68d7d250eaf3212141b8e
|
| 3 |
+
size 19327353080
|
model-00045-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:805e44a21a3b5bc0278947a059cc62b930732ed300bdab963aaed7176cd0e4d6
|
| 3 |
+
size 6442451072
|
model-00046-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:deeced025d5df6f7679dfaad2b581353dfd78b716f2c8234c2c1aed43c4df1da
|
| 3 |
+
size 19327353080
|
model-00047-of-00131.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a6c5a811e4f642ac04af3b32440ed5f21a48a35d4aebaac7fb0f5235cab811a
|
| 3 |
+
size 19327353080
|