初始化项目,由ModelHub XC社区提供模型
Model: mkd-ai-dev/Keural-Cortex-8B-v1.0 Source: Original Platform
This commit is contained in:
commit
2b42cf07fd
15 files changed
+447
No files matched your search
@@ -0,0 +1,40 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
assets/keural-cortex-foundation-cover.png filter=lfs diff=lfs merge=lfs -text
|
||||
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||
assets/keural-cortex-keural-logo.png filter=lfs diff=lfs merge=lfs -text
|
||||
assets/keural-cortex-agentic-logo.gif filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
---
|
||||
language:
|
||||
- en
|
||||
- ko
|
||||
license: apache-2.0
|
||||
library_name: transformers
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- text-generation
|
||||
- conversational
|
||||
- korean
|
||||
- english
|
||||
- function-calling
|
||||
- agent
|
||||
---
|
||||
|
||||
# Keural Cortex Foundation Model (8B) — v1.0
|
||||
|
||||
<p align="center"><img src="assets/keural-cortex-agentic-logo.gif" alt="Keural symbol at the Cortex neural core with animated orbital energy" width="100%"/></p>
|
||||
|
||||
Keural Cortex is MKD's local-first Korean-English language-model program for Keural applications. This release is an 8B-parameter, instruction- and preference-aligned checkpoint with a structured tool-calling layer for enterprise workflows.
|
||||
|
||||
It is designed to run in customer-controlled infrastructure through an OpenAI-compatible vLLM endpoint. The host application—not the model—executes tools, enforces permissions, retrieves live data, and owns user data handling.
|
||||
|
||||
> **Release status:** Public v1.0. Evaluate on your own data, workflows, safety requirements, and target serving configuration before production deployment.
|
||||
|
||||
<p align="center"><img src="assets/architecture.svg" alt="Cortex 8B architecture overview" width="100%"/></p>
|
||||
|
||||
## introduction
|
||||
|
||||
**English.** Keural Cortex is a locally deployable AI foundation-model capability built for Korean-English enterprise interaction. It combines efficient 8B-scale inference, controllable OpenAI-compatible serving, and structured tool-call generation so that Keural can connect users to approved enterprise workflows while retaining application-level control of data, permissions, and execution.
|
||||
|
||||
**한국어.** Keural Cortex는 한국어·영어 기반의 엔터프라이즈 AI 상호작용을 위해 설계된 로컬 배포형 파운데이션 모델 역량입니다. 8B 규모의 효율적인 추론, OpenAI 호환 서빙, 구조화된 Tool Call 생성을 결합하여 Keural이 승인된 업무 워크플로와 연동할 수 있도록 지원합니다. 데이터·권한·실행 통제는 모델이 아닌 Keural 애플리케이션 계층에서 관리합니다.
|
||||
|
||||
## Key strengths
|
||||
|
||||
| Strength | What it enables |
|
||||
|---|---|
|
||||
| **Local-first deployment** | On-premise or customer-controlled serving patterns; the application controls networking, credentials, access, and retention. |
|
||||
| **Korean-English interaction** | Direct bilingual chat behavior for Keural user experiences. |
|
||||
| **Structured tool calls** | Generates OpenAI-compatible calls for `search_web`, `fetch_web_urls`, `retrieve_documents`, and `ask_clarification` when those tools are provided. |
|
||||
| **Agent-ready architecture** | Separates model decision-making from tool execution, allowing the product layer to apply authorization, auditing, retrieval, and real-time data policies. |
|
||||
| **Long-context design** | Configuration supports a 65,536-token maximum position length. Serving limits should be set according to available GPU memory and workload. |
|
||||
| **Efficient serving** | Tested with vLLM using an OpenAI-compatible `/v1/chat/completions` interface. |
|
||||
|
||||
|
||||
<p align="center"><img src="assets/deployment.svg" alt="Private local deployment pattern" width="100%"/></p>
|
||||
|
||||
## Model details
|
||||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| Architecture | Decoder-only transformer language model |
|
||||
| Transformer layers | 36 |
|
||||
| Hidden size | 4,096 |
|
||||
| Attention heads / KV heads | 32 / 8 |
|
||||
| Vocabulary size | 151,936 |
|
||||
| Maximum position length | 65,536 tokens |
|
||||
| Weights | BF16 SafeTensors, ~16 GB |
|
||||
| Alignment path | Continued training, supervised instruction tuning, preference optimization, and Keural agent/tool-contract tuning |
|
||||
|
||||
## Verified serving smoke tests
|
||||
|
||||
The following were verified through vLLM's OpenAI-compatible API in the release environment:
|
||||
|
||||
- Plain Korean chat returned a direct answer without emitting a tool call.
|
||||
- A current-information request generated a structured `search_web` call.
|
||||
- An exhaustive document request generated `retrieve_documents` with `exhaustive: true`.
|
||||
- An underspecified revision request generated `ask_clarification` with a question and checklist.
|
||||
|
||||
These are smoke tests, not a substitute for domain-specific benchmarking or safety evaluation.
|
||||
|
||||
## Quick start: vLLM
|
||||
|
||||
```bash
|
||||
vllm serve <MODEL_PATH> \
|
||||
--served-model-name keural-cortex-8b-v1.0 \
|
||||
--tool-call-parser hermes \
|
||||
--enable-auto-tool-choice
|
||||
```
|
||||
|
||||
For text-only chat, send a normal OpenAI Chat Completions request **without** `tools` or `tool_choice`. For agent workflows, provide only the tools your application authorizes, validate all tool arguments server-side, and execute calls outside the model process.
|
||||
|
||||
## Example tool contract
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "retrieve_documents",
|
||||
"description": "Search content in the user's available documents.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"query": {"type": "string"},
|
||||
"file_ids": {"type": "array", "items": {"type": "string"}},
|
||||
"exhaustive": {"type": "boolean"}
|
||||
},
|
||||
"required": ["query"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Limitations and responsible use
|
||||
|
||||
- Outputs can be inaccurate, incomplete, or inconsistent across prompts and serving configurations. Verify important information.
|
||||
- The model has no inherent live-web access, private-document access, or authority to take external actions. These capabilities must be supplied and governed by the host application.
|
||||
- Tool calls are model suggestions. Validate schemas, authorization, user intent, and side effects before execution.
|
||||
- Do not use this preview as the sole basis for high-stakes medical, legal, financial, safety, employment, credit, or access-control decisions.
|
||||
|
||||
## Certification, license, and attribution
|
||||
|
||||
**Certification note.** Keural Cortex Foundation Model (8B) v1.0 is based on Qwen3-8B-Base and is released under Apache-2.0. Please retain applicable upstream notices and comply with the license terms.
|
||||
|
||||
## Citation
|
||||
|
||||
```bibtex
|
||||
@misc{keural-cortex-8b-v1.0,
|
||||
title={Keural Cortex Foundation Model (8B) — v1.0},
|
||||
author={MKD AI},
|
||||
year={2026},
|
||||
publisher={Hugging Face}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="520" viewBox="0 0 1200 520">
|
||||
<defs><linearGradient id="bg" x2="1" y2="1"><stop stop-color="#10152d"/><stop offset="1" stop-color="#30205a"/></linearGradient><linearGradient id="g" x2="1"><stop stop-color="#8768f8"/><stop offset="1" stop-color="#43d7de"/></linearGradient></defs>
|
||||
<rect width="1200" height="520" rx="28" fill="url(#bg)"/>
|
||||
<text x="70" y="82" fill="white" font-family="Arial, sans-serif" font-size="34" font-weight="700">Keural Cortex Foundation Model (8B)</text>
|
||||
<text x="70" y="120" fill="#bec5e4" font-family="Arial, sans-serif" font-size="18">Local deployment · bilingual chat · tool-call capable</text>
|
||||
<g font-family="Arial, sans-serif" text-anchor="middle">
|
||||
<rect x="70" y="220" width="210" height="120" rx="18" fill="#1e2851" stroke="#7b71ed" stroke-width="2"/><text x="175" y="270" fill="white" font-size="22" font-weight="700">User context</text><text x="175" y="301" fill="#b9c5e5" font-size="16">Korean + English</text>
|
||||
<path d="M300 280h95" stroke="url(#g)" stroke-width="8"/><path d="M380 264l24 16-24 16" fill="none" stroke="#43d7de" stroke-width="8"/>
|
||||
<rect x="420" y="185" width="360" height="190" rx="22" fill="#272055" stroke="#9b83ff" stroke-width="3"/><text x="600" y="242" fill="white" font-size="27" font-weight="700">Cortex 8B</text><text x="600" y="280" fill="#d3ccff" font-size="18">Local bilingual language model</text><text x="600" y="311" fill="#d3ccff" font-size="18">36 layers · 4,096 hidden</text><text x="600" y="342" fill="#d3ccff" font-size="18">65,536-token design context</text>
|
||||
<path d="M800 280h95" stroke="url(#g)" stroke-width="8"/><path d="M880 264l24 16-24 16" fill="none" stroke="#43d7de" stroke-width="8"/>
|
||||
<rect x="920" y="160" width="210" height="240" rx="18" fill="#1e2851" stroke="#7b71ed" stroke-width="2"/><text x="1025" y="224" fill="white" font-size="22" font-weight="700">Outputs</text><text x="1025" y="266" fill="#b9c5e5" font-size="16">Plain chat</text><text x="1025" y="300" fill="#b9c5e5" font-size="16">Structured tool calls</text><text x="1025" y="334" fill="#b9c5e5" font-size="16">Grounded follow-up</text>
|
||||
</g>
|
||||
<text x="70" y="470" fill="#8f9bc5" font-family="Arial, sans-serif" font-size="15">Public release: v1.0 · evaluate for your deployment and safety requirements.</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="420" viewBox="0 0 1200 420">
|
||||
<rect width="1200" height="420" rx="28" fill="#10152d"/>
|
||||
<text x="70" y="75" fill="white" font-family="Arial, sans-serif" font-size="32" font-weight="700">Private, local-first deployment pattern</text>
|
||||
<g font-family="Arial, sans-serif" text-anchor="middle"><rect x="75" y="155" width="240" height="125" rx="18" fill="#1e2851" stroke="#756be8" stroke-width="2"/><text x="195" y="210" fill="white" font-size="23" font-weight="700">Keural application</text><text x="195" y="242" fill="#c7cdec" font-size="16">Chat · workflow · agent UI</text><path d="M330 218h116" stroke="#55d4db" stroke-width="8"/><path d="M430 202l26 16-26 16" fill="none" stroke="#55d4db" stroke-width="8"/><rect x="480" y="130" width="245" height="175" rx="18" fill="#30205a" stroke="#9b83ff" stroke-width="3"/><text x="603" y="191" fill="white" font-size="23" font-weight="700">Cortex 8B</text><text x="603" y="224" fill="#ddd5ff" font-size="16">vLLM / OpenAI-compatible API</text><text x="603" y="254" fill="#ddd5ff" font-size="16">On-premise inference</text><path d="M740 218h116" stroke="#55d4db" stroke-width="8"/><path d="M840 202l26 16-26 16" fill="none" stroke="#55d4db" stroke-width="8"/><rect x="890" y="155" width="240" height="125" rx="18" fill="#1e2851" stroke="#756be8" stroke-width="2"/><text x="1010" y="210" fill="white" font-size="23" font-weight="700">Enterprise tools</text><text x="1010" y="242" fill="#c7cdec" font-size="16">Search · documents · approvals</text></g>
|
||||
<text x="70" y="360" fill="#8f9bc5" font-family="Arial, sans-serif" font-size="16">The model selects structured calls; the host application owns tool execution, access controls, and live-data retrieval.</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ea6322b85f142feba70d1541f7105589f39de5d47d66ffd8ba280f416f415405
|
||||
size 12286307
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd8ad6ebf3b492b4e1a9e98423726e3e38611f6908e824b8927f823eb9b6719c
|
||||
size 1739545
|
||||
@@ -0,0 +1,39 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1920" height="1080" viewBox="0 0 1920 1080" role="img" aria-labelledby="title desc">
|
||||
<title id="title">Keural Cortex Foundation Model</title>
|
||||
<desc id="desc">Keural logo over a violet neural-core visual representing an AI agent foundation model.</desc>
|
||||
<defs>
|
||||
<linearGradient id="edge" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#a78bfa"/>
|
||||
<stop offset="0.52" stop-color="#60a5fa"/>
|
||||
<stop offset="1" stop-color="#c4b5fd"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="panel" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#ffffff" stop-opacity="0.97"/>
|
||||
<stop offset="1" stop-color="#e9e7ff" stop-opacity="0.91"/>
|
||||
</linearGradient>
|
||||
<filter id="shadow" x="-30%" y="-30%" width="160%" height="160%">
|
||||
<feDropShadow dx="0" dy="18" stdDeviation="20" flood-color="#05051a" flood-opacity="0.55"/>
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<image x="0" y="0" width="1920" height="1080" preserveAspectRatio="xMidYMid slice" xlink:href="keural-cortex-foundation-cover.png" href="keural-cortex-foundation-cover.png"/>
|
||||
|
||||
<!-- Branded glass lockup: uses the supplied Keural logo without alteration. -->
|
||||
<g filter="url(#shadow)">
|
||||
<rect x="76" y="68" width="525" height="174" rx="34" fill="#17143c" fill-opacity="0.35" stroke="url(#edge)" stroke-width="3"/>
|
||||
<rect x="91" y="83" width="495" height="116" rx="25" fill="url(#panel)"/>
|
||||
<image x="125" y="112" width="350" height="86" preserveAspectRatio="xMinYMid meet" xlink:href="keural-logo.svg" href="keural-logo.svg"/>
|
||||
<circle cx="540" cy="141" r="8" fill="#8b5cf6"/>
|
||||
<circle cx="540" cy="168" r="8" fill="#60a5fa"/>
|
||||
<text x="123" y="225" fill="#ffffff" font-family="Arial, sans-serif" font-size="18" font-weight="700" letter-spacing="4">CORTEX FOUNDATION MODEL · 8B</text>
|
||||
</g>
|
||||
|
||||
<!-- A restrained agent-system marker, visually connected to the neural streams. -->
|
||||
<g transform="translate(76 920)" filter="url(#shadow)">
|
||||
<rect width="430" height="82" rx="22" fill="#100d30" fill-opacity="0.68" stroke="#a78bfa" stroke-opacity="0.76" stroke-width="2"/>
|
||||
<circle cx="40" cy="41" r="12" fill="#b8a7ff"/>
|
||||
<circle cx="40" cy="41" r="5" fill="#ffffff"/>
|
||||
<text x="72" y="35" fill="#ffffff" font-family="Arial, sans-serif" font-size="17" font-weight="700" letter-spacing="2">LOCAL AI · AGENT READY</text>
|
||||
<text x="72" y="58" fill="#d8d4ff" font-family="Arial, sans-serif" font-size="14" letter-spacing="1">BILINGUAL CHAT · STRUCTURED TOOL CALLS</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f766d7885be20d07a3055ca403e5f4f1d34b52502f123659682be420c605ce91
|
||||
size 2708456
|
||||
@@ -0,0 +1,17 @@
|
||||
<svg width="89" height="22" viewBox="0 0 89 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.625 2.60266C16.4889 2.60275 17.9999 4.11374 18 5.97766C18 7.51655 16.9697 8.81373 15.5615 9.21985C11.3342 10.6284 8.0177 13.9495 6.6123 18.1808C6.2008 19.5804 4.90783 20.6027 3.375 20.6027C1.51108 20.6026 8.76138e-05 19.0916 0 17.2277C0 15.7131 0.997204 14.4304 2.37109 14.0031C3.87235 13.5101 5.25916 12.7767 6.48828 11.8468C6.57393 11.7782 6.65012 11.7071 6.65039 11.6339C6.65028 11.5165 6.57586 11.4298 6.46289 11.339C5.24281 10.4201 3.86783 9.69277 2.38086 9.20325C1.00223 8.77877 0 7.49555 0 5.97766C7.38274e-05 4.11374 1.51108 2.60274 3.375 2.60266C4.90568 2.60266 6.19695 3.62207 6.61035 5.01868C7.07124 6.40841 7.73888 7.69966 8.57715 8.85754C8.75647 9.09536 8.9037 9.11242 9.08105 9.09094C9.20403 9.076 9.36812 8.91413 9.45898 8.79602C10.2929 7.6304 10.9554 6.33187 11.4092 4.93469L11.4131 4.9386C11.8513 3.58311 13.1236 2.60266 14.625 2.60266ZM14.625 13.8527C16.489 13.8528 18 15.3637 18 17.2277C17.9999 19.0916 16.4889 20.6026 14.625 20.6027C12.761 20.6027 11.2501 19.0916 11.25 17.2277C11.25 15.3636 12.761 13.8527 14.625 13.8527Z" fill="#231815"/>
|
||||
<path d="M14.625 2.60266C16.4889 2.60275 17.9999 4.11374 18 5.97766C18 7.51655 16.9697 8.81373 15.5615 9.21985C11.3342 10.6284 8.0177 13.9495 6.6123 18.1808C6.2008 19.5804 4.90783 20.6027 3.375 20.6027C1.51108 20.6026 8.76138e-05 19.0916 0 17.2277C0 15.7131 0.997204 14.4304 2.37109 14.0031C3.87235 13.5101 5.25916 12.7767 6.48828 11.8468C6.57393 11.7782 6.65012 11.7071 6.65039 11.6339C6.65028 11.5165 6.57586 11.4298 6.46289 11.339C5.24281 10.4201 3.86783 9.69277 2.38086 9.20325C1.00223 8.77877 0 7.49555 0 5.97766C7.38274e-05 4.11374 1.51108 2.60274 3.375 2.60266C4.90568 2.60266 6.19695 3.62207 6.61035 5.01868C7.07124 6.40841 7.73888 7.69966 8.57715 8.85754C8.75647 9.09536 8.9037 9.11242 9.08105 9.09094C9.20403 9.076 9.36812 8.91413 9.45898 8.79602C10.2929 7.6304 10.9554 6.33187 11.4092 4.93469L11.4131 4.9386C11.8513 3.58311 13.1236 2.60266 14.625 2.60266ZM14.625 13.8527C16.489 13.8528 18 15.3637 18 17.2277C17.9999 19.0916 16.4889 20.6026 14.625 20.6027C12.761 20.6027 11.2501 19.0916 11.25 17.2277C11.25 15.3636 12.761 13.8527 14.625 13.8527Z" fill="url(#paint0_linear_6916_2)"/>
|
||||
<path d="M35.4313 19C35.03 19 34.7075 18.8352 34.4638 18.5055L29.4973 11.9695L31.4538 9.97L36.5923 16.764C36.793 17.0363 36.8933 17.3302 36.8933 17.6455C36.8933 18.0468 36.7428 18.3765 36.4418 18.6345C36.1408 18.8782 35.804 19 35.4313 19ZM35.6893 3.8425C36.0333 3.8425 36.3128 3.98583 36.5278 4.2725C36.7571 4.54483 36.8718 4.82433 36.8718 5.111C36.8718 5.412 36.7428 5.6915 36.4848 5.9495L27.4763 14.571L27.3688 11.4965L34.6358 4.337C34.9655 4.00733 35.3166 3.8425 35.6893 3.8425ZM26.4013 19C26 19 25.6775 18.8782 25.4338 18.6345C25.1901 18.3765 25.0683 18.0612 25.0683 17.6885V5.2615C25.0683 4.88883 25.1973 4.58067 25.4553 4.337C25.7133 4.079 26.043 3.95 26.4443 3.95C26.8456 3.95 27.161 4.079 27.3903 4.337C27.634 4.58067 27.7558 4.88883 27.7558 5.2615V17.6885C27.7558 18.0612 27.634 18.3765 27.3903 18.6345C27.1466 18.8782 26.817 19 26.4013 19Z" fill="#212121"/>
|
||||
<path d="M43.9747 19.215C42.7563 19.215 41.6957 18.9642 40.7927 18.4625C39.904 17.9465 39.216 17.2513 38.7287 16.377C38.2557 15.5027 38.0192 14.5137 38.0192 13.41C38.0192 12.12 38.2772 11.0235 38.7932 10.1205C39.3235 9.20317 40.0115 8.50083 40.8572 8.0135C41.7028 7.52617 42.5987 7.2825 43.5447 7.2825C44.2757 7.2825 44.9637 7.433 45.6087 7.734C46.268 8.035 46.8485 8.45067 47.3502 8.981C47.8518 9.497 48.246 10.099 48.5327 10.787C48.8337 11.475 48.9842 12.206 48.9842 12.98C48.9698 13.324 48.8337 13.6035 48.5757 13.8185C48.3177 14.0335 48.0167 14.141 47.6727 14.141H39.4597L38.8147 11.991H46.7052L46.2322 12.421V11.8405C46.2035 11.4248 46.053 11.0522 45.7807 10.7225C45.5227 10.3928 45.193 10.1348 44.7917 9.9485C44.4047 9.74783 43.989 9.6475 43.5447 9.6475C43.1147 9.6475 42.7133 9.70483 42.3407 9.8195C41.968 9.93417 41.6455 10.1277 41.3732 10.4C41.1008 10.6723 40.8858 11.0378 40.7282 11.4965C40.5705 11.9552 40.4917 12.5357 40.4917 13.238C40.4917 14.012 40.6493 14.6713 40.9647 15.216C41.2943 15.7463 41.71 16.1548 42.2117 16.4415C42.7277 16.7138 43.2723 16.85 43.8457 16.85C44.376 16.85 44.7988 16.807 45.1142 16.721C45.4295 16.635 45.6803 16.5347 45.8667 16.42C46.0673 16.291 46.2465 16.1835 46.4042 16.0975C46.6622 15.9685 46.9058 15.904 47.1352 15.904C47.4505 15.904 47.7085 16.0115 47.9092 16.2265C48.1242 16.4415 48.2317 16.6923 48.2317 16.979C48.2317 17.366 48.031 17.7172 47.6297 18.0325C47.257 18.3478 46.7338 18.6273 46.0602 18.871C45.3865 19.1003 44.6913 19.215 43.9747 19.215Z" fill="#212121"/>
|
||||
<path d="M59.1237 7.4975C59.4963 7.4975 59.8045 7.6265 60.0482 7.8845C60.2918 8.12817 60.4137 8.43633 60.4137 8.809V14.27C60.4137 15.7893 59.9908 16.9933 59.1452 17.882C58.2995 18.7707 57.0812 19.215 55.4902 19.215C53.8992 19.215 52.6808 18.7707 51.8352 17.882C51.0038 16.9933 50.5882 15.7893 50.5882 14.27V8.809C50.5882 8.43633 50.71 8.12817 50.9537 7.8845C51.1973 7.6265 51.5055 7.4975 51.8782 7.4975C52.2508 7.4975 52.559 7.6265 52.8027 7.8845C53.0463 8.12817 53.1682 8.43633 53.1682 8.809V14.27C53.1682 15.1443 53.3617 15.7965 53.7487 16.2265C54.1357 16.6422 54.7162 16.85 55.4902 16.85C56.2785 16.85 56.8662 16.6422 57.2532 16.2265C57.6402 15.7965 57.8337 15.1443 57.8337 14.27V8.809C57.8337 8.43633 57.9555 8.12817 58.1992 7.8845C58.4428 7.6265 58.751 7.4975 59.1237 7.4975Z" fill="#212121"/>
|
||||
<path d="M64.0264 19C63.6537 19 63.3455 18.8782 63.1019 18.6345C62.8582 18.3765 62.7364 18.0612 62.7364 17.6885V8.809C62.7364 8.43633 62.8582 8.12817 63.1019 7.8845C63.3455 7.6265 63.6537 7.4975 64.0264 7.4975C64.399 7.4975 64.7072 7.6265 64.9509 7.8845C65.1945 8.12817 65.3164 8.43633 65.3164 8.809V10.83L65.1659 9.3895C65.3235 9.0455 65.5242 8.7445 65.7679 8.4865C66.0259 8.21417 66.3125 7.992 66.6279 7.82C66.9432 7.63367 67.28 7.4975 67.6384 7.4115C67.9967 7.3255 68.355 7.2825 68.7134 7.2825C69.1434 7.2825 69.5017 7.40433 69.7884 7.648C70.0894 7.89167 70.2399 8.17833 70.2399 8.508C70.2399 8.981 70.118 9.325 69.8744 9.54C69.6307 9.74067 69.3655 9.841 69.0789 9.841C68.8065 9.841 68.5557 9.79083 68.3264 9.6905C68.1114 9.59017 67.8605 9.54 67.5739 9.54C67.3159 9.54 67.0507 9.6045 66.7784 9.7335C66.5204 9.84817 66.2767 10.0345 66.0474 10.2925C65.8324 10.5505 65.6532 10.873 65.5099 11.26C65.3809 11.6327 65.3164 12.077 65.3164 12.593V17.6885C65.3164 18.0612 65.1945 18.3765 64.9509 18.6345C64.7072 18.8782 64.399 19 64.0264 19Z" fill="#212121"/>
|
||||
<path d="M80.2642 7.2825C80.6369 7.2825 80.945 7.40433 81.1887 7.648C81.4324 7.89167 81.5542 8.207 81.5542 8.594V17.6885C81.5542 18.0612 81.4324 18.3765 81.1887 18.6345C80.945 18.8782 80.6369 19 80.2642 19C79.8915 19 79.5834 18.8782 79.3397 18.6345C79.096 18.3765 78.9742 18.0612 78.9742 17.6885V16.635L79.4472 16.8285C79.4472 17.0148 79.3469 17.2442 79.1462 17.5165C78.9455 17.7745 78.6732 18.0325 78.3292 18.2905C77.9852 18.5485 77.5767 18.7707 77.1037 18.957C76.645 19.129 76.1434 19.215 75.5987 19.215C74.6097 19.215 73.7139 18.9642 72.9112 18.4625C72.1085 17.9465 71.4707 17.2442 70.9977 16.3555C70.539 15.4525 70.3097 14.4205 70.3097 13.2595C70.3097 12.0842 70.539 11.0522 70.9977 10.1635C71.4707 9.2605 72.1014 8.55817 72.8897 8.0565C73.678 7.5405 74.5524 7.2825 75.5127 7.2825C76.129 7.2825 76.6952 7.37567 77.2112 7.562C77.7272 7.74833 78.1715 7.98483 78.5442 8.2715C78.9312 8.55817 79.225 8.852 79.4257 9.153C79.6407 9.43967 79.7482 9.68333 79.7482 9.884L78.9742 10.1635V8.594C78.9742 8.22133 79.096 7.91317 79.3397 7.6695C79.5834 7.4115 79.8915 7.2825 80.2642 7.2825ZM75.9212 16.85C76.5519 16.85 77.1037 16.6923 77.5767 16.377C78.0497 16.0617 78.4152 15.6317 78.6732 15.087C78.9455 14.5423 79.0817 13.9332 79.0817 13.2595C79.0817 12.5715 78.9455 11.9552 78.6732 11.4105C78.4152 10.8658 78.0497 10.4358 77.5767 10.1205C77.1037 9.80517 76.5519 9.6475 75.9212 9.6475C75.3049 9.6475 74.7602 9.80517 74.2872 10.1205C73.8142 10.4358 73.4415 10.8658 73.1692 11.4105C72.9112 11.9552 72.7822 12.5715 72.7822 13.2595C72.7822 13.9332 72.9112 14.5423 73.1692 15.087C73.4415 15.6317 73.8142 16.0617 74.2872 16.377C74.7602 16.6923 75.3049 16.85 75.9212 16.85Z" fill="#212121"/>
|
||||
<path d="M86.495 17.6885C86.495 18.0612 86.366 18.3765 86.108 18.6345C85.8643 18.8782 85.5562 19 85.1835 19C84.8252 19 84.5242 18.8782 84.2805 18.6345C84.0368 18.3765 83.915 18.0612 83.915 17.6885V4.4015C83.915 4.02883 84.0368 3.72067 84.2805 3.477C84.5385 3.219 84.8538 3.09 85.2265 3.09C85.5992 3.09 85.9002 3.219 86.1295 3.477C86.3732 3.72067 86.495 4.02883 86.495 4.4015V17.6885Z" fill="#212121"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_6916_2" x1="10.6272" y1="3.34851" x2="11.3698" y2="21.5271" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#B847FF"/>
|
||||
<stop offset="0.164445" stop-color="#874DFF"/>
|
||||
<stop offset="1" stop-color="#3382FF"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.6 KiB |
@@ -0,0 +1,87 @@
|
||||
{%- if tools %}
|
||||
{{- '<|im_start|>system\n' }}
|
||||
{%- if messages[0].role == 'system' %}
|
||||
{{- messages[0].content + '\n\n' }}
|
||||
{%- endif %}
|
||||
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||
{%- for tool in tools %}
|
||||
{{- "\n" }}
|
||||
{{- tool | tojson }}
|
||||
{%- endfor %}
|
||||
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||
{%- else %}
|
||||
{%- if messages[0].role == 'system' %}
|
||||
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
||||
{%- for message in messages[::-1] %}
|
||||
{%- set index = (messages|length - 1) - loop.index0 %}
|
||||
{%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
|
||||
{%- set ns.multi_step_tool = false %}
|
||||
{%- set ns.last_query_index = index %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- for message in messages %}
|
||||
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
||||
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
||||
{%- elif message.role == "assistant" %}
|
||||
{%- set content = message.content %}
|
||||
{%- set reasoning_content = '' %}
|
||||
{%- if message.reasoning_content is defined and message.reasoning_content is not none %}
|
||||
{%- set reasoning_content = message.reasoning_content %}
|
||||
{%- else %}
|
||||
{%- if '</think>' in message.content %}
|
||||
{%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
|
||||
{%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if loop.index0 > ns.last_query_index %}
|
||||
{%- if loop.last or (not loop.last and reasoning_content) %}
|
||||
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
||||
{%- else %}
|
||||
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||
{%- endif %}
|
||||
{%- else %}
|
||||
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||
{%- endif %}
|
||||
{%- if message.tool_calls %}
|
||||
{%- for tool_call in message.tool_calls %}
|
||||
{%- if (loop.first and content) or (not loop.first) %}
|
||||
{{- '\n' }}
|
||||
{%- endif %}
|
||||
{%- if tool_call.function %}
|
||||
{%- set tool_call = tool_call.function %}
|
||||
{%- endif %}
|
||||
{{- '<tool_call>\n{"name": "' }}
|
||||
{{- tool_call.name }}
|
||||
{{- '", "arguments": ' }}
|
||||
{%- if tool_call.arguments is string %}
|
||||
{{- tool_call.arguments }}
|
||||
{%- else %}
|
||||
{{- tool_call.arguments | tojson }}
|
||||
{%- endif %}
|
||||
{{- '}\n</tool_call>' }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{{- '<|im_end|>\n' }}
|
||||
{%- elif message.role == "tool" %}
|
||||
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
||||
{{- '<|im_start|>user' }}
|
||||
{%- endif %}
|
||||
{{- '\n<tool_response>\n' }}
|
||||
{{- message.content }}
|
||||
{{- '\n</tool_response>' }}
|
||||
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||
{{- '<|im_end|>\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if add_generation_prompt %}
|
||||
{{- '<|im_start|>assistant\n' }}
|
||||
{%- if enable_thinking is defined and enable_thinking is false %}
|
||||
{{- '<think>\n\n</think>\n\n' }}
|
||||
{%- else %}
|
||||
{{- '<think>\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"architectures": [
|
||||
"Qwen3ForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 151643,
|
||||
"dtype": "bfloat16",
|
||||
"eos_token_id": 151645,
|
||||
"head_dim": 128,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 12288,
|
||||
"layer_types": [
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention",
|
||||
"full_attention"
|
||||
],
|
||||
"max_position_embeddings": 65536,
|
||||
"max_window_layers": 36,
|
||||
"model_type": "qwen3",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 36,
|
||||
"num_key_value_heads": 8,
|
||||
"pad_token_id": null,
|
||||
"rms_norm_eps": 1e-06,
|
||||
"rope_parameters": {
|
||||
"factor": 2.0,
|
||||
"original_max_position_embeddings": 32768,
|
||||
"rope_theta": 1000000,
|
||||
"rope_type": "yarn"
|
||||
},
|
||||
"sliding_window": null,
|
||||
"tie_word_embeddings": false,
|
||||
"transformers_version": "5.17.0",
|
||||
"use_cache": true,
|
||||
"use_sliding_window": false,
|
||||
"vocab_size": 151936
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"bos_token_id": 151643,
|
||||
"do_sample": true,
|
||||
"eos_token_id": [
|
||||
151645,
|
||||
151643
|
||||
],
|
||||
"max_new_tokens": 2048,
|
||||
"pad_token_id": 151643,
|
||||
"repetition_penalty": 1.05,
|
||||
"temperature": 0.7,
|
||||
"top_k": 20,
|
||||
"top_p": 0.8,
|
||||
"transformers_version": "5.17.0"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce1121bc9b9ed11dc9abbf834206884ce5b38662de39dca73f740ddcf3a5c995
|
||||
size 16381517208
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
|
||||
size 11422650
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"backend": "tokenizers",
|
||||
"bos_token": null,
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|endoftext|>",
|
||||
"errors": "replace",
|
||||
"is_local": true,
|
||||
"local_files_only": false,
|
||||
"model_max_length": 131072,
|
||||
"pad_token": "<|endoftext|>",
|
||||
"split_special_tokens": false,
|
||||
"tokenizer_class": "Qwen2Tokenizer",
|
||||
"unk_token": null,
|
||||
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set content = message.content %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in message.content %}\n {%- set content = message.content.split('</think>')[-1].lstrip('\\n') %}\n {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- else %}\n {{- '<think>\\n' }}\n {%- endif %}\n{%- endif %}"
|
||||
}
|
||||
Reference in new issue
Block a user