ToTo-40417 commited on
Commit
8ac1edb
·
unverified ·
1 Parent(s): 80300e5

Add LM Studio GGUF companion

Browse files
.gitattributes CHANGED
@@ -32,5 +32,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  weights/model.q12 filter=lfs diff=lfs merge=lfs -text
 
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *.gguf filter=lfs diff=lfs merge=lfs -text
36
  *tfevents* filter=lfs diff=lfs merge=lfs -text
37
  weights/model.q12 filter=lfs diff=lfs merge=lfs -text
EXLLM-0.005B-LMStudio-F16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f649e74fd006c4c487a141307a7598531a1ff1ce8ba5e45d45f9c590f399759
3
+ size 10915168
README.md CHANGED
@@ -2,15 +2,15 @@
2
  license: apache-2.0
3
  language: [ja]
4
  pipeline_tag: text-generation
5
- library_name: pytorch
6
- tags: [japanese, instruction-tuning, tiny-language-model, edge-ai, embedded-ai, ex-word, custom-code]
7
  ---
8
 
9
  # EXLLM-0.005B-Instruct
10
 
11
- EXLLM-0.005B-Instruct is a **0.005377824B-parameter** Japanese instruction model for local inference on low-memory embedded hardware. The primary deployment target is the CASIO EX-word XD-B4800. A PyTorch reference runtime is provided for host-side inference and evaluation.
12
 
13
- The model uses a custom decoder-only Transformer and a hybrid character/UTF-8-byte tokenizer. It is not compatible with the standard `transformers` auto classes, GGUF, llama.cpp, or LM Studio without an architecture-specific implementation.
14
 
