Text Generation
Transformers
Safetensors
phi3
torchwright
compiled-transformer
calculator_scratchpad
text-generation-inference
Instructions to use physicsrob/torchwright-calculator-scratchpad-max-digits-6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use physicsrob/torchwright-calculator-scratchpad-max-digits-6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="physicsrob/torchwright-calculator-scratchpad-max-digits-6")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("physicsrob/torchwright-calculator-scratchpad-max-digits-6") model = AutoModelForCausalLM.from_pretrained("physicsrob/torchwright-calculator-scratchpad-max-digits-6", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use physicsrob/torchwright-calculator-scratchpad-max-digits-6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "physicsrob/torchwright-calculator-scratchpad-max-digits-6" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "physicsrob/torchwright-calculator-scratchpad-max-digits-6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/physicsrob/torchwright-calculator-scratchpad-max-digits-6
- SGLang
How to use physicsrob/torchwright-calculator-scratchpad-max-digits-6 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 "physicsrob/torchwright-calculator-scratchpad-max-digits-6" \ --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": "physicsrob/torchwright-calculator-scratchpad-max-digits-6", "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 "physicsrob/torchwright-calculator-scratchpad-max-digits-6" \ --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": "physicsrob/torchwright-calculator-scratchpad-max-digits-6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use physicsrob/torchwright-calculator-scratchpad-max-digits-6 with Docker Model Runner:
docker model run hf.co/physicsrob/torchwright-calculator-scratchpad-max-digits-6
Upload folder using huggingface_hub
Browse files- README.md +96 -0
- config.json +33 -0
- generation_config.json +6 -0
- model-00001-of-00019.safetensors +3 -0
- model-00002-of-00019.safetensors +3 -0
- model-00003-of-00019.safetensors +3 -0
- model-00004-of-00019.safetensors +3 -0
- model-00005-of-00019.safetensors +3 -0
- model-00006-of-00019.safetensors +3 -0
- model-00007-of-00019.safetensors +3 -0
- model-00008-of-00019.safetensors +3 -0
- model-00009-of-00019.safetensors +3 -0
- model-00010-of-00019.safetensors +3 -0
- model-00011-of-00019.safetensors +3 -0
- model-00012-of-00019.safetensors +3 -0
- model-00013-of-00019.safetensors +3 -0
- model-00014-of-00019.safetensors +3 -0
- model-00015-of-00019.safetensors +3 -0
- model-00016-of-00019.safetensors +3 -0
- model-00017-of-00019.safetensors +3 -0
- model-00018-of-00019.safetensors +3 -0
- model-00019-of-00019.safetensors +3 -0
- model.safetensors.index.json +1 -0
- tokenizer.json +142 -0
- tokenizer_config.json +8 -0
README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
tags:
|
| 5 |
+
- torchwright
|
| 6 |
+
- compiled-transformer
|
| 7 |
+
- calculator_scratchpad
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# `calculator_scratchpad`, max_digits=6 (torchwright)
|
| 12 |
+
|
| 13 |
+
A **compiled** transformer: the
|
| 14 |
+
[torchwright](https://github.com/physicsrob/torchwright) compiler emitted
|
| 15 |
+
these weights directly from a computation graph — nothing was trained. This
|
| 16 |
+
bundle is the `calculator_scratchpad` example built with `max_digits=6`: a computation graph for integer arithmetic (`A op B` with `op` in `+ - *`) that streams its serial carry/borrow work as visible thinking tokens before emitting the answer.
|
| 17 |
+
|
| 18 |
+
The bundle uses the stock Phi-3 architecture and loads through `transformers`
|
| 19 |
+
without custom model code or `trust_remote_code`.
|
| 20 |
+
|
| 21 |
+
Run it in **fp32** with **greedy decoding** (`do_sample=False`). Other
|
| 22 |
+
precisions and decoding modes are outside the supported contract.
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
|
| 26 |
+
```python
|
| 27 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 28 |
+
|
| 29 |
+
repo_id = 'physicsrob/torchwright-calculator-scratchpad-max-digits-6'
|
| 30 |
+
model = AutoModelForCausalLM.from_pretrained(repo_id).eval()
|
| 31 |
+
tok = AutoTokenizer.from_pretrained(repo_id)
|
| 32 |
+
|
| 33 |
+
enc = tok('12*34\n', return_tensors="pt")
|
| 34 |
+
out = model.generate(enc["input_ids"], max_new_tokens=96, do_sample=False,
|
| 35 |
+
eos_token_id=tok.eos_token_id, pad_token_id=tok.eos_token_id)
|
| 36 |
+
print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
## Input and output
|
| 40 |
+
|
| 41 |
+
Prompts are `A op B` terminated by a newline: two non-negative decimal
|
| 42 |
+
operands of up to 6 digits, with `op` one of `+`, `-`, `*`.
|
| 43 |
+
Subtraction may produce a negative result. Wider operands, or any character
|
| 44 |
+
outside the model's small vocabulary, are outside the contract — the output
|
| 45 |
+
is undefined.
|
| 46 |
+
|
| 47 |
+
| prompt | output |
|
| 48 |
+
|---|---|
|
| 49 |
+
| `12*34` | `<THINKING>…</THINKING>408` |
|
| 50 |
+
| `7+8` | `<THINKING>…</THINKING>15` |
|
| 51 |
+
| `999999*999999` | `<THINKING>…</THINKING>999998000001` |
|
| 52 |
+
| `999999+1` | `<THINKING>…</THINKING>1000000` |
|
| 53 |
+
| `999999-123456` | `<THINKING>…</THINKING>876543` |
|
| 54 |
+
| `123456-999999` | `<THINKING>…</THINKING>-876543` |
|
| 55 |
+
|
| 56 |
+
The answer is preceded by a visible scratchpad between `<THINKING>` and
|
| 57 |
+
`</THINKING>`: superscript glyphs (`⁰¹²`) stream the per-column carry /
|
| 58 |
+
borrow / comparison state, plain digits are the unnormalized scratch answer,
|
| 59 |
+
and subscript glyphs (`₀₁₂`) stream the leading-zero cleanup count. The
|
| 60 |
+
final answer follows the closing tag — e.g. `999999+1` ends
|
| 61 |
+
`…</THINKING>1000000`.
|
| 62 |
+
|
| 63 |
+
## Intended use and limitations
|
| 64 |
+
|
| 65 |
+
This model is a demonstration of a computation graph compiled into transformer
|
| 66 |
+
weights. It is not a general language model or a general-purpose calculator;
|
| 67 |
+
only the input contract above is supported.
|
| 68 |
+
|
| 69 |
+
## Verification
|
| 70 |
+
|
| 71 |
+
The examples above are exact reference outputs. The Modal publishing path
|
| 72 |
+
reloads the emitted checkpoint through stock `transformers`, checks those
|
| 73 |
+
examples plus additional width-limit cases against Python integer arithmetic,
|
| 74 |
+
and refuses to upload on a mismatch. This is a functional smoke test, not
|
| 75 |
+
exhaustive verification of every allowed expression.
|
| 76 |
+
|
| 77 |
+
## Size
|
| 78 |
+
|
| 79 |
+
The checkpoint stores 27.92 GB of dense fp32 weights (6,980,206,592 entries) at
|
| 80 |
+
the example family's shared compile width. 99.99% of those entries are
|
| 81 |
+
exactly zero: the vast majority of the model is unused canvas, so size reflects
|
| 82 |
+
the compile geometry rather than stored knowledge.
|
| 83 |
+
|
| 84 |
+
The zero entries are not compressed, and dense `transformers` execution still
|
| 85 |
+
pays their memory and compute cost. CPU execution is supported; allow
|
| 86 |
+
additional RAM beyond the checkpoint size.
|
| 87 |
+
|
| 88 |
+
## Family
|
| 89 |
+
|
| 90 |
+
One example of many compiled with torchwright. Calculator siblings —
|
| 91 |
+
`calculator-simple` (serial arithmetic, depth grows with the digit count),
|
| 92 |
+
`calculator-advanced` (carry-lookahead, near-flat depth), and
|
| 93 |
+
`calculator-scratchpad` (flat depth; the serial work streams out as visible
|
| 94 |
+
thinking tokens) — are published at several digit widths. Browse the
|
| 95 |
+
[torchwright calculator models](https://huggingface.co/models?search=physicsrob%2Ftorchwright-calculator)
|
| 96 |
+
on Hugging Face.
|
config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Phi3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 15,
|
| 7 |
+
"embd_pdrop": 0.0,
|
| 8 |
+
"eos_token_id": 16,
|
| 9 |
+
"head_dim": 64,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 8192,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 5879,
|
| 14 |
+
"max_position_embeddings": 512,
|
| 15 |
+
"model_type": "phi3",
|
| 16 |
+
"num_attention_heads": 116,
|
| 17 |
+
"num_hidden_layers": 18,
|
| 18 |
+
"num_key_value_heads": 116,
|
| 19 |
+
"original_max_position_embeddings": 4096,
|
| 20 |
+
"pad_token_id": null,
|
| 21 |
+
"resid_pdrop": 0.0,
|
| 22 |
+
"rms_norm_eps": 1e-05,
|
| 23 |
+
"rope_parameters": {
|
| 24 |
+
"partial_rotary_factor": 1.0,
|
| 25 |
+
"rope_theta": 500000.0,
|
| 26 |
+
"rope_type": "default"
|
| 27 |
+
},
|
| 28 |
+
"sliding_window": null,
|
| 29 |
+
"tie_word_embeddings": true,
|
| 30 |
+
"transformers_version": "5.12.1",
|
| 31 |
+
"use_cache": true,
|
| 32 |
+
"vocab_size": 45
|
| 33 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 15,
|
| 3 |
+
"eos_token_id": 16,
|
| 4 |
+
"pad_token_id": 16,
|
| 5 |
+
"transformers_version": "5.12.1"
|
| 6 |
+
}
|
model-00001-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2caa957219c4f1b8d1393dacc2bf9acc236c1e92571d4c1c2f45bb6f1d72a67c
|
| 3 |
+
size 1551008208
|
model-00002-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:048df8f421c543939d4b4f9be88c4da081776a7fcb645c5a2efa312d0e9bd0e4
|
| 3 |
+
size 1551008208
|
model-00003-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e889bf2765015cd9d638b9890a453ea69cd5d8d16c4a2437351b9158841fdc15
|
| 3 |
+
size 1551008208
|
model-00004-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dabceb632813d27f0321bbb9aad04ff42f1b65dae56a1e393fbe6cb0ace3751e
|
| 3 |
+
size 1551008208
|
model-00005-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8c3a81a95b7eab6ce2f602f7cb9fb575b33910ba1e24e3a3b0d3d87d44b362b4
|
| 3 |
+
size 1551008208
|
model-00006-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:088ddc7e9e167cd21c266c3fbd6131b3ffd32a5f5d489431a86a6ac2435edb2e
|
| 3 |
+
size 1551008208
|
model-00007-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:884e42543357786d3beecadf23fcd25007d7212dda69ad08257257189efd4ab3
|
| 3 |
+
size 1551008208
|
model-00008-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5cdd83b6925c108446e1e8da75397b1002e39d85da945390aa56bdd41e8bd40
|
| 3 |
+
size 1551008208
|
model-00009-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:10ea2265a24901d9b555b1042a65e36a20e33572cce022882590c4c3451b803d
|
| 3 |
+
size 1551008208
|
model-00010-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f4aa09ddaf32b4afb700bf508b637baad3c7dce402d1b6a681ec201704e26b1
|
| 3 |
+
size 1551008208
|
model-00011-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57f427eadf9a6f30133e311c76634712b9acbb10cc6f4312486d3c4a8700f3a5
|
| 3 |
+
size 1551008208
|
model-00012-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:efab1419ac321e437affaf72c27779e5db6487ad08113a4e7c36ae5a00cf2e5f
|
| 3 |
+
size 1551008208
|
model-00013-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22ee2e2671535b990af6c05b571514a126487d56fb09c561551759088a23429d
|
| 3 |
+
size 1551008208
|
model-00014-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:358560dbd3c89c72d3355483cb8292c932e13c3b41acc5c303d923f11cc85e4f
|
| 3 |
+
size 1551008208
|
model-00015-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44e0b4c35571dc1bd4525f0a54b430b67df12809cc12d30de4997e90eb66f6a1
|
| 3 |
+
size 1551008208
|
model-00016-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c74d00d69153e7148a0a45f3cd031d761e88aca14d33cca18a89bec8d5d1e19b
|
| 3 |
+
size 1551008208
|
model-00017-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:576e2a087c57085754da845a006698effbbb60b77175f81d81f48b9b1eb61dfc
|
| 3 |
+
size 1551008208
|
model-00018-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c381ecff486cbd4807a1b4b3b3672deaf57f122ae278b22d991f2680a4364363
|
| 3 |
+
size 1551008208
|
model-00019-of-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac65bf30b9cfbfea0847c03cc3674e44afc6034b56e164a698b10630c6d7725c
|
| 3 |
+
size 2691080
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"metadata": {"total_size": 27920826368}, "weight_map": {"model.layers.0.self_attn.qkv_proj.weight": "model-00001-of-00019.safetensors", "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00019.safetensors", "model.layers.0.mlp.gate_up_proj.weight": "model-00001-of-00019.safetensors", "model.layers.0.mlp.down_proj.weight": "model-00001-of-00019.safetensors", "model.layers.1.self_attn.qkv_proj.weight": "model-00002-of-00019.safetensors", "model.layers.1.self_attn.o_proj.weight": "model-00002-of-00019.safetensors", "model.layers.1.mlp.gate_up_proj.weight": "model-00002-of-00019.safetensors", "model.layers.1.mlp.down_proj.weight": "model-00002-of-00019.safetensors", "model.layers.2.self_attn.qkv_proj.weight": "model-00003-of-00019.safetensors", "model.layers.2.self_attn.o_proj.weight": "model-00003-of-00019.safetensors", "model.layers.2.mlp.gate_up_proj.weight": "model-00003-of-00019.safetensors", "model.layers.2.mlp.down_proj.weight": "model-00003-of-00019.safetensors", "model.layers.3.self_attn.qkv_proj.weight": "model-00004-of-00019.safetensors", "model.layers.3.self_attn.o_proj.weight": "model-00004-of-00019.safetensors", "model.layers.3.mlp.gate_up_proj.weight": "model-00004-of-00019.safetensors", "model.layers.3.mlp.down_proj.weight": "model-00004-of-00019.safetensors", "model.layers.4.self_attn.qkv_proj.weight": "model-00005-of-00019.safetensors", "model.layers.4.self_attn.o_proj.weight": "model-00005-of-00019.safetensors", "model.layers.4.mlp.gate_up_proj.weight": "model-00005-of-00019.safetensors", "model.layers.4.mlp.down_proj.weight": "model-00005-of-00019.safetensors", "model.layers.5.self_attn.qkv_proj.weight": "model-00006-of-00019.safetensors", "model.layers.5.self_attn.o_proj.weight": "model-00006-of-00019.safetensors", "model.layers.5.mlp.gate_up_proj.weight": "model-00006-of-00019.safetensors", "model.layers.5.mlp.down_proj.weight": "model-00006-of-00019.safetensors", "model.layers.6.self_attn.qkv_proj.weight": "model-00007-of-00019.safetensors", "model.layers.6.self_attn.o_proj.weight": "model-00007-of-00019.safetensors", "model.layers.6.mlp.gate_up_proj.weight": "model-00007-of-00019.safetensors", "model.layers.6.mlp.down_proj.weight": "model-00007-of-00019.safetensors", "model.layers.7.self_attn.qkv_proj.weight": "model-00008-of-00019.safetensors", "model.layers.7.self_attn.o_proj.weight": "model-00008-of-00019.safetensors", "model.layers.7.mlp.gate_up_proj.weight": "model-00008-of-00019.safetensors", "model.layers.7.mlp.down_proj.weight": "model-00008-of-00019.safetensors", "model.layers.8.self_attn.qkv_proj.weight": "model-00009-of-00019.safetensors", "model.layers.8.self_attn.o_proj.weight": "model-00009-of-00019.safetensors", "model.layers.8.mlp.gate_up_proj.weight": "model-00009-of-00019.safetensors", "model.layers.8.mlp.down_proj.weight": "model-00009-of-00019.safetensors", "model.layers.9.self_attn.qkv_proj.weight": "model-00010-of-00019.safetensors", "model.layers.9.self_attn.o_proj.weight": "model-00010-of-00019.safetensors", "model.layers.9.mlp.gate_up_proj.weight": "model-00010-of-00019.safetensors", "model.layers.9.mlp.down_proj.weight": "model-00010-of-00019.safetensors", "model.layers.10.self_attn.qkv_proj.weight": "model-00011-of-00019.safetensors", "model.layers.10.self_attn.o_proj.weight": "model-00011-of-00019.safetensors", "model.layers.10.mlp.gate_up_proj.weight": "model-00011-of-00019.safetensors", "model.layers.10.mlp.down_proj.weight": "model-00011-of-00019.safetensors", "model.layers.11.self_attn.qkv_proj.weight": "model-00012-of-00019.safetensors", "model.layers.11.self_attn.o_proj.weight": "model-00012-of-00019.safetensors", "model.layers.11.mlp.gate_up_proj.weight": "model-00012-of-00019.safetensors", "model.layers.11.mlp.down_proj.weight": "model-00012-of-00019.safetensors", "model.layers.12.self_attn.qkv_proj.weight": "model-00013-of-00019.safetensors", "model.layers.12.self_attn.o_proj.weight": "model-00013-of-00019.safetensors", "model.layers.12.mlp.gate_up_proj.weight": "model-00013-of-00019.safetensors", "model.layers.12.mlp.down_proj.weight": "model-00013-of-00019.safetensors", "model.layers.13.self_attn.qkv_proj.weight": "model-00014-of-00019.safetensors", "model.layers.13.self_attn.o_proj.weight": "model-00014-of-00019.safetensors", "model.layers.13.mlp.gate_up_proj.weight": "model-00014-of-00019.safetensors", "model.layers.13.mlp.down_proj.weight": "model-00014-of-00019.safetensors", "model.layers.14.self_attn.qkv_proj.weight": "model-00015-of-00019.safetensors", "model.layers.14.self_attn.o_proj.weight": "model-00015-of-00019.safetensors", "model.layers.14.mlp.gate_up_proj.weight": "model-00015-of-00019.safetensors", "model.layers.14.mlp.down_proj.weight": "model-00015-of-00019.safetensors", "model.layers.15.self_attn.qkv_proj.weight": "model-00016-of-00019.safetensors", "model.layers.15.self_attn.o_proj.weight": "model-00016-of-00019.safetensors", "model.layers.15.mlp.gate_up_proj.weight": "model-00016-of-00019.safetensors", "model.layers.15.mlp.down_proj.weight": "model-00016-of-00019.safetensors", "model.layers.16.self_attn.qkv_proj.weight": "model-00017-of-00019.safetensors", "model.layers.16.self_attn.o_proj.weight": "model-00017-of-00019.safetensors", "model.layers.16.mlp.gate_up_proj.weight": "model-00017-of-00019.safetensors", "model.layers.16.mlp.down_proj.weight": "model-00017-of-00019.safetensors", "model.layers.17.self_attn.qkv_proj.weight": "model-00018-of-00019.safetensors", "model.layers.17.self_attn.o_proj.weight": "model-00018-of-00019.safetensors", "model.layers.17.mlp.gate_up_proj.weight": "model-00018-of-00019.safetensors", "model.layers.17.mlp.down_proj.weight": "model-00018-of-00019.safetensors", "model.embed_tokens.weight": "model-00019-of-00019.safetensors", "model.norm.weight": "model-00019-of-00019.safetensors", "model.layers.0.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.0.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.1.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.1.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.2.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.2.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.3.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.3.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.4.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.4.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.5.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.5.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.6.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.6.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.7.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.7.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.8.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.8.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.9.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.9.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.10.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.10.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.11.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.11.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.12.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.12.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.13.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.13.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.14.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.14.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.15.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.15.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.16.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.16.post_attention_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.17.input_layernorm.weight": "model-00019-of-00019.safetensors", "model.layers.17.post_attention_layernorm.weight": "model-00019-of-00019.safetensors"}}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
| 4 |
+
"padding": null,
|
| 5 |
+
"added_tokens": [
|
| 6 |
+
{
|
| 7 |
+
"id": 15,
|
| 8 |
+
"content": "<bos>",
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"lstrip": false,
|
| 11 |
+
"rstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"special": true
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"id": 16,
|
| 17 |
+
"content": "<eos>",
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"normalized": false,
|
| 22 |
+
"special": true
|
| 23 |
+
}
|
| 24 |
+
],
|
| 25 |
+
"normalizer": null,
|
| 26 |
+
"pre_tokenizer": {
|
| 27 |
+
"type": "Split",
|
| 28 |
+
"pattern": {
|
| 29 |
+
"Regex": "[\\s\\S]"
|
| 30 |
+
},
|
| 31 |
+
"behavior": "Isolated",
|
| 32 |
+
"invert": false
|
| 33 |
+
},
|
| 34 |
+
"post_processor": {
|
| 35 |
+
"type": "TemplateProcessing",
|
| 36 |
+
"single": [
|
| 37 |
+
{
|
| 38 |
+
"SpecialToken": {
|
| 39 |
+
"id": "<bos>",
|
| 40 |
+
"type_id": 0
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"Sequence": {
|
| 45 |
+
"id": "A",
|
| 46 |
+
"type_id": 0
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
],
|
| 50 |
+
"pair": [
|
| 51 |
+
{
|
| 52 |
+
"SpecialToken": {
|
| 53 |
+
"id": "<bos>",
|
| 54 |
+
"type_id": 0
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"Sequence": {
|
| 59 |
+
"id": "A",
|
| 60 |
+
"type_id": 0
|
| 61 |
+
}
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"SpecialToken": {
|
| 65 |
+
"id": "<bos>",
|
| 66 |
+
"type_id": 0
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"Sequence": {
|
| 71 |
+
"id": "B",
|
| 72 |
+
"type_id": 0
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
],
|
| 76 |
+
"special_tokens": {
|
| 77 |
+
"<bos>": {
|
| 78 |
+
"id": "<bos>",
|
| 79 |
+
"ids": [
|
| 80 |
+
15
|
| 81 |
+
],
|
| 82 |
+
"tokens": [
|
| 83 |
+
"<bos>"
|
| 84 |
+
]
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
},
|
| 88 |
+
"decoder": {
|
| 89 |
+
"type": "Fuse"
|
| 90 |
+
},
|
| 91 |
+
"model": {
|
| 92 |
+
"type": "WordLevel",
|
| 93 |
+
"vocab": {
|
| 94 |
+
"0": 0,
|
| 95 |
+
"1": 1,
|
| 96 |
+
"2": 2,
|
| 97 |
+
"3": 3,
|
| 98 |
+
"4": 4,
|
| 99 |
+
"5": 5,
|
| 100 |
+
"6": 6,
|
| 101 |
+
"7": 7,
|
| 102 |
+
"8": 8,
|
| 103 |
+
"9": 9,
|
| 104 |
+
"+": 10,
|
| 105 |
+
"-": 11,
|
| 106 |
+
"*": 12,
|
| 107 |
+
"\n": 13,
|
| 108 |
+
" ": 14,
|
| 109 |
+
"<bos>": 15,
|
| 110 |
+
"<eos>": 16,
|
| 111 |
+
"<THINKING>": 17,
|
| 112 |
+
"⁰ ": 18,
|
| 113 |
+
"¹ ": 19,
|
| 114 |
+
"² ": 20,
|
| 115 |
+
"³ ": 21,
|
| 116 |
+
"⁴ ": 22,
|
| 117 |
+
"⁵ ": 23,
|
| 118 |
+
"⁶ ": 24,
|
| 119 |
+
"⁷ ": 25,
|
| 120 |
+
"⁸ ": 26,
|
| 121 |
+
"⁹ ": 27,
|
| 122 |
+
"¹⁰ ": 28,
|
| 123 |
+
"¹¹ ": 29,
|
| 124 |
+
"¹² ": 30,
|
| 125 |
+
"₀ ": 31,
|
| 126 |
+
"₁ ": 32,
|
| 127 |
+
"₂ ": 33,
|
| 128 |
+
"₃ ": 34,
|
| 129 |
+
"₄ ": 35,
|
| 130 |
+
"₅ ": 36,
|
| 131 |
+
"₆ ": 37,
|
| 132 |
+
"₇ ": 38,
|
| 133 |
+
"₈ ": 39,
|
| 134 |
+
"₉ ": 40,
|
| 135 |
+
"₁₀ ": 41,
|
| 136 |
+
"₁₁ ": 42,
|
| 137 |
+
"₁₂ ": 43,
|
| 138 |
+
"</THINKING>": 44
|
| 139 |
+
},
|
| 140 |
+
"unk_token": "<unk>"
|
| 141 |
+
}
|
| 142 |
+
}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<bos>",
|
| 4 |
+
"eos_token": "<eos>",
|
| 5 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 6 |
+
"tokenizer_class": "TokenizersBackend",
|
| 7 |
+
"unk_token": null
|
| 8 |
+
}
|