Text Generation
Transformers
Safetensors
GGUF
English
lfm2
lfm2.5
mew
uncensored
roleplay
bf16
conversational
Instructions to use Unmid/Mew1-2.6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Unmid/Mew1-2.6B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Unmid/Mew1-2.6B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Unmid/Mew1-2.6B") model = AutoModelForCausalLM.from_pretrained("Unmid/Mew1-2.6B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Unmid/Mew1-2.6B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Unmid/Mew1-2.6B # Run inference directly in the terminal: llama cli -hf Unmid/Mew1-2.6B
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Unmid/Mew1-2.6B # Run inference directly in the terminal: llama cli -hf Unmid/Mew1-2.6B
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Unmid/Mew1-2.6B # Run inference directly in the terminal: ./build/bin/llama cli -hf Unmid/Mew1-2.6B
Use Docker
docker model run hf.co/Unmid/Mew1-2.6B
- Llama new
- LM Studio
- Jan
- vLLM
How to use Unmid/Mew1-2.6B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Unmid/Mew1-2.6B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Unmid/Mew1-2.6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Unmid/Mew1-2.6B
- SGLang
How to use Unmid/Mew1-2.6B 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 "Unmid/Mew1-2.6B" \ --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": "Unmid/Mew1-2.6B", "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 "Unmid/Mew1-2.6B" \ --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": "Unmid/Mew1-2.6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Unmid/Mew1-2.6B with Ollama:
ollama run hf.co/Unmid/Mew1-2.6B
- Unsloth Desktop
- Pi
How to use Unmid/Mew1-2.6B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Unmid/Mew1-2.6B
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Unmid/Mew1-2.6B" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Unmid/Mew1-2.6B with Docker Model Runner:
docker model run hf.co/Unmid/Mew1-2.6B
- Lemonade
How to use Unmid/Mew1-2.6B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Unmid/Mew1-2.6B
Run and chat with the model
lemonade run user.Mew1-2.6B-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Unmid/Mew1-2.6B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Unmid/Mew1-2.6B
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Unmid/Mew1-2.6B
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Unmid/Mew1-2.6B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Unmid/Mew1-2.6B
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Unmid/Mew1-2.6B" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Professionalize model card and release metadata
Browse filesAdds the correct LFM Open License v1.0, fixes model lineage and technical metadata, links the verified owner-maintained GGUF sibling repository, and repairs LEAP manifests. No model weights or GGUF files were deleted or replaced. Pre-change state is preserved on backup-before-restructure-2026-08-17.
- LICENSE +71 -0
- README.md +96 -48
- leap/Q2_K.json +3 -2
- leap/Q4_0.json +3 -2
- leap/Q4_K_M.json +3 -2
- leap/Q5_K_M.json +3 -2
- leap/Q6_K.json +3 -2
- leap/Q8_0.json +3 -2
LICENSE
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LFM Open License v1.0
|
| 2 |
+
|
| 3 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 4 |
+
|
| 5 |
+
1. Definitions.
|
| 6 |
+
|
| 7 |
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by this document.
|
| 8 |
+
|
| 9 |
+
"Licensor" shall mean Liquid AI, Inc.
|
| 10 |
+
|
| 11 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
| 12 |
+
|
| 13 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
| 14 |
+
|
| 15 |
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
| 16 |
+
|
| 17 |
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
| 18 |
+
|
| 19 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
|
| 20 |
+
|
| 21 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
| 22 |
+
|
| 23 |
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
| 24 |
+
|
| 25 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
| 26 |
+
|
| 27 |
+
"Commercial Use" shall mean any use of the Work for direct or indirect commercial advantage or monetary compensation.
|
| 28 |
+
|
| 29 |
+
"Qualified Non-Profit Organization" shall mean a Legal Entity that is organized and operated exclusively for religious, charitable, scientific, testing for public safety, literary, or educational purposes, and which is exempt from federal income tax under Section 501(c)(3) of the United States Internal Revenue Code of 1986, as amended, or any equivalent non-profit or charitable organization in a foreign jurisdiction.
|
| 30 |
+
|
| 31 |
+
"Non-Commercial or Research Purposes" shall mean purposes that do not involve any use of the Work or a Derivative Work for Commercial Use.
|
| 32 |
+
|
| 33 |
+
"Threshold" shall mean annual revenue of 10 million United States dollars ($10,000,000) or more.
|
| 34 |
+
|
| 35 |
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
| 36 |
+
|
| 37 |
+
3. Grant of Patent License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
| 38 |
+
|
| 39 |
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
| 40 |
+
|
| 41 |
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
| 42 |
+
|
| 43 |
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
| 44 |
+
|
| 45 |
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
| 46 |
+
|
| 47 |
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
| 48 |
+
|
| 49 |
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
| 50 |
+
|
| 51 |
+
5. Commercial Use Limitation.
|
| 52 |
+
|
| 53 |
+
(a) The rights granted under this License for Commercial Use are conditioned upon You or Your Legal Entity not exceeding the Threshold.
|
| 54 |
+
|
| 55 |
+
(b) Any Commercial Use of the Work or a Derivative Work by a Legal Entity that exceeds the Threshold is not licensed under this Agreement.
|
| 56 |
+
|
| 57 |
+
(c) The Threshold shall not apply to a Qualified Non-Profit Organization's use of the Work or a Derivative Work for Non-Commercial or Research Purposes.
|
| 58 |
+
|
| 59 |
+
6. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
| 60 |
+
|
| 61 |
+
7. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except for the reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
| 62 |
+
|
| 63 |
+
8. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
| 64 |
+
|
| 65 |
+
9. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
| 66 |
+
|
| 67 |
+
10. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
| 68 |
+
|
| 69 |
+
11. Termination. This License will terminate automatically and immediately if You fail to comply with any of its terms and conditions. Upon termination, You must cease all use of the Work and any Derivative Works and delete all copies in Your possession.
|
| 70 |
+
|
| 71 |
+
END OF TERMS AND CONDITIONS
|
README.md
CHANGED
|
@@ -1,67 +1,115 @@
|
|
| 1 |
---
|
| 2 |
-
library_name:
|
| 3 |
-
license:
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
tags:
|
|
|
|
|
|
|
| 6 |
- mew
|
| 7 |
- uncensored
|
| 8 |
- roleplay
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
---
|
| 12 |
|
| 13 |
-
<div align="center">
|
| 14 |
-
<div style="display: flex; justify-content: center; gap: 1.5em; margin-bottom: 1.5em;">
|
| 15 |
-
<a href="https://huggingface.co/OrbitMC"><strong>👤 Profile</strong></a> •
|
| 16 |
-
<a href="https://huggingface.co/OrbitMC/Mew1-2.6B/tree/main/ggufs"><strong>📂 All Models</strong></a>
|
| 17 |
-
</div>
|
| 18 |
-
</div>
|
| 19 |
-
|
| 20 |
# 🐱 Mew1-2.6B
|
| 21 |
|
| 22 |
-
**Mew1-2.6B** is a
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
##
|
| 27 |
-
- **Uncensored by Design:** Optimized for unrestricted creative expression and objective reasoning.
|
| 28 |
-
- **Linear RNN Efficiency:** Built on a specialized architecture that offers linear scaling for long contexts.
|
| 29 |
-
- **Elite Reasoning:** Outperforms many models twice its size in logic and instruction following.
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
-
| :--- | :--- | :---: | :---: | :--- |
|
| 35 |
-
| **Mew1-2.6B-q2-k.gguf** | Q2_K | 0.85 GB | [download](https://huggingface.co/OrbitMC/Mew1-2.6B/resolve/main/ggufs/Mew1-2.6B-q2-k.gguf?download=true) | Ultra-low RAM |
|
| 36 |
-
| **Mew1-2.6B-q4-k-m.gguf** | Q4_K_M | 1.56 GB | [download](https://huggingface.co/OrbitMC/Mew1-2.6B/resolve/main/ggufs/Mew1-2.6B-q4-k-m.gguf?download=true) | Balanced (Recommended) |
|
| 37 |
-
| **Mew1-2.6B-q6-k.gguf** | Q6_K | 2.15 GB | [download](https://huggingface.co/OrbitMC/Mew1-2.6B/resolve/main/ggufs/Mew1-2.6B-q6-k.gguf?download=true) | High Precision |
|
| 38 |
-
| **Mew1-2.6B-q8-0.gguf** | Q8_0 | 2.76 GB | [download](https://huggingface.co/OrbitMC/Mew1-2.6B/resolve/main/ggufs/Mew1-2.6B-q8-0.gguf?download=true) | Maximum Quality |
|
| 39 |
|
| 40 |
-
##
|
| 41 |
-
- **Parameters:** 2.6 Billion
|
| 42 |
-
- **Architecture:** Fine-tuned Liquid Foundation Model (LFM) 2.5
|
| 43 |
-
- **Context Window:** 32,768 Tokens
|
| 44 |
-
- **Training Focus:** Advanced reasoning, creative writing, and technical instruction following.
|
| 45 |
|
| 46 |
-
|
| 47 |
-
- **Creative Writing:** Drafting stories, scripts, and roleplay scenarios with deep character consistency.
|
| 48 |
-
- **Technical Assistance:** Explaining complex concepts and generating code snippets.
|
| 49 |
-
- **Local Deployment:** Ideal for mobile devices, low-power laptops, and private server environments.
|
| 50 |
|
| 51 |
-
##
|
| 52 |
-
| Quantization | Minimum RAM | Recommended Hardware |
|
| 53 |
-
| :--- | :---: | :--- |
|
| 54 |
-
| Q2_K | 2 GB | Most Mobile Phones |
|
| 55 |
-
| Q4_K_M | 4 GB | Standard Laptop / iPhone 13+ |
|
| 56 |
-
| Q8_0 | 6 GB | Dedicated GPU / 8GB+ Desktop RAM |
|
| 57 |
|
| 58 |
-
|
| 59 |
-
Compatible with **llama.cpp**, **LM Studio**, and **KoboldCPP**.
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
- **Top-P:** 0.9
|
| 65 |
|
| 66 |
-
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: other
|
| 4 |
+
license_name: lfm1.0
|
| 5 |
+
license_link: LICENSE
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
base_model:
|
| 10 |
+
- SC117/LFM2.5-2.6B-Uncensored
|
| 11 |
+
base_model_relation: finetune
|
| 12 |
tags:
|
| 13 |
+
- lfm2
|
| 14 |
+
- lfm2.5
|
| 15 |
- mew
|
| 16 |
- uncensored
|
| 17 |
- roleplay
|
| 18 |
+
- bf16
|
| 19 |
+
- safetensors
|
| 20 |
---
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
# 🐱 Mew1-2.6B
|
| 23 |
|
| 24 |
+
**Mew1-2.6B** is a 2.69B-parameter LFM2-family text-generation model released by **Unmid**. This is the canonical **BF16 Transformers checkpoint**; ready-to-run GGUF files are published separately in [Unmid/Mew1-2.6B-GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF).
|
| 25 |
|
| 26 |
+
> **Model lineage:** [LiquidAI/LFM2.5-2.6B](https://huggingface.co/LiquidAI/LFM2.5-2.6B) → [SC117/LFM2.5-2.6B-Uncensored](https://huggingface.co/SC117/LFM2.5-2.6B-Uncensored) → **Mew1-2.6B**. This is a community derivative and is not an official Liquid AI or SC117 release.
|
| 27 |
|
| 28 |
+
## Model details
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
| Property | Value |
|
| 31 |
+
| :-- | :-- |
|
| 32 |
+
| Architecture | LFM2 hybrid (`Lfm2ForCausalLM`) |
|
| 33 |
+
| Parameters | 2.69B |
|
| 34 |
+
| Layers | 30 |
|
| 35 |
+
| Context configured by this checkpoint | 128,000 tokens |
|
| 36 |
+
| Vocabulary | 128,000 tokens |
|
| 37 |
+
| Weight format | BF16 Safetensors, 4 shards |
|
| 38 |
+
| Chat format | ChatML-like template with tool-use support |
|
| 39 |
+
| Primary tested language | English |
|
| 40 |
+
| License | [LFM Open License v1.0](LICENSE) |
|
| 41 |
|
| 42 |
+
The checkpoint is intended for local conversational generation, creative writing, roleplay, instruction following, and experimentation on resource-constrained hardware. A complete reproducibility report and independent benchmark suite for the Mew1 modification have not yet been published; performance claims should be evaluated on your own workloads.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
## Files in this repository
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
The four `model-0000x-of-00004.safetensors` files are the actual BF16 model weights. `model.safetensors.index.json` maps every tensor to its shard. These are standard Transformers files and should be kept together.
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
## Usage with Transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
LFM2 is supported natively by recent Transformers releases. No custom remote code is required.
|
|
|
|
| 51 |
|
| 52 |
+
```python
|
| 53 |
+
import torch
|
| 54 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
| 55 |
|
| 56 |
+
model_id = "Unmid/Mew1-2.6B"
|
| 57 |
+
|
| 58 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 59 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 60 |
+
model_id,
|
| 61 |
+
dtype=torch.bfloat16,
|
| 62 |
+
device_map="auto",
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
messages = [
|
| 66 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
| 67 |
+
{"role": "user", "content": "Write a short story about a cat exploring the Moon."},
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
input_ids = tokenizer.apply_chat_template(
|
| 71 |
+
messages,
|
| 72 |
+
add_generation_prompt=True,
|
| 73 |
+
return_tensors="pt",
|
| 74 |
+
).to(model.device)
|
| 75 |
+
|
| 76 |
+
output = model.generate(
|
| 77 |
+
input_ids,
|
| 78 |
+
max_new_tokens=512,
|
| 79 |
+
do_sample=True,
|
| 80 |
+
temperature=0.7,
|
| 81 |
+
top_k=50,
|
| 82 |
+
top_p=0.9,
|
| 83 |
+
repetition_penalty=1.1,
|
| 84 |
+
)
|
| 85 |
+
|
| 86 |
+
print(tokenizer.decode(output[0, input_ids.shape[-1]:], skip_special_tokens=True))
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## GGUF downloads
|
| 90 |
+
|
| 91 |
+
The owner-maintained GGUF release is [Unmid/Mew1-2.6B-GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF).
|
| 92 |
+
|
| 93 |
+
For backward compatibility, the earlier GGUF copies under this repository's `ggufs/` directory remain available. No model artifacts were removed during the reorganization.
|
| 94 |
+
|
| 95 |
+
| Quant | Size | Suggested use | Download |
|
| 96 |
+
| :-- | --: | :-- | :-- |
|
| 97 |
+
| Q2_K | 1.09 GB | Minimum memory | [GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF/resolve/main/Mew1-2.6B.Q2_K.gguf?download=true) |
|
| 98 |
+
| Q4_0 | 1.59 GB | Fast legacy 4-bit | [GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF/resolve/main/Mew1-2.6B.Q4_0.gguf?download=true) |
|
| 99 |
+
| **Q4_K_M** | **1.67 GB** | **Recommended balance** | [GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF/resolve/main/Mew1-2.6B.Q4_K_M.gguf?download=true) |
|
| 100 |
+
| Q5_K_M | 1.94 GB | Higher quality | [GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF/resolve/main/Mew1-2.6B.Q5_K_M.gguf?download=true) |
|
| 101 |
+
| Q6_K | 2.22 GB | High quality | [GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF/resolve/main/Mew1-2.6B.Q6_K.gguf?download=true) |
|
| 102 |
+
| Q8_0 | 2.87 GB | Maximum quantized quality | [GGUF](https://huggingface.co/Unmid/Mew1-2.6B-GGUF/resolve/main/Mew1-2.6B.Q8_0.gguf?download=true) |
|
| 103 |
+
|
| 104 |
+
Additional community quantizations are available from **mradermacher**:
|
| 105 |
+
|
| 106 |
+
- [Static GGUF quantizations](https://huggingface.co/mradermacher/Mew1-2.6B-GGUF)
|
| 107 |
+
- [Importance-matrix GGUF quantizations](https://huggingface.co/mradermacher/Mew1-2.6B-i1-GGUF)
|
| 108 |
+
|
| 109 |
+
## Limitations and responsible use
|
| 110 |
+
|
| 111 |
+
Mew1 may produce incorrect, biased, unsafe, or fabricated text. “Uncensored” describes reduced refusal behavior; it does not guarantee accuracy or suitability. Validate outputs before relying on them, especially for medical, legal, financial, security, or other high-impact decisions. Users are responsible for complying with applicable law and the model license.
|
| 112 |
+
|
| 113 |
+
## License and attribution
|
| 114 |
+
|
| 115 |
+
This derivative is distributed under the **LFM Open License v1.0**. Review [LICENSE](LICENSE), including its attribution and commercial-use conditions. Mew1 builds on work by Liquid AI and SC117; quantized community releases should also credit their respective quantizers.
|
leap/Q2_K.json
CHANGED
|
@@ -3,13 +3,14 @@
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q2-k.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
|
|
|
| 12 |
"repetition_penalty": 1.1
|
| 13 |
}
|
| 14 |
}
|
| 15 |
-
}
|
|
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q2-k.gguf",
|
| 6 |
+
"chat_template": "{{- bos_token -}}\n{%- set preserve_thinking = preserve_thinking | default(false) -%}\n\n{%- macro format_arg_value(arg_value) -%}\n {%- if arg_value is string -%}\n {{- \"'\" + (arg_value | replace(\"\\\\\", \"\\\\\\\\\") | replace(\"'\", \"\\\\'\") | replace(\"\\n\", \"\\\\n\") | replace(\"\\r\", \"\\\\r\")) + \"'\" -}}\n {%- elif arg_value is mapping or arg_value is iterable -%}\n {{- arg_value | tojson -}}\n {%- else -%}\n {{- arg_value | string -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro parse_content(content) -%}\n {%- if content is string -%}\n {{- content -}}\n {%- elif content is mapping -%}\n {{- content | tojson -}}\n {%- elif content is iterable -%}\n {%- set _ns = namespace(result=\"\") -%}\n {%- for item in content -%}\n {%- if item is string -%}\n {%- set _ns.result = _ns.result + item -%}\n {%- elif item is mapping and item.get(\"type\") == \"image\" -%}\n {%- set _ns.result = _ns.result + \"<image>\" -%}\n {%- elif item is mapping and item.get(\"type\") == \"text\" -%}\n {%- set _ns.result = _ns.result + ((item.get(\"text\") or \"\") | string) -%}\n {%- else -%}\n {%- set _ns.result = _ns.result + (item | tojson) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- _ns.result -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro render_tool_calls(tool_calls) -%}\n {%- set tool_calls_ns = namespace(tool_calls=[]) -%}\n {%- for tool_call in tool_calls -%}\n {%- set func = tool_call[\"function\"] if \"function\" in tool_call else tool_call -%}\n {%- set func_name = func[\"name\"] -%}\n {%- set func_args = func.get(\"arguments\") -%}\n {%- set args_ns = namespace(arg_strings=[]) -%}\n {%- if func_args is mapping -%}\n {%- for arg_name, arg_value in func_args.items() -%}\n {%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + \"=\" + format_arg_value(arg_value)] -%}\n {%- endfor -%}\n {%- elif func_args is string and (func_args | trim) not in [\"\", \"{}\", \"null\"] -%}\n {{- raise_exception(\"Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template\") -}}\n {%- endif -%}\n {%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + \"(\" + (args_ns.arg_strings | join(\", \")) + \")\"] -%}\n {%- endfor -%}\n {{- \"<|tool_call_start|>[\" + (tool_calls_ns.tool_calls | join(\", \")) + \"]<|tool_call_end|>\" -}}\n{%- endmacro -%}\n\n{%- set ns = namespace(system_prompt=\"\", last_user_index=-1) -%}\n{%- if messages and messages[0][\"role\"] == \"system\" -%}\n {%- if messages[0].get(\"content\") -%}\n {%- set ns.system_prompt = parse_content(messages[0][\"content\"]) -%}\n {%- endif -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n {%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: [\" -%}\n {%- for tool in tools -%}\n {%- if tool is not string -%}\n {%- set tool = tool | tojson -%}\n {%- endif -%}\n {%- set ns.system_prompt = ns.system_prompt + tool -%}\n {%- if not loop.last -%}\n {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n {%- endif -%}\n {%- endfor -%}\n {%- set ns.system_prompt = ns.system_prompt + \"]\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n {{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n {%- if message[\"role\"] == \"user\" -%}\n {%- set ns.last_user_index = loop.index0 -%}\n {%- endif -%}\n{%- endfor -%}\n{%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" -}}\n {%- if message.role == \"assistant\" -%}\n {%- generation -%}\n {%- set keep_thinking = preserve_thinking or loop.index0 > ns.last_user_index -%}\n {%- set thinking = message.thinking or message.reasoning or message.reasoning_content -%}\n {%- set thinking = thinking if thinking is string else \"\" -%}\n {%- if thinking and keep_thinking -%}\n {{- \"<think>\" + thinking + \"</think>\" -}}\n {%- endif -%}\n {%- set _cfm_tag = \"CONTINUE_FINAL_MESSAGE_TAG \" -%}\n {%- set _has_cfm = false -%}\n {%- set content = \"\" -%}\n {%- if message.get(\"content\") -%}\n {%- set content = parse_content(message.content) -%}\n {%- endif -%}\n {%- if not keep_thinking and \"</think>\" in content -%}\n {%- set content = content.split(\"</think>\")[-1] | trim -%}\n {%- endif -%}\n {%- if content.endswith(_cfm_tag) -%}\n {%- set _has_cfm = true -%}\n {%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}\n {%- set content = content[:_trunc_len] -%}\n {%- endif -%}\n {{- content -}}\n {%- if message.tool_calls -%}\n {{- render_tool_calls(message.tool_calls) -}}\n {%- endif -%}\n {%- if _has_cfm -%}\n {{- _cfm_tag -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endgeneration -%}\n {%- else %}\n {%- if message.get(\"content\") -%}\n {{- parse_content(message[\"content\"]) -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endif %}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n<think>\" -}}\n{%- endif -%}\n"
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
| 12 |
+
"top_p": 0.9,
|
| 13 |
"repetition_penalty": 1.1
|
| 14 |
}
|
| 15 |
}
|
| 16 |
+
}
|
leap/Q4_0.json
CHANGED
|
@@ -3,13 +3,14 @@
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q4-0.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
|
|
|
| 12 |
"repetition_penalty": 1.1
|
| 13 |
}
|
| 14 |
}
|
| 15 |
-
}
|
|
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q4-0.gguf",
|
| 6 |
+
"chat_template": "{{- bos_token -}}\n{%- set preserve_thinking = preserve_thinking | default(false) -%}\n\n{%- macro format_arg_value(arg_value) -%}\n {%- if arg_value is string -%}\n {{- \"'\" + (arg_value | replace(\"\\\\\", \"\\\\\\\\\") | replace(\"'\", \"\\\\'\") | replace(\"\\n\", \"\\\\n\") | replace(\"\\r\", \"\\\\r\")) + \"'\" -}}\n {%- elif arg_value is mapping or arg_value is iterable -%}\n {{- arg_value | tojson -}}\n {%- else -%}\n {{- arg_value | string -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro parse_content(content) -%}\n {%- if content is string -%}\n {{- content -}}\n {%- elif content is mapping -%}\n {{- content | tojson -}}\n {%- elif content is iterable -%}\n {%- set _ns = namespace(result=\"\") -%}\n {%- for item in content -%}\n {%- if item is string -%}\n {%- set _ns.result = _ns.result + item -%}\n {%- elif item is mapping and item.get(\"type\") == \"image\" -%}\n {%- set _ns.result = _ns.result + \"<image>\" -%}\n {%- elif item is mapping and item.get(\"type\") == \"text\" -%}\n {%- set _ns.result = _ns.result + ((item.get(\"text\") or \"\") | string) -%}\n {%- else -%}\n {%- set _ns.result = _ns.result + (item | tojson) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- _ns.result -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro render_tool_calls(tool_calls) -%}\n {%- set tool_calls_ns = namespace(tool_calls=[]) -%}\n {%- for tool_call in tool_calls -%}\n {%- set func = tool_call[\"function\"] if \"function\" in tool_call else tool_call -%}\n {%- set func_name = func[\"name\"] -%}\n {%- set func_args = func.get(\"arguments\") -%}\n {%- set args_ns = namespace(arg_strings=[]) -%}\n {%- if func_args is mapping -%}\n {%- for arg_name, arg_value in func_args.items() -%}\n {%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + \"=\" + format_arg_value(arg_value)] -%}\n {%- endfor -%}\n {%- elif func_args is string and (func_args | trim) not in [\"\", \"{}\", \"null\"] -%}\n {{- raise_exception(\"Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template\") -}}\n {%- endif -%}\n {%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + \"(\" + (args_ns.arg_strings | join(\", \")) + \")\"] -%}\n {%- endfor -%}\n {{- \"<|tool_call_start|>[\" + (tool_calls_ns.tool_calls | join(\", \")) + \"]<|tool_call_end|>\" -}}\n{%- endmacro -%}\n\n{%- set ns = namespace(system_prompt=\"\", last_user_index=-1) -%}\n{%- if messages and messages[0][\"role\"] == \"system\" -%}\n {%- if messages[0].get(\"content\") -%}\n {%- set ns.system_prompt = parse_content(messages[0][\"content\"]) -%}\n {%- endif -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n {%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: [\" -%}\n {%- for tool in tools -%}\n {%- if tool is not string -%}\n {%- set tool = tool | tojson -%}\n {%- endif -%}\n {%- set ns.system_prompt = ns.system_prompt + tool -%}\n {%- if not loop.last -%}\n {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n {%- endif -%}\n {%- endfor -%}\n {%- set ns.system_prompt = ns.system_prompt + \"]\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n {{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n {%- if message[\"role\"] == \"user\" -%}\n {%- set ns.last_user_index = loop.index0 -%}\n {%- endif -%}\n{%- endfor -%}\n{%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" -}}\n {%- if message.role == \"assistant\" -%}\n {%- generation -%}\n {%- set keep_thinking = preserve_thinking or loop.index0 > ns.last_user_index -%}\n {%- set thinking = message.thinking or message.reasoning or message.reasoning_content -%}\n {%- set thinking = thinking if thinking is string else \"\" -%}\n {%- if thinking and keep_thinking -%}\n {{- \"<think>\" + thinking + \"</think>\" -}}\n {%- endif -%}\n {%- set _cfm_tag = \"CONTINUE_FINAL_MESSAGE_TAG \" -%}\n {%- set _has_cfm = false -%}\n {%- set content = \"\" -%}\n {%- if message.get(\"content\") -%}\n {%- set content = parse_content(message.content) -%}\n {%- endif -%}\n {%- if not keep_thinking and \"</think>\" in content -%}\n {%- set content = content.split(\"</think>\")[-1] | trim -%}\n {%- endif -%}\n {%- if content.endswith(_cfm_tag) -%}\n {%- set _has_cfm = true -%}\n {%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}\n {%- set content = content[:_trunc_len] -%}\n {%- endif -%}\n {{- content -}}\n {%- if message.tool_calls -%}\n {{- render_tool_calls(message.tool_calls) -}}\n {%- endif -%}\n {%- if _has_cfm -%}\n {{- _cfm_tag -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endgeneration -%}\n {%- else %}\n {%- if message.get(\"content\") -%}\n {{- parse_content(message[\"content\"]) -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endif %}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n<think>\" -}}\n{%- endif -%}\n"
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
| 12 |
+
"top_p": 0.9,
|
| 13 |
"repetition_penalty": 1.1
|
| 14 |
}
|
| 15 |
}
|
| 16 |
+
}
|
leap/Q4_K_M.json
CHANGED
|
@@ -3,13 +3,14 @@
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q4-k-m.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
|
|
|
| 12 |
"repetition_penalty": 1.1
|
| 13 |
}
|
| 14 |
}
|
| 15 |
-
}
|
|
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q4-k-m.gguf",
|
| 6 |
+
"chat_template": "{{- bos_token -}}\n{%- set preserve_thinking = preserve_thinking | default(false) -%}\n\n{%- macro format_arg_value(arg_value) -%}\n {%- if arg_value is string -%}\n {{- \"'\" + (arg_value | replace(\"\\\\\", \"\\\\\\\\\") | replace(\"'\", \"\\\\'\") | replace(\"\\n\", \"\\\\n\") | replace(\"\\r\", \"\\\\r\")) + \"'\" -}}\n {%- elif arg_value is mapping or arg_value is iterable -%}\n {{- arg_value | tojson -}}\n {%- else -%}\n {{- arg_value | string -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro parse_content(content) -%}\n {%- if content is string -%}\n {{- content -}}\n {%- elif content is mapping -%}\n {{- content | tojson -}}\n {%- elif content is iterable -%}\n {%- set _ns = namespace(result=\"\") -%}\n {%- for item in content -%}\n {%- if item is string -%}\n {%- set _ns.result = _ns.result + item -%}\n {%- elif item is mapping and item.get(\"type\") == \"image\" -%}\n {%- set _ns.result = _ns.result + \"<image>\" -%}\n {%- elif item is mapping and item.get(\"type\") == \"text\" -%}\n {%- set _ns.result = _ns.result + ((item.get(\"text\") or \"\") | string) -%}\n {%- else -%}\n {%- set _ns.result = _ns.result + (item | tojson) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- _ns.result -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro render_tool_calls(tool_calls) -%}\n {%- set tool_calls_ns = namespace(tool_calls=[]) -%}\n {%- for tool_call in tool_calls -%}\n {%- set func = tool_call[\"function\"] if \"function\" in tool_call else tool_call -%}\n {%- set func_name = func[\"name\"] -%}\n {%- set func_args = func.get(\"arguments\") -%}\n {%- set args_ns = namespace(arg_strings=[]) -%}\n {%- if func_args is mapping -%}\n {%- for arg_name, arg_value in func_args.items() -%}\n {%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + \"=\" + format_arg_value(arg_value)] -%}\n {%- endfor -%}\n {%- elif func_args is string and (func_args | trim) not in [\"\", \"{}\", \"null\"] -%}\n {{- raise_exception(\"Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template\") -}}\n {%- endif -%}\n {%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + \"(\" + (args_ns.arg_strings | join(\", \")) + \")\"] -%}\n {%- endfor -%}\n {{- \"<|tool_call_start|>[\" + (tool_calls_ns.tool_calls | join(\", \")) + \"]<|tool_call_end|>\" -}}\n{%- endmacro -%}\n\n{%- set ns = namespace(system_prompt=\"\", last_user_index=-1) -%}\n{%- if messages and messages[0][\"role\"] == \"system\" -%}\n {%- if messages[0].get(\"content\") -%}\n {%- set ns.system_prompt = parse_content(messages[0][\"content\"]) -%}\n {%- endif -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n {%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: [\" -%}\n {%- for tool in tools -%}\n {%- if tool is not string -%}\n {%- set tool = tool | tojson -%}\n {%- endif -%}\n {%- set ns.system_prompt = ns.system_prompt + tool -%}\n {%- if not loop.last -%}\n {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n {%- endif -%}\n {%- endfor -%}\n {%- set ns.system_prompt = ns.system_prompt + \"]\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n {{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n {%- if message[\"role\"] == \"user\" -%}\n {%- set ns.last_user_index = loop.index0 -%}\n {%- endif -%}\n{%- endfor -%}\n{%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" -}}\n {%- if message.role == \"assistant\" -%}\n {%- generation -%}\n {%- set keep_thinking = preserve_thinking or loop.index0 > ns.last_user_index -%}\n {%- set thinking = message.thinking or message.reasoning or message.reasoning_content -%}\n {%- set thinking = thinking if thinking is string else \"\" -%}\n {%- if thinking and keep_thinking -%}\n {{- \"<think>\" + thinking + \"</think>\" -}}\n {%- endif -%}\n {%- set _cfm_tag = \"CONTINUE_FINAL_MESSAGE_TAG \" -%}\n {%- set _has_cfm = false -%}\n {%- set content = \"\" -%}\n {%- if message.get(\"content\") -%}\n {%- set content = parse_content(message.content) -%}\n {%- endif -%}\n {%- if not keep_thinking and \"</think>\" in content -%}\n {%- set content = content.split(\"</think>\")[-1] | trim -%}\n {%- endif -%}\n {%- if content.endswith(_cfm_tag) -%}\n {%- set _has_cfm = true -%}\n {%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}\n {%- set content = content[:_trunc_len] -%}\n {%- endif -%}\n {{- content -}}\n {%- if message.tool_calls -%}\n {{- render_tool_calls(message.tool_calls) -}}\n {%- endif -%}\n {%- if _has_cfm -%}\n {{- _cfm_tag -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endgeneration -%}\n {%- else %}\n {%- if message.get(\"content\") -%}\n {{- parse_content(message[\"content\"]) -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endif %}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n<think>\" -}}\n{%- endif -%}\n"
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
| 12 |
+
"top_p": 0.9,
|
| 13 |
"repetition_penalty": 1.1
|
| 14 |
}
|
| 15 |
}
|
| 16 |
+
}
|
leap/Q5_K_M.json
CHANGED
|
@@ -3,13 +3,14 @@
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q5-k-m.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
|
|
|
| 12 |
"repetition_penalty": 1.1
|
| 13 |
}
|
| 14 |
}
|
| 15 |
-
}
|
|
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q5-k-m.gguf",
|
| 6 |
+
"chat_template": "{{- bos_token -}}\n{%- set preserve_thinking = preserve_thinking | default(false) -%}\n\n{%- macro format_arg_value(arg_value) -%}\n {%- if arg_value is string -%}\n {{- \"'\" + (arg_value | replace(\"\\\\\", \"\\\\\\\\\") | replace(\"'\", \"\\\\'\") | replace(\"\\n\", \"\\\\n\") | replace(\"\\r\", \"\\\\r\")) + \"'\" -}}\n {%- elif arg_value is mapping or arg_value is iterable -%}\n {{- arg_value | tojson -}}\n {%- else -%}\n {{- arg_value | string -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro parse_content(content) -%}\n {%- if content is string -%}\n {{- content -}}\n {%- elif content is mapping -%}\n {{- content | tojson -}}\n {%- elif content is iterable -%}\n {%- set _ns = namespace(result=\"\") -%}\n {%- for item in content -%}\n {%- if item is string -%}\n {%- set _ns.result = _ns.result + item -%}\n {%- elif item is mapping and item.get(\"type\") == \"image\" -%}\n {%- set _ns.result = _ns.result + \"<image>\" -%}\n {%- elif item is mapping and item.get(\"type\") == \"text\" -%}\n {%- set _ns.result = _ns.result + ((item.get(\"text\") or \"\") | string) -%}\n {%- else -%}\n {%- set _ns.result = _ns.result + (item | tojson) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- _ns.result -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro render_tool_calls(tool_calls) -%}\n {%- set tool_calls_ns = namespace(tool_calls=[]) -%}\n {%- for tool_call in tool_calls -%}\n {%- set func = tool_call[\"function\"] if \"function\" in tool_call else tool_call -%}\n {%- set func_name = func[\"name\"] -%}\n {%- set func_args = func.get(\"arguments\") -%}\n {%- set args_ns = namespace(arg_strings=[]) -%}\n {%- if func_args is mapping -%}\n {%- for arg_name, arg_value in func_args.items() -%}\n {%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + \"=\" + format_arg_value(arg_value)] -%}\n {%- endfor -%}\n {%- elif func_args is string and (func_args | trim) not in [\"\", \"{}\", \"null\"] -%}\n {{- raise_exception(\"Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template\") -}}\n {%- endif -%}\n {%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + \"(\" + (args_ns.arg_strings | join(\", \")) + \")\"] -%}\n {%- endfor -%}\n {{- \"<|tool_call_start|>[\" + (tool_calls_ns.tool_calls | join(\", \")) + \"]<|tool_call_end|>\" -}}\n{%- endmacro -%}\n\n{%- set ns = namespace(system_prompt=\"\", last_user_index=-1) -%}\n{%- if messages and messages[0][\"role\"] == \"system\" -%}\n {%- if messages[0].get(\"content\") -%}\n {%- set ns.system_prompt = parse_content(messages[0][\"content\"]) -%}\n {%- endif -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n {%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: [\" -%}\n {%- for tool in tools -%}\n {%- if tool is not string -%}\n {%- set tool = tool | tojson -%}\n {%- endif -%}\n {%- set ns.system_prompt = ns.system_prompt + tool -%}\n {%- if not loop.last -%}\n {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n {%- endif -%}\n {%- endfor -%}\n {%- set ns.system_prompt = ns.system_prompt + \"]\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n {{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n {%- if message[\"role\"] == \"user\" -%}\n {%- set ns.last_user_index = loop.index0 -%}\n {%- endif -%}\n{%- endfor -%}\n{%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" -}}\n {%- if message.role == \"assistant\" -%}\n {%- generation -%}\n {%- set keep_thinking = preserve_thinking or loop.index0 > ns.last_user_index -%}\n {%- set thinking = message.thinking or message.reasoning or message.reasoning_content -%}\n {%- set thinking = thinking if thinking is string else \"\" -%}\n {%- if thinking and keep_thinking -%}\n {{- \"<think>\" + thinking + \"</think>\" -}}\n {%- endif -%}\n {%- set _cfm_tag = \"CONTINUE_FINAL_MESSAGE_TAG \" -%}\n {%- set _has_cfm = false -%}\n {%- set content = \"\" -%}\n {%- if message.get(\"content\") -%}\n {%- set content = parse_content(message.content) -%}\n {%- endif -%}\n {%- if not keep_thinking and \"</think>\" in content -%}\n {%- set content = content.split(\"</think>\")[-1] | trim -%}\n {%- endif -%}\n {%- if content.endswith(_cfm_tag) -%}\n {%- set _has_cfm = true -%}\n {%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}\n {%- set content = content[:_trunc_len] -%}\n {%- endif -%}\n {{- content -}}\n {%- if message.tool_calls -%}\n {{- render_tool_calls(message.tool_calls) -}}\n {%- endif -%}\n {%- if _has_cfm -%}\n {{- _cfm_tag -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endgeneration -%}\n {%- else %}\n {%- if message.get(\"content\") -%}\n {{- parse_content(message[\"content\"]) -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endif %}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n<think>\" -}}\n{%- endif -%}\n"
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
| 12 |
+
"top_p": 0.9,
|
| 13 |
"repetition_penalty": 1.1
|
| 14 |
}
|
| 15 |
}
|
| 16 |
+
}
|
leap/Q6_K.json
CHANGED
|
@@ -3,13 +3,14 @@
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q6-k.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
|
|
|
| 12 |
"repetition_penalty": 1.1
|
| 13 |
}
|
| 14 |
}
|
| 15 |
-
}
|
|
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q6-k.gguf",
|
| 6 |
+
"chat_template": "{{- bos_token -}}\n{%- set preserve_thinking = preserve_thinking | default(false) -%}\n\n{%- macro format_arg_value(arg_value) -%}\n {%- if arg_value is string -%}\n {{- \"'\" + (arg_value | replace(\"\\\\\", \"\\\\\\\\\") | replace(\"'\", \"\\\\'\") | replace(\"\\n\", \"\\\\n\") | replace(\"\\r\", \"\\\\r\")) + \"'\" -}}\n {%- elif arg_value is mapping or arg_value is iterable -%}\n {{- arg_value | tojson -}}\n {%- else -%}\n {{- arg_value | string -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro parse_content(content) -%}\n {%- if content is string -%}\n {{- content -}}\n {%- elif content is mapping -%}\n {{- content | tojson -}}\n {%- elif content is iterable -%}\n {%- set _ns = namespace(result=\"\") -%}\n {%- for item in content -%}\n {%- if item is string -%}\n {%- set _ns.result = _ns.result + item -%}\n {%- elif item is mapping and item.get(\"type\") == \"image\" -%}\n {%- set _ns.result = _ns.result + \"<image>\" -%}\n {%- elif item is mapping and item.get(\"type\") == \"text\" -%}\n {%- set _ns.result = _ns.result + ((item.get(\"text\") or \"\") | string) -%}\n {%- else -%}\n {%- set _ns.result = _ns.result + (item | tojson) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- _ns.result -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro render_tool_calls(tool_calls) -%}\n {%- set tool_calls_ns = namespace(tool_calls=[]) -%}\n {%- for tool_call in tool_calls -%}\n {%- set func = tool_call[\"function\"] if \"function\" in tool_call else tool_call -%}\n {%- set func_name = func[\"name\"] -%}\n {%- set func_args = func.get(\"arguments\") -%}\n {%- set args_ns = namespace(arg_strings=[]) -%}\n {%- if func_args is mapping -%}\n {%- for arg_name, arg_value in func_args.items() -%}\n {%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + \"=\" + format_arg_value(arg_value)] -%}\n {%- endfor -%}\n {%- elif func_args is string and (func_args | trim) not in [\"\", \"{}\", \"null\"] -%}\n {{- raise_exception(\"Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template\") -}}\n {%- endif -%}\n {%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + \"(\" + (args_ns.arg_strings | join(\", \")) + \")\"] -%}\n {%- endfor -%}\n {{- \"<|tool_call_start|>[\" + (tool_calls_ns.tool_calls | join(\", \")) + \"]<|tool_call_end|>\" -}}\n{%- endmacro -%}\n\n{%- set ns = namespace(system_prompt=\"\", last_user_index=-1) -%}\n{%- if messages and messages[0][\"role\"] == \"system\" -%}\n {%- if messages[0].get(\"content\") -%}\n {%- set ns.system_prompt = parse_content(messages[0][\"content\"]) -%}\n {%- endif -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n {%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: [\" -%}\n {%- for tool in tools -%}\n {%- if tool is not string -%}\n {%- set tool = tool | tojson -%}\n {%- endif -%}\n {%- set ns.system_prompt = ns.system_prompt + tool -%}\n {%- if not loop.last -%}\n {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n {%- endif -%}\n {%- endfor -%}\n {%- set ns.system_prompt = ns.system_prompt + \"]\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n {{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n {%- if message[\"role\"] == \"user\" -%}\n {%- set ns.last_user_index = loop.index0 -%}\n {%- endif -%}\n{%- endfor -%}\n{%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" -}}\n {%- if message.role == \"assistant\" -%}\n {%- generation -%}\n {%- set keep_thinking = preserve_thinking or loop.index0 > ns.last_user_index -%}\n {%- set thinking = message.thinking or message.reasoning or message.reasoning_content -%}\n {%- set thinking = thinking if thinking is string else \"\" -%}\n {%- if thinking and keep_thinking -%}\n {{- \"<think>\" + thinking + \"</think>\" -}}\n {%- endif -%}\n {%- set _cfm_tag = \"CONTINUE_FINAL_MESSAGE_TAG \" -%}\n {%- set _has_cfm = false -%}\n {%- set content = \"\" -%}\n {%- if message.get(\"content\") -%}\n {%- set content = parse_content(message.content) -%}\n {%- endif -%}\n {%- if not keep_thinking and \"</think>\" in content -%}\n {%- set content = content.split(\"</think>\")[-1] | trim -%}\n {%- endif -%}\n {%- if content.endswith(_cfm_tag) -%}\n {%- set _has_cfm = true -%}\n {%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}\n {%- set content = content[:_trunc_len] -%}\n {%- endif -%}\n {{- content -}}\n {%- if message.tool_calls -%}\n {{- render_tool_calls(message.tool_calls) -}}\n {%- endif -%}\n {%- if _has_cfm -%}\n {{- _cfm_tag -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endgeneration -%}\n {%- else %}\n {%- if message.get(\"content\") -%}\n {{- parse_content(message[\"content\"]) -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endif %}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n<think>\" -}}\n{%- endif -%}\n"
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
| 12 |
+
"top_p": 0.9,
|
| 13 |
"repetition_penalty": 1.1
|
| 14 |
}
|
| 15 |
}
|
| 16 |
+
}
|
leap/Q8_0.json
CHANGED
|
@@ -3,13 +3,14 @@
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q8-0.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
|
|
|
| 12 |
"repetition_penalty": 1.1
|
| 13 |
}
|
| 14 |
}
|
| 15 |
-
}
|
|
|
|
| 3 |
"schema_version": "1.0.0",
|
| 4 |
"load_time_parameters": {
|
| 5 |
"model": "../ggufs/Mew1-2.6B-q8-0.gguf",
|
| 6 |
+
"chat_template": "{{- bos_token -}}\n{%- set preserve_thinking = preserve_thinking | default(false) -%}\n\n{%- macro format_arg_value(arg_value) -%}\n {%- if arg_value is string -%}\n {{- \"'\" + (arg_value | replace(\"\\\\\", \"\\\\\\\\\") | replace(\"'\", \"\\\\'\") | replace(\"\\n\", \"\\\\n\") | replace(\"\\r\", \"\\\\r\")) + \"'\" -}}\n {%- elif arg_value is mapping or arg_value is iterable -%}\n {{- arg_value | tojson -}}\n {%- else -%}\n {{- arg_value | string -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro parse_content(content) -%}\n {%- if content is string -%}\n {{- content -}}\n {%- elif content is mapping -%}\n {{- content | tojson -}}\n {%- elif content is iterable -%}\n {%- set _ns = namespace(result=\"\") -%}\n {%- for item in content -%}\n {%- if item is string -%}\n {%- set _ns.result = _ns.result + item -%}\n {%- elif item is mapping and item.get(\"type\") == \"image\" -%}\n {%- set _ns.result = _ns.result + \"<image>\" -%}\n {%- elif item is mapping and item.get(\"type\") == \"text\" -%}\n {%- set _ns.result = _ns.result + ((item.get(\"text\") or \"\") | string) -%}\n {%- else -%}\n {%- set _ns.result = _ns.result + (item | tojson) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- _ns.result -}}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro render_tool_calls(tool_calls) -%}\n {%- set tool_calls_ns = namespace(tool_calls=[]) -%}\n {%- for tool_call in tool_calls -%}\n {%- set func = tool_call[\"function\"] if \"function\" in tool_call else tool_call -%}\n {%- set func_name = func[\"name\"] -%}\n {%- set func_args = func.get(\"arguments\") -%}\n {%- set args_ns = namespace(arg_strings=[]) -%}\n {%- if func_args is mapping -%}\n {%- for arg_name, arg_value in func_args.items() -%}\n {%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + \"=\" + format_arg_value(arg_value)] -%}\n {%- endfor -%}\n {%- elif func_args is string and (func_args | trim) not in [\"\", \"{}\", \"null\"] -%}\n {{- raise_exception(\"Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template\") -}}\n {%- endif -%}\n {%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + \"(\" + (args_ns.arg_strings | join(\", \")) + \")\"] -%}\n {%- endfor -%}\n {{- \"<|tool_call_start|>[\" + (tool_calls_ns.tool_calls | join(\", \")) + \"]<|tool_call_end|>\" -}}\n{%- endmacro -%}\n\n{%- set ns = namespace(system_prompt=\"\", last_user_index=-1) -%}\n{%- if messages and messages[0][\"role\"] == \"system\" -%}\n {%- if messages[0].get(\"content\") -%}\n {%- set ns.system_prompt = parse_content(messages[0][\"content\"]) -%}\n {%- endif -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n {%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: [\" -%}\n {%- for tool in tools -%}\n {%- if tool is not string -%}\n {%- set tool = tool | tojson -%}\n {%- endif -%}\n {%- set ns.system_prompt = ns.system_prompt + tool -%}\n {%- if not loop.last -%}\n {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n {%- endif -%}\n {%- endfor -%}\n {%- set ns.system_prompt = ns.system_prompt + \"]\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n {{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n {%- if message[\"role\"] == \"user\" -%}\n {%- set ns.last_user_index = loop.index0 -%}\n {%- endif -%}\n{%- endfor -%}\n{%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" -}}\n {%- if message.role == \"assistant\" -%}\n {%- generation -%}\n {%- set keep_thinking = preserve_thinking or loop.index0 > ns.last_user_index -%}\n {%- set thinking = message.thinking or message.reasoning or message.reasoning_content -%}\n {%- set thinking = thinking if thinking is string else \"\" -%}\n {%- if thinking and keep_thinking -%}\n {{- \"<think>\" + thinking + \"</think>\" -}}\n {%- endif -%}\n {%- set _cfm_tag = \"CONTINUE_FINAL_MESSAGE_TAG \" -%}\n {%- set _has_cfm = false -%}\n {%- set content = \"\" -%}\n {%- if message.get(\"content\") -%}\n {%- set content = parse_content(message.content) -%}\n {%- endif -%}\n {%- if not keep_thinking and \"</think>\" in content -%}\n {%- set content = content.split(\"</think>\")[-1] | trim -%}\n {%- endif -%}\n {%- if content.endswith(_cfm_tag) -%}\n {%- set _has_cfm = true -%}\n {%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}\n {%- set content = content[:_trunc_len] -%}\n {%- endif -%}\n {{- content -}}\n {%- if message.tool_calls -%}\n {{- render_tool_calls(message.tool_calls) -}}\n {%- endif -%}\n {%- if _has_cfm -%}\n {{- _cfm_tag -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endgeneration -%}\n {%- else %}\n {%- if message.get(\"content\") -%}\n {{- parse_content(message[\"content\"]) -}}\n {%- endif -%}\n {{- \"<|im_end|>\\n\" -}}\n {%- endif %}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n<think>\" -}}\n{%- endif -%}\n"
|
| 7 |
},
|
| 8 |
"generation_time_parameters": {
|
| 9 |
"sampling_parameters": {
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 50,
|
| 12 |
+
"top_p": 0.9,
|
| 13 |
"repetition_penalty": 1.1
|
| 14 |
}
|
| 15 |
}
|
| 16 |
+
}
|