15
  日本語版の説明は[こちら](#日本語)です。
16
 
@@ -24,6 +24,7 @@ The model uses a custom decoder-only Transformer and a hybrid character/UTF-8-by
24
  - Reference inference at **239.082 token/s** on an RTX 3060
25
  - Integer inference at **0.52–0.55 token/s** on a 0.024184 GHz SH-4A-class CPU
26
  - Apache-2.0 weights and reference code
 
27
 
28
  ## Model Details
29
 
@@ -117,6 +118,21 @@ These are internal regression tests for the intended application scope. They are
117
 
118
  ## Usage
119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  ```bash
121
  git clone https://huggingface.co/ToTo-40417/EXLLM
122
  cd EXLLM
@@ -150,6 +166,7 @@ print(answer(model, tokenizer, "RAMとは何ですか?", temperature=0.0))
150
  | `weights/EXLLM-v1.1-5m-release3.pt` | 21,526,737 bytes (20.53 MiB; 0.021526737 GB) | `48ad00c6640689595a253fc949cad83f3000e14cccdf69275fcf245e85be3ceb` | fp32 PyTorch checkpoint |
151
  | `weights/EXLLM-v1.1-5m-int8.bin` | 5,443,105 bytes (5.19 MiB; 0.005443105 GB) | `3b2bf2d9f103cba714bc98976709c5ad34860c1ff55fed2fce91fc95afb5b34a` | EXLLM8 interchange artifact |
152
  | `weights/model.q12` | 5,443,105 bytes (5.19 MiB; 0.005443105 GB) | `d64037fde791e5c0e48101bc1a8ab366a3287f1f36b4464879e36495ea7e5a53` | EX-word EXQ12 artifact |
 
153
 
154
  EXLLM8 and EXQ12 have the same file size but are not interchangeable formats.
155
 
@@ -170,7 +187,7 @@ EXLLM8 and EXQ12 have the same file size but are not interchangeable formats.
170
  - No RLHF, DPO, tool use, retrieval, web access, or current-information source is included.
171
  - The deterministic calculator is runtime routing, not learned arithmetic capability.
172
  - The model must not be used as an authority for medical, legal, financial, safety-critical, or other high-stakes decisions.
173
- - Standard Hugging Face Inference Providers cannot serve this checkpoint without custom architecture support.
174
 
175
  ## Links
176
 
@@ -180,9 +197,9 @@ EXLLM8 and EXQ12 have the same file size but are not interchangeable formats.
180
 
181
  ## 日本語
182
 
183
- EXLLM-0.005B-Instructは、低メモリ組込み機器でのローカル推論を目的とした、**0.005377824Bパラメータ**の日本語instruction modelです。主な実装対象はCASIO EX-word XD-B4800です。
184
 
185
- 独自のdecoder-only Transformerと、頻出日本語文字・UTF-8 byte fallbackを組み合わせたtokenizerを使用します。標準`transformers`、GGUF、llama.cpp、LM Studioとの直接互換性はありません。
186
 
187
  RTX 3060でのfp32参照実行は、40回のwarm-up後に120回測定し、TTFT中央値0.003990秒、生成速度239.082 token/sでした。EX-word整数runtimeでは、0.024184 GHzのSH-4A-class CPU上でTTFT中央値23.711秒、生成速度0.52–0.55 token/sでした。
188
 
 
2
  license: apache-2.0
3
  language: [ja]
4
  pipeline_tag: text-generation
5
+ library_name: gguf
6
+ tags: [japanese, instruction-tuning, tiny-language-model, edge-ai, embedded-ai, ex-word, gguf, llama-cpp, lm-studio, custom-code]
7
  ---
8
 
9
  # EXLLM-0.005B-Instruct
10
 
11
+ EXLLM-0.005B-Instruct is a **0.005377824B-parameter** Japanese instruction model for local inference on low-memory embedded hardware. The primary deployment target is the CASIO EX-word XD-B4800. A PyTorch reference runtime is provided for host-side inference and evaluation. This repository also includes a separately trained **0.005441184B-parameter** Llama-compatible GGUF companion for LM Studio and llama.cpp.
12
 
13
+ The embedded checkpoint uses a custom decoder-only Transformer and a hybrid character/UTF-8-byte tokenizer; it is not directly compatible with standard `transformers` auto classes or GGUF runtimes. Use `EXLLM-0.005B-LMStudio-F16.gguf` for LM Studio or llama.cpp. The GGUF is a companion model trained on the EXLLM project data, not a numerical conversion of the embedded checkpoint.
14
 
15
  日本語版の説明は[こちら](#日本語)です。
16
 
 
24
  - Reference inference at **239.082 token/s** on an RTX 3060
25
  - Integer inference at **0.52–0.55 token/s** on a 0.024184 GHz SH-4A-class CPU
26
  - Apache-2.0 weights and reference code
27
+ - Ready-to-run **0.010915168 GB** F16 GGUF companion for LM Studio
28
 
29
  ## Model Details
30
 
 
118
 
119
  ## Usage
120
 
121
+ ### LM Studio / llama.cpp
122
+
123
+ In LM Studio, search for `ToTo-40417/EXLLM`, download `EXLLM-0.005B-LMStudio-F16.gguf`, and start a chat. The required single-turn chat template is embedded in the GGUF. Keep the context length at **128 tokens** and use greedy decoding or a low temperature; the model is intentionally tiny and is intended for short Japanese prompts.
124
+
125
+ With llama.cpp:
126
+
127
+ ```bash
128
+ llama-cli -m EXLLM-0.005B-LMStudio-F16.gguf \
129
+ -p "RAMとは何ですか?" -n 48 --temp 0 --ctx-size 128 --single-turn
130
+ ```
131
+
132
+ The GGUF companion uses a Llama-compatible decoder, a 1,024-piece SentencePiece tokenizer with byte fallback, 6 layers, hidden size 288, intermediate size 608, 9 attention/KV heads, and a 128-token context. It was trained separately for five epochs (3,325 optimizer steps) on 85,005 project-data records; best validation loss was 0.0390303. Exact metadata is in [`lmstudio/training_manifest.json`](lmstudio/training_manifest.json).
133
+
134
+ ### Original EXLLM reference runtime
135
+
136
  ```bash
137
  git clone https://huggingface.co/ToTo-40417/EXLLM
138
  cd EXLLM
 
166
  | `weights/EXLLM-v1.1-5m-release3.pt` | 21,526,737 bytes (20.53 MiB; 0.021526737 GB) | `48ad00c6640689595a253fc949cad83f3000e14cccdf69275fcf245e85be3ceb` | fp32 PyTorch checkpoint |
167
  | `weights/EXLLM-v1.1-5m-int8.bin` | 5,443,105 bytes (5.19 MiB; 0.005443105 GB) | `3b2bf2d9f103cba714bc98976709c5ad34860c1ff55fed2fce91fc95afb5b34a` | EXLLM8 interchange artifact |
168
  | `weights/model.q12` | 5,443,105 bytes (5.19 MiB; 0.005443105 GB) | `d64037fde791e5c0e48101bc1a8ab366a3287f1f36b4464879e36495ea7e5a53` | EX-word EXQ12 artifact |
169
+ | `EXLLM-0.005B-LMStudio-F16.gguf` | 10,915,168 bytes (10.41 MiB; 0.010915168 GB) | `6f649e74fd006c4c487a141307a7598531a1ff1ce8ba5e45d45f9c590f399759` | Separately trained Llama-compatible F16 companion for LM Studio / llama.cpp |
170
 
171
  EXLLM8 and EXQ12 have the same file size but are not interchangeable formats.
172
 
 
187
  - No RLHF, DPO, tool use, retrieval, web access, or current-information source is included.
188
  - The deterministic calculator is runtime routing, not learned arithmetic capability.
189
  - The model must not be used as an authority for medical, legal, financial, safety-critical, or other high-stakes decisions.
190
+ - Standard Hugging Face Inference Providers cannot serve the original embedded checkpoint without custom architecture support. The bundled GGUF companion is intended for local LM Studio / llama.cpp execution.
191
 
192
  ## Links
193
 
 
197
 
198
  ## 日本語
199
 
200
+ EXLLM-0.005B-Instructは、低メモリ組込み機器でのローカル推論を目的とした、**0.005377824Bパラメータ**の日本語instruction modelです。主な実装対象はCASIO EX-word XD-B4800です。同じプロジェクトデータから別途学習した、LM Studio / llama.cpp向けの**0.005441184Bパラメータ**GGUF companionも収録しています。
201
 
202
+ 電子辞書用checkpointは独自のdecoder-only Transformerとtokenizerを使用するため、GGUFに直接変換したものではありません。LM Studioでは`ToTo-40417/EXLLM`を検索し、`EXLLM-0.005B-LMStudio-F16.gguf`を選択してください。チャット用templateはGGUFに内蔵済みで、contextは128 tokensです。このGGUFはプロジェクトデータで別途学習したPC用companionであり、電子辞書版と同一重みではありません。
203
 
204
  RTX 3060でのfp32参照実行は、40回のwarm-up後に120回測定し、TTFT中央値0.003990秒、生成速度239.082 token/sでした。EX-word整数runtimeでは、0.024184 GHzのSH-4A-class CPU上でTTFT中央値23.711秒、生成速度0.52–0.55 token/sでした。
205
 
lmstudio/training_manifest.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "EXLLM-0.005B-LMStudio-GGUF-companion",
3
+ "relationship": "separately trained Llama-compatible companion; not converted EX-word weights",
4
+ "parameters": 5441184,
5
+ "architecture": {
6
+ "family": "LlamaForCausalLM",
7
+ "layers": 6,
8
+ "hidden_size": 288,
9
+ "intermediate_size": 608,
10
+ "attention_heads": 9,
11
+ "kv_heads": 9,
12
+ "context_length": 128,
13
+ "vocabulary_size": 1024
14
+ },
15
+ "training_records_including_overlaps": 85005,
16
+ "validation_records": 1403,
17
+ "epochs": 5,
18
+ "steps": 3325,
19
+ "best_validation_loss": 0.03903034566482638,
20
+ "seed": 20260926,
21
+ "history": [
22
+ {
23
+ "epoch": 1,
24
+ "valid_loss": 0.08999436360746654,
25
+ "seconds": 35.0497190952301
26
+ },
27
+ {
28
+ "epoch": 2,
29
+ "valid_loss": 0.06198247724884875,
30
+ "seconds": 68.68868088722229
31
+ },
32
+ {
33
+ "epoch": 3,
34
+ "valid_loss": 0.047818813336203816,
35
+ "seconds": 102.3995361328125
36
+ },
37
+ {
38
+ "epoch": 4,
39
+ "valid_loss": 0.04088344847093563,
40
+ "seconds": 136.1156406402588
41
+ },
42
+ {
43
+ "epoch": 5,
44
+ "valid_loss": 0.03903034566482638,
45
+ "seconds": 169.76451516151428
46
+ }
47
+ ]
48
+ }