Text Generation
Transformers
Safetensors
English
qwen3
klm
keylm
small-language-model
base
pretrained
gqa
rope
swiglu
qk-norm
text-generation-inference
Instructions to use MinimaLabs/KLM-1.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MinimaLabs/KLM-1.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MinimaLabs/KLM-1.1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MinimaLabs/KLM-1.1") model = AutoModelForCausalLM.from_pretrained("MinimaLabs/KLM-1.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MinimaLabs/KLM-1.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MinimaLabs/KLM-1.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MinimaLabs/KLM-1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MinimaLabs/KLM-1.1
- SGLang
How to use MinimaLabs/KLM-1.1 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 "MinimaLabs/KLM-1.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MinimaLabs/KLM-1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "MinimaLabs/KLM-1.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MinimaLabs/KLM-1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MinimaLabs/KLM-1.1 with Docker Model Runner:
docker model run hf.co/MinimaLabs/KLM-1.1
KLM 1.1 base model
Browse files- LICENSE +201 -0
- README.md +192 -0
- charts/banner.svg +4 -0
- charts/jump.svg +57 -0
- charts/leaderboard.svg +74 -0
- charts/progress.svg +80 -0
- config.json +59 -0
- generation_config.json +10 -0
- model.safetensors +3 -0
- special_tokens_map.json +9 -0
- tokenizer.json +0 -0
- tokenizer_config.json +11 -0
LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright [yyyy] [name of copyright owner]
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
base_model: MinimaLabs/KeyLM-75M
|
| 8 |
+
tags:
|
| 9 |
+
- klm
|
| 10 |
+
- keylm
|
| 11 |
+
- small-language-model
|
| 12 |
+
- base
|
| 13 |
+
- pretrained
|
| 14 |
+
- gqa
|
| 15 |
+
- rope
|
| 16 |
+
- swiglu
|
| 17 |
+
- qk-norm
|
| 18 |
+
datasets:
|
| 19 |
+
- mlfoundations/dclm-baseline-1.0
|
| 20 |
+
- HuggingFaceTB/smollm-corpus
|
| 21 |
+
- openbmb/UltraData-Math
|
| 22 |
+
- nvidia/OpenMathInstruct-2
|
| 23 |
+
- IFM/Pretrain-Behaviors
|
| 24 |
+
- IFM/Code-Reasoning
|
| 25 |
+
- openbmb/UltraX-Preview
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
|
| 30 |
+
# KLM 1.1
|
| 31 |
+
|
| 32 |
+
**KLM 1.1 is an 88M-parameter base language model, the continued training of KeyLM-75M.** It scores 17.40 on the Open SLM Intelligence Index, up from KeyLM-75M's 10.44. That moves it from 38th to 9th among models under 100M parameters on the Open SLM leaderboard.
|
| 33 |
+
|
| 34 |
+
KeyLM is now KLM. This release keeps the KeyLM architecture and continues from its weights.
|
| 35 |
+
|
| 36 |
+
## Why KLM 1.1 exists
|
| 37 |
+
|
| 38 |
+
KeyLM-75M was the first model I trained, and it was flawed in many ways. Most of its data was casual chat (Reddit, WildChat, LMSYS and similar), its tokenizer was small, and it stopped at about 18B tokens while still at a high learning rate. It is currently 38th on the leaderboard among models under 100M parameters.
|
| 39 |
+
|
| 40 |
+
The goal of KLM 1.1 was to find out how far that same base model could be pushed by more training alone, without changing its architecture. Over about 120B more tokens, I gave it a larger tokenizer, retrained it on a cleaner, education-, math- and reasoning-heavy mix, and ended with a proper learning-rate decay.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+
The gain shows up on every benchmark, most on ARC-Easy (+8.6 points) and ArithMark-3 (+5.7).
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+
| | KeyLM-75M | KLM 1.1 |
|
| 49 |
+
|---|---|---|
|
| 50 |
+
| Int Index | 10.44 | **17.40** |
|
| 51 |
+
| Rank, under 100M | #38 | **#9** |
|
| 52 |
+
| HellaSwag | 29.66% | **33.65%** |
|
| 53 |
+
| ARC-Easy | 35.73% | **44.36%** |
|
| 54 |
+
| ARC-Challenge | 23.98% | **25.17%** |
|
| 55 |
+
| PIQA | 60.50% | **64.80%** |
|
| 56 |
+
| ArithMark-3 | 30.10% | **35.80%** |
|
| 57 |
+
| Parameters | 75.3M | 88.1M |
|
| 58 |
+
| Vocabulary | 12,020 | 24,576 |
|
| 59 |
+
| Training tokens | ~18.7B | ~138.6B in total |
|
| 60 |
+
|
| 61 |
+
## How it was trained
|
| 62 |
+
|
| 63 |
+
KLM 1.1 went through three stages after KeyLM-75M, each continuing from the last one's weights:
|
| 64 |
+
|
| 65 |
+
| Stage | Tokens | What changed | Int Index after |
|
| 66 |
+
|---|---|---|---|
|
| 67 |
+
| KeyLM-75M (start) | 18.7B | | 10.47 |
|
| 68 |
+
| Tokenizer expansion | 20.0B | Vocabulary grown from 12,020 to 24,576 tokens; trained on web, math and code | 15.15 |
|
| 69 |
+
| Short continuation | 5.0B | Same mix, learning rate re-warmed | 15.52 |
|
| 70 |
+
| Long continuation | 94.9B | New mix, 4-GPU DiLoCo, warmup-stable-decay schedule | **17.40** |
|
| 71 |
+
|
| 72 |
+
Int Index values in this table are from our own evaluation runs. Our harness scores KeyLM-75M at 10.47; the leaderboard lists 10.44.
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
|
| 76 |
+
Held-out loss fell at every evaluation of the long continuation, from 2.131 to 1.814 nats per token, averaged over held-out text from each of its 11 data sources. Most of the benchmark gain arrived in the final learning-rate decay.
|
| 77 |
+
|
| 78 |
+
### Tokenizer expansion
|
| 79 |
+
|
| 80 |
+
The 24,576-token vocabulary keeps all of KeyLM-75M's tokens and adds 12,299 new byte-level BPE merges learned on the training mix. Each new token starts from the average of the old tokens it replaces. The larger vocabulary encodes the same text in 1.31–1.41× fewer tokens, with the biggest savings on code and math. This stage trained on [UltraX Ultra-FineWeb](https://huggingface.co/datasets/openbmb/UltraX-Preview) web text (80%), [UltraData-Math](https://huggingface.co/datasets/openbmb/UltraData-Math) (15%) and [Code-Reasoning](https://huggingface.co/datasets/IFM/Code-Reasoning) (5%).
|
| 81 |
+
|
| 82 |
+
### Long continuation
|
| 83 |
+
|
| 84 |
+
The long continuation ran 1,810 rounds of DiLoCo across four GPUs. Each GPU trained 100 steps on its own slice of the data, and the four sets of changes were then merged. The learning rate warmed up to 3e-5, held there for the first 80% of the run (75.9B tokens), then decayed linearly to 10% of peak over the final 20% (19.0B tokens). The decay used a mix heavier in math and textbooks.
|
| 85 |
+
|
| 86 |
+
| Source | Stable phase | Decay phase |
|
| 87 |
+
|---|---:|---:|
|
| 88 |
+
| [DCLM-baseline](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0) web text | 35% | 20% |
|
| 89 |
+
| [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus) (dedup) | 30% | 25% |
|
| 90 |
+
| [Cosmopedia v2](https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus) synthetic textbooks | 15% | 20% |
|
| 91 |
+
| [UltraData-Math](https://huggingface.co/datasets/openbmb/UltraData-Math) L2 | 12.5% | 11% |
|
| 92 |
+
| UltraData-Math L3 textbook exercises and QA | 2.5% | 6% |
|
| 93 |
+
| [OpenMathInstruct-2](https://huggingface.co/datasets/nvidia/OpenMathInstruct-2) problems with solutions | | 8% |
|
| 94 |
+
| [Pretrain-Behaviors](https://huggingface.co/datasets/IFM/Pretrain-Behaviors) reasoning and format rewrites | 3% | 8% |
|
| 95 |
+
| [Code-Reasoning](https://huggingface.co/datasets/IFM/Code-Reasoning) | 2% | 2% |
|
| 96 |
+
|
| 97 |
+
All sources were filtered before training. The filters dropped documents the model had already trained on, exact repeats, empty documents, and any document sharing a 13-word sequence with an item from the five evaluation sets.
|
| 98 |
+
|
| 99 |
+
| Field | Value |
|
| 100 |
+
|---|---|
|
| 101 |
+
| Optimizer | AdamW (betas 0.9 / 0.95, weight decay 0.1), state carried over from the previous stage |
|
| 102 |
+
| DiLoCo | 4 workers, 100 inner steps per round, outer learning rate 0.7 with Nesterov momentum 0.9 |
|
| 103 |
+
| Batch | 64 × 2,048 tokens per worker step (524,288 tokens per step across the four workers) |
|
| 104 |
+
| Precision | bf16 autocast over fp32 weights |
|
| 105 |
+
| Gradient clipping | 1.0 |
|
| 106 |
+
|
| 107 |
+
## Evaluation
|
| 108 |
+
|
| 109 |
+
All scores are zero-shot. ARC, HellaSwag and PIQA use lm-eval 0.4.12 with length-normalized accuracy. ArithMark-3 uses the official [ArithMark-3.0](https://huggingface.co/datasets/AxiomicLabs/ArithMark-3.0) script. Our harness reproduces the leaderboard's published KeyLM numbers to within ±0.17 points per task.
|
| 110 |
+
|
| 111 |
+
The Intelligence Index is the Open SLM leaderboard's summary score. Each benchmark is rescaled so that random guessing scores 0 and a perfect score is 100, then averaged, with ARC as the mean of Easy and Challenge:
|
| 112 |
+
|
| 113 |
+
```
|
| 114 |
+
Int Index = (HellaSwag + ARC + PIQA + 0.65 × ArithMark-3) / 3.65
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
The table lists the models ranked just above and below KLM 1.1 among models under 100M parameters, with scores from the leaderboard (snapshot 2026-10-11).
|
| 118 |
+
|
| 119 |
+
| Rank | Model | Params | ARC-Easy | ARC-Challenge | HellaSwag | PIQA | ArithMark-3 | Int Index |
|
| 120 |
+
|---|---|---|---|---|---|---|---|---|
|
| 121 |
+
| 1 | [void.1](https://huggingface.co/dotlabs/void.1) | 90.2M | 47.31% | 28.16% | 38.68% | 67.46% | 44.80% | 23.92 |
|
| 122 |
+
| 2 | [100M-exp](https://huggingface.co/User01110/100M-exp) | 98.2M | 49.83% | 27.22% | 37.78% | 66.97% | 40.00% | 22.47 |
|
| 123 |
+
| 3 | [Rose-1.5-Medium](https://huggingface.co/GODELEV/Rose-1.5-Medium) | 98.2M | 47.22% | 27.13% | 38.09% | 64.80% | 40.70% | 21.07 |
|
| 124 |
+
| 4 | [tinctura-v1](https://huggingface.co/bench-labs/tinctura-v1) | 96.2M | 47.98% | 25.77% | 37.96% | 65.61% | 38.40% | 20.81 |
|
| 125 |
+
| 5 | [Surjo-100m](https://huggingface.co/SurjoLabs/Surjo-100m) | 97.7M | 47.64% | 25.85% | 35.05% | 63.87% | 38.90% | 18.86 |
|
| 126 |
+
| 6 | [cRia-LM-75M](https://huggingface.co/sz14/cRia-LM-75M) | 75.7M | 46.97% | 25.77% | 35.49% | 63.93% | 35.30% | 18.06 |
|
| 127 |
+
| 7 | [50M-pro](https://huggingface.co/fromziro/50M-pro) | 49.6M | 45.62% | 25.51% | 33.25% | 64.80% | 37.40% | 17.93 |
|
| 128 |
+
| 8 | [Rose-Medium](https://huggingface.co/GODELEV/Rose-Medium) | 97.8M | 44.19% | 26.19% | 35.29% | 62.94% | 38.30% | 17.73 |
|
| 129 |
+
| **9** | **KLM 1.1** | **88.1M** | **44.36%** | **25.17%** | **33.65%** | **64.80%** | **35.80%** | **17.40** |
|
| 130 |
+
| 10 | [Surjo-50M](https://huggingface.co/SurjoLabs/Surjo-50m) | 53.8M | 44.99% | 25.94% | 31.37% | 63.11% | 37.90% | 16.40 |
|
| 131 |
+
| 11 | [gibc-v2-lm](https://huggingface.co/Unluckyexe/gibc-v2-lm) | 49.8M | 47.85% | 26.11% | 31.87% | 60.28% | 40.20% | 16.13 |
|
| 132 |
+
| 38 | [KeyLM-75M](https://huggingface.co/MinimaLabs/KeyLM-75M) | 75.3M | 35.73% | 23.98% | 29.66% | 60.50% | 30.10% | 10.44 |
|
| 133 |
+
|
| 134 |
+
## Architecture
|
| 135 |
+
|
| 136 |
+
KLM 1.1 keeps the KeyLM-75M architecture unchanged. Only the embedding and output layers grew with the vocabulary, from 75.3M to 88.1M parameters.
|
| 137 |
+
|
| 138 |
+
| Field | Value |
|
| 139 |
+
|---|---|
|
| 140 |
+
| Parameters | 88,108,544 |
|
| 141 |
+
| Architecture | Decoder-only transformer (Llama/Qwen3-style) |
|
| 142 |
+
| Layers | 24 |
|
| 143 |
+
| Hidden size | 512 |
|
| 144 |
+
| Attention | 8 query heads, 2 KV heads (GQA), per-head QK-RMSNorm |
|
| 145 |
+
| Feed-forward | SwiGLU, hidden size 1,280 |
|
| 146 |
+
| Position encoding | RoPE (theta 10,000) |
|
| 147 |
+
| Context length | 2,048 tokens |
|
| 148 |
+
| Vocabulary | 24,576 (byte-level BPE) |
|
| 149 |
+
| Embeddings | Untied input and output |
|
| 150 |
+
| Weights | fp32 safetensors, as trained |
|
| 151 |
+
|
| 152 |
+
The weights load as a standard Transformers `Qwen3ForCausalLM`, since the network computes exactly what that class computes. No custom code is needed, and tools that support Qwen3 can run it.
|
| 153 |
+
|
| 154 |
+
## Usage
|
| 155 |
+
|
| 156 |
+
```python
|
| 157 |
+
import torch
|
| 158 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 159 |
+
|
| 160 |
+
model_id = "MinimaLabs/KLM-1.1"
|
| 161 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 162 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16)
|
| 163 |
+
|
| 164 |
+
inputs = tokenizer("The three primary colors are", return_tensors="pt")
|
| 165 |
+
outputs = model.generate(
|
| 166 |
+
**inputs, max_new_tokens=40, do_sample=True,
|
| 167 |
+
temperature=0.7, top_p=0.9, repetition_penalty=1.1,
|
| 168 |
+
)
|
| 169 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
## Limitations
|
| 173 |
+
|
| 174 |
+
- **Base model only.** KLM 1.1 completes text. It is not instruction-tuned and does not hold a conversation. The tokenizer has ChatML tokens (`<|im_start|>`, `<|im_end|>`), but the model never saw them in training.
|
| 175 |
+
- **Small model.** Its world knowledge is thin and its facts are often wrong. Do not rely on it for factual answers, math or code.
|
| 176 |
+
- English only, with a 2,048-token context window.
|
| 177 |
+
- No safety alignment. Add your own filtering before any user-facing use.
|
| 178 |
+
|
| 179 |
+
## License
|
| 180 |
+
|
| 181 |
+
Apache-2.0. See [LICENSE](LICENSE).
|
| 182 |
+
|
| 183 |
+
## Citation
|
| 184 |
+
|
| 185 |
+
```bibtex
|
| 186 |
+
@misc{klm11_2026,
|
| 187 |
+
title = {KLM 1.1: continued training of KeyLM-75M},
|
| 188 |
+
author = {Eclipse-Senpai},
|
| 189 |
+
year = {2026},
|
| 190 |
+
howpublished = {\url{https://huggingface.co/MinimaLabs/KLM-1.1}}
|
| 191 |
+
}
|
| 192 |
+
```
|
charts/banner.svg
ADDED
|
|
charts/jump.svg
ADDED
|
|
charts/leaderboard.svg
ADDED
|
|
charts/progress.svg
ADDED
|
|
config.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"dtype": "float32",
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 512,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 1280,
|
| 15 |
+
"layer_types": [
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention"
|
| 40 |
+
],
|
| 41 |
+
"max_position_embeddings": 2048,
|
| 42 |
+
"max_window_layers": 28,
|
| 43 |
+
"model_type": "qwen3",
|
| 44 |
+
"num_attention_heads": 8,
|
| 45 |
+
"num_hidden_layers": 24,
|
| 46 |
+
"num_key_value_heads": 2,
|
| 47 |
+
"pad_token_id": 2,
|
| 48 |
+
"rms_norm_eps": 1e-06,
|
| 49 |
+
"rope_parameters": {
|
| 50 |
+
"rope_theta": 10000.0,
|
| 51 |
+
"rope_type": "default"
|
| 52 |
+
},
|
| 53 |
+
"sliding_window": null,
|
| 54 |
+
"tie_word_embeddings": false,
|
| 55 |
+
"transformers_version": "5.19.0",
|
| 56 |
+
"use_cache": true,
|
| 57 |
+
"use_sliding_window": false,
|
| 58 |
+
"vocab_size": 24576
|
| 59 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"pad_token_id": 2,
|
| 8 |
+
"transformers_version": "5.19.0",
|
| 9 |
+
"use_cache": true
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71a06958227c22560ac43a07a1ded5b149e0ce64a2182b448f39336f5bb65d8c
|
| 3 |
+
size 352463752
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"eos_token": "</s>",
|
| 4 |
+
"unk_token": "[UNK]",
|
| 5 |
+
"additional_special_tokens": [
|
| 6 |
+
"<|im_start|>",
|
| 7 |
+
"<|im_end|>"
|
| 8 |
+
]
|
| 9 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"eos_token": "</s>",
|
| 4 |
+
"lowercase": false,
|
| 5 |
+
"model_max_length": 2048,
|
| 6 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 7 |
+
"unk_token": "[UNK]",
|
| 8 |
+
"add_bos_token": false,
|
| 9 |
+
"add_eos_token": false,
|
| 10 |
+
"clean_up_tokenization_spaces": false
|
| 11 |
+
}
|