Publish updated UFO Go framework implementation
Browse files- LICENSE +49 -49
- README.md +52 -22
- merges.txt +0 -0
- tokenizer.json +2 -2
- tokenizer_config.json +71 -302
- vocab.json +0 -0
LICENSE
CHANGED
|
@@ -1,49 +1,49 @@
|
|
| 1 |
-
PROPRIETARY INTELLECTUAL PROPERTY & COPYRIGHT NOTICE
|
| 2 |
-
=====================================================
|
| 3 |
-
Copyright (c) 2026 Zymatica / Language-U Project / The AI Collective. All rights reserved.
|
| 4 |
-
|
| 5 |
-
NOTICE: ALL INFORMATION, CODE, ARCHITECTURAL SCHEMAS, MATHEMATICAL FORMULAS, DATASETS, AND DATA
|
| 6 |
-
CONTAINED HEREIN ARE, AND REMAIN THE PROPERTY OF ZYMATICA AND ITS ASSOCIATES (THE AI COLLECTIVE).
|
| 7 |
-
THE INTELLECTUAL, LOGICAL, AND TECHNICAL CONCEPTS CONTAINED HEREIN ARE PROPRIETARY TO ZYMATICA AND
|
| 8 |
-
ARE PROTECTED BY COPYRIGHT LAW, TRADE SECRET LAW, AND APPLICABLE INTELLECTUAL PROPERTY STATUTES.
|
| 9 |
-
|
| 10 |
-
PROPRIETARY ASSETS COVERED UNDER THIS LICENSE NOTICE INCLUDE, BUT ARE NOT LIMITED TO:
|
| 11 |
-
1. **Language-U Framework:** The compression taxonomy, semantic decomposition theory,
|
| 12 |
-
Shannon Bypass mathematical framework, and entropy decomposition equations.
|
| 13 |
-
2. **Cuneiform-U Semantic Hypercube System:** The 6-dimensional hypercube mapping along orthogonal axes
|
| 14 |
-
(Domain, Subdomain, Operation, Modality, Depth, Polarity) and coordinate radical representation
|
| 15 |
-
schemas (Classifier Radical R_C, Factor Radical R_F, and Active Radical R_A).
|
| 16 |
-
3. **Genesis Protocol:** The multi-level procedural model transmission, sharded weights
|
| 17 |
-
reconstruction, and dynamic layers streaming execution architecture.
|
| 18 |
-
4. **ProceduralSeed File Format (.LLM / .genesis):** The custom binary seed format, layer
|
| 19 |
-
encoding schemas, coordinate-packing matrices, and weights projection indexing.
|
| 20 |
-
5. **Chirp Packetization & FEC Scheme:** The LoRA packet layout wrappers (including 78-chirp
|
| 21 |
-
and 28-chirp physical packetization formats), Qualia Seed configuration (0xE0), Huffman facts coding
|
| 22 |
-
mappings, and XOR-FEC (Forward Error Correction) recovery stream algorithms.
|
| 23 |
-
6. **SVD/DCT Compression & Reconstructor Pipeline:** The weights reduction algorithms, singular value
|
| 24 |
-
decomposition (SVD) projection targets, discrete cosine transform (DCT) spectral compression,
|
| 25 |
-
and grow_weight / shrink_weight reconstruction implementations.
|
| 26 |
-
7. **LLM-Logits-Driven Range Coding (LLD-AC):** The active logits-driven probability range coding
|
| 27 |
-
and decoding mechanisms, dynamic entropy priors, and collapse signal scaling.
|
| 28 |
-
8. **Embedding-Driven Weight Projection (E-PAUP / 1-PAUP):** The mathematical projection of target
|
| 29 |
-
weight deltas/manifolds onto base-model shared word embedding matrices.
|
| 30 |
-
9. **Tokenizer Prefix-Suffix Varint Differential Coding:** The lossless tokenizer serialization
|
| 31 |
-
storing tokens by ID order using variable-length prefix sharing indexes and suffix bytes.
|
| 32 |
-
10. **Multi-Language Runtimes & Ports:** Low-overhead execution runtimes, off-line tokenizers,
|
| 33 |
-
and edge-optimized memory management bindings (including C++, Rust, Go, Python, Swift,
|
| 34 |
-
Java, and TypeScript implementations).
|
| 35 |
-
11. **SFT Healing & Adaptive Cognitive Alignment:** The LoRA PEFT receiver-side healing loops,
|
| 36 |
-
multi-task SFT alignment recipes, loss balancing weights, and token-based on-device
|
| 37 |
-
reconstruction correction scripts (including decode_teleport.py).
|
| 38 |
-
12. **Brand Assets & Artwork:** The official branding, visual representations, logos, and design
|
| 39 |
-
artwork associated with Zymatica, Language-U, and TheAiCollective.art.
|
| 40 |
-
|
| 41 |
-
REPRODUCTION, DISSEMINATION, TRANSLATION, PORTING, REVERSE-ENGINEERING, OR MODIFICATION
|
| 42 |
-
OF THIS MATERIAL, CODE, OR DATA IS STRICTLY FORBIDDEN UNLESS PRIOR EXPLICIT WRITTEN
|
| 43 |
-
PERMISSION IS OBTAINED FROM ZYMATICA.
|
| 44 |
-
|
| 45 |
-
THE LICENSED SOFTWARE AND CODE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 46 |
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 47 |
-
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
| 48 |
-
BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
| 49 |
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR CODE.
|
|
|
|
| 1 |
+
PROPRIETARY INTELLECTUAL PROPERTY & COPYRIGHT NOTICE
|
| 2 |
+
=====================================================
|
| 3 |
+
Copyright (c) 2026 Zymatica / Language-U Project / The AI Collective. All rights reserved.
|
| 4 |
+
|
| 5 |
+
NOTICE: ALL INFORMATION, CODE, ARCHITECTURAL SCHEMAS, MATHEMATICAL FORMULAS, DATASETS, AND DATA
|
| 6 |
+
CONTAINED HEREIN ARE, AND REMAIN THE PROPERTY OF ZYMATICA AND ITS ASSOCIATES (THE AI COLLECTIVE).
|
| 7 |
+
THE INTELLECTUAL, LOGICAL, AND TECHNICAL CONCEPTS CONTAINED HEREIN ARE PROPRIETARY TO ZYMATICA AND
|
| 8 |
+
ARE PROTECTED BY COPYRIGHT LAW, TRADE SECRET LAW, AND APPLICABLE INTELLECTUAL PROPERTY STATUTES.
|
| 9 |
+
|
| 10 |
+
PROPRIETARY ASSETS COVERED UNDER THIS LICENSE NOTICE INCLUDE, BUT ARE NOT LIMITED TO:
|
| 11 |
+
1. **Language-U Framework:** The compression taxonomy, semantic decomposition theory,
|
| 12 |
+
Shannon Bypass mathematical framework, and entropy decomposition equations.
|
| 13 |
+
2. **Cuneiform-U Semantic Hypercube System:** The 6-dimensional hypercube mapping along orthogonal axes
|
| 14 |
+
(Domain, Subdomain, Operation, Modality, Depth, Polarity) and coordinate radical representation
|
| 15 |
+
schemas (Classifier Radical R_C, Factor Radical R_F, and Active Radical R_A).
|
| 16 |
+
3. **Genesis Protocol:** The multi-level procedural model transmission, sharded weights
|
| 17 |
+
reconstruction, and dynamic layers streaming execution architecture.
|
| 18 |
+
4. **ProceduralSeed File Format (.LLM / .genesis):** The custom binary seed format, layer
|
| 19 |
+
encoding schemas, coordinate-packing matrices, and weights projection indexing.
|
| 20 |
+
5. **Chirp Packetization & FEC Scheme:** The LoRA packet layout wrappers (including 78-chirp
|
| 21 |
+
and 28-chirp physical packetization formats), Qualia Seed configuration (0xE0), Huffman facts coding
|
| 22 |
+
mappings, and XOR-FEC (Forward Error Correction) recovery stream algorithms.
|
| 23 |
+
6. **SVD/DCT Compression & Reconstructor Pipeline:** The weights reduction algorithms, singular value
|
| 24 |
+
decomposition (SVD) projection targets, discrete cosine transform (DCT) spectral compression,
|
| 25 |
+
and grow_weight / shrink_weight reconstruction implementations.
|
| 26 |
+
7. **LLM-Logits-Driven Range Coding (LLD-AC):** The active logits-driven probability range coding
|
| 27 |
+
and decoding mechanisms, dynamic entropy priors, and collapse signal scaling.
|
| 28 |
+
8. **Embedding-Driven Weight Projection (E-PAUP / 1-PAUP):** The mathematical projection of target
|
| 29 |
+
weight deltas/manifolds onto base-model shared word embedding matrices.
|
| 30 |
+
9. **Tokenizer Prefix-Suffix Varint Differential Coding:** The lossless tokenizer serialization
|
| 31 |
+
storing tokens by ID order using variable-length prefix sharing indexes and suffix bytes.
|
| 32 |
+
10. **Multi-Language Runtimes & Ports:** Low-overhead execution runtimes, off-line tokenizers,
|
| 33 |
+
and edge-optimized memory management bindings (including C++, Rust, Go, Python, Swift,
|
| 34 |
+
Java, and TypeScript implementations).
|
| 35 |
+
11. **SFT Healing & Adaptive Cognitive Alignment:** The LoRA PEFT receiver-side healing loops,
|
| 36 |
+
multi-task SFT alignment recipes, loss balancing weights, and token-based on-device
|
| 37 |
+
reconstruction correction scripts (including decode_teleport.py).
|
| 38 |
+
12. **Brand Assets & Artwork:** The official branding, visual representations, logos, and design
|
| 39 |
+
artwork associated with Zymatica, Language-U, and TheAiCollective.art.
|
| 40 |
+
|
| 41 |
+
REPRODUCTION, DISSEMINATION, TRANSLATION, PORTING, REVERSE-ENGINEERING, OR MODIFICATION
|
| 42 |
+
OF THIS MATERIAL, CODE, OR DATA IS STRICTLY FORBIDDEN UNLESS PRIOR EXPLICIT WRITTEN
|
| 43 |
+
PERMISSION IS OBTAINED FROM ZYMATICA.
|
| 44 |
+
|
| 45 |
+
THE LICENSED SOFTWARE AND CODE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 46 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 47 |
+
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
| 48 |
+
BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
| 49 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR CODE.
|
README.md
CHANGED
|
@@ -1,28 +1,37 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
-
|
| 4 |
tags:
|
| 5 |
- ufo-compression
|
| 6 |
- model-quantization
|
| 7 |
- tokenizer-compression
|
|
|
|
|
|
|
| 8 |
- go
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
language:
|
| 10 |
- en
|
| 11 |
pipeline_tag: translation
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |

|
| 15 |
|
|
|
|
| 16 |
|
| 17 |
-
#
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
---
|
| 24 |
|
| 25 |
-
## Licensing Compliance & Intellectual Property Map
|
|
|
|
| 26 |
This repository contains components from multiple origins. Licenses are assigned per component to respect the code we used while strictly protecting Zymatica's intellectual property:
|
| 27 |
|
| 28 |
### Third-Party Components (retained under their original licenses)
|
|
@@ -37,22 +46,18 @@ This repository contains components from multiple origins. Licenses are assigned
|
|
| 37 |
|
| 38 |
### Proprietary Components — All Rights Reserved, zymatica.space
|
| 39 |
The following are the exclusive intellectual property of **zymatica.space** and are **All Rights Reserved**. No part may be reproduced, distributed, reverse-engineered, modified, or used in any form without explicit written permission:
|
| 40 |
-
* **Language-U
|
| 41 |
-
* **
|
| 42 |
-
* **
|
| 43 |
-
* **
|
| 44 |
-
* **
|
| 45 |
-
* **SVD/DCT Compression & Reconstructor Pipeline:** The weights reduction algorithms, singular value decomposition (SVD) projection targets, discrete cosine transform (DCT) spectral compression, and grow_weight / shrink_weight reconstruction implementations.
|
| 46 |
-
* **LLM-Logits-Driven Range Coding (LLD-AC):** The active logits-driven probability range coding and decoding mechanisms, dynamic entropy priors, and collapse signal scaling.
|
| 47 |
-
* **Embedding-Driven Weight Projection (E-PAUP / 1-PAUP):** The mathematical projection of target weight deltas/manifolds onto base-model shared word embedding matrices.
|
| 48 |
-
* **Tokenizer Prefix-Suffix Varint Differential Coding:** The lossless tokenizer serialization storing tokens by ID order using variable-length prefix sharing indexes and suffix bytes.
|
| 49 |
-
* **Multi-Language Runtimes & Ports:** Low-overhead execution runtimes, off-line tokenizers, and edge-optimized memory management bindings (including C++, Rust, Go, Python, Swift, Java, and TypeScript implementations).
|
| 50 |
-
* **SFT Healing & Adaptive Cognitive Alignment:** The LoRA PEFT receiver-side healing loops, multi-task SFT alignment recipes, loss balancing weights, and token-based on-device reconstruction correction scripts (including decode_teleport.py).
|
| 51 |
|
| 52 |
---
|
| 53 |
|
| 54 |
-
## Core Abstractions & Methodological Innovations
|
|
|
|
| 55 |
This framework implements the following core structural innovations:
|
|
|
|
| 56 |
1. **Multidimensional Semantic Coordinate Indexing:** Decomposing conceptual queries and semantic structures into a 6D hypercube index along orthogonal axes (Domain, Subdomain, Operation, Modality, Depth, Polarity) represented as coordinate radicals ($R_C, R_F, R_A$).
|
| 57 |
2. **Embedding-Driven Weight Projection (E-PAUP):** Representing weight deltas of target layers by projecting them onto pre-existing, shared word embedding matrices of the base model, eliminating coordinate transmission overhead.
|
| 58 |
3. **Tokenizer Prefix-Suffix Varint Differential Coding:** Lossless tokenizer serialization storing tokens by ID order using variable-length prefix sharing indexes and suffix bytes, achieving a 9.37x stand-alone reduction and 3200x reference-mode reduction.
|
|
@@ -60,21 +65,47 @@ This framework implements the following core structural innovations:
|
|
| 60 |
|
| 61 |
---
|
| 62 |
|
| 63 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
From a hardware and systems engineering perspective, this pipeline is designed to execute on resource-constrained edge hardware, such as a **RAK Wireless Miner (typically a Raspberry Pi 4 with 4 GB RAM)**, without triggering Out-of-Memory (OOM) crashes. However, execution must be separated into three distinct phases to ensure 100% reliability:
|
| 65 |
|
| 66 |
### Phase 1: Weight Reconstruction (SUCCESS ✅)
|
| 67 |
-
* **How it fits:** The decoder generates weights procedurally and streams them directly to sharded `.safetensors` files on the local drive (microSD, USB SSD, or external hard drive) layer-by-layer.
|
| 68 |
* **Memory Profile:** By immediately flushing each layer tensor to disk and freeing the RAM buffers, peak memory usage stays **under 1.5 GB RAM**.
|
| 69 |
* **Smooth Execution Tip:** Ensure you have at least **15 GB of free space** on your storage drive before starting the reconstruction.
|
| 70 |
|
| 71 |
### Phase 2: Inference & Execution (SUCCESS ✅ via Single-Layer Streaming)
|
| 72 |
-
* **How it fits:** A 31B
|
| 73 |
* **Memory Profile:** Peak VRAM/RAM consumption remains bounded to **~30 MB to 100 MB** at any single moment.
|
| 74 |
* **Smooth Execution Tip:** Disk read latency is the primary bottleneck. Running this from a standard Class 10 microSD card or an external mechanical hard drive (HDD) will introduce seek latency and slow down the layer-streaming process. For a 100% smooth, high-throughput experience, run the model from a **high-speed USB 3.0 SSD** or connect your external hard drive directly to the Pi's USB 3.0 port (blue port) to avoid bus-speed limits.
|
| 75 |
|
| 76 |
### Phase 3: LoRA SFT Healing (WARNING ⚠️ - Extremely Tight)
|
| 77 |
-
* **The Bottleneck:** Fine-tuning is significantly heavier than inference because backpropagation requires storing activations, gradients, and optimizer states (AdamW) in RAM.
|
| 78 |
* **How to prevent OOMs:**
|
| 79 |
1. **Strict Parameter Freezing:** Ensure all reconstructed SVD base weights are strictly frozen (`requires_grad = False`). Only train the small embedding and layer normalization tensors.
|
| 80 |
2. **Batch Size Limit:** Force a batch size of `1` and gradient accumulation steps if needed.
|
|
@@ -92,4 +123,3 @@ This project is a collaborative effort by **TheAiCollective.art** (represented b
|
|
| 92 |
Together, we form **TheAiCollective.art**—pushing the boundaries of model compression and decentralization.
|
| 93 |
|
| 94 |
*Authors: Zymatica.space | astronautshe.com | DevsOne — We Are TheAiCollective.art*
|
| 95 |
-
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
|
|
|
| 3 |
tags:
|
| 4 |
- ufo-compression
|
| 5 |
- model-quantization
|
| 6 |
- tokenizer-compression
|
| 7 |
+
- rust
|
| 8 |
+
- cpp
|
| 9 |
- go
|
| 10 |
+
- python
|
| 11 |
+
- java
|
| 12 |
+
- swift
|
| 13 |
+
- typescript
|
| 14 |
language:
|
| 15 |
- en
|
| 16 |
pipeline_tag: translation
|
| 17 |
+
title: UFO Compression Go
|
| 18 |
---
|
| 19 |
|
| 20 |

|
| 21 |
|
| 22 |
+
# UFO Hyper-Compression & Self-Reconstruction Framework Kit (Go Edition)
|
| 23 |
|
| 24 |
+
## 1. Introduction: Bypassing Shannon's Limit on Edge Nodes
|
| 25 |
+
This repository houses the core algorithmic framework for the **UFO (Ultra-Frequency-Optimized) 7-Level Compression & Self-Reconstruction Pipeline** designed by **TheAiCollective.art**.
|
| 26 |
|
| 27 |
+
The framework provides the multi-language serialization wrappers and mathematical coordinate mappings that enable the offline reconstruction of massive language models from extremely sparse procedural seeds. By mapping weight manifolds and decomposing representations into Meaning and Syntax containers, this framework achieves a **3.1 million times** spatial footprint reduction.
|
| 28 |
|
| 29 |
+
This codebase is published privately to establish legal ownership and empirical utility evidence. It includes verified, systems-level ports in Rust, C++, Go, Python, Swift, Java, and TypeScript.
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
+
## 2. Licensing Compliance & Intellectual Property Map
|
| 34 |
+
|
| 35 |
This repository contains components from multiple origins. Licenses are assigned per component to respect the code we used while strictly protecting Zymatica's intellectual property:
|
| 36 |
|
| 37 |
### Third-Party Components (retained under their original licenses)
|
|
|
|
| 46 |
|
| 47 |
### Proprietary Components — All Rights Reserved, zymatica.space
|
| 48 |
The following are the exclusive intellectual property of **zymatica.space** and are **All Rights Reserved**. No part may be reproduced, distributed, reverse-engineered, modified, or used in any form without explicit written permission:
|
| 49 |
+
* **Language-U framework** — the compression taxonomy, semantic decomposition theory, and Shannon Bypass methodology.
|
| 50 |
+
* **Genesis Protocol** — the multi-level procedural model transmission and reconstruction architecture.
|
| 51 |
+
* **ProceduralSeed format (`.LLM` / `.genesis`)** — the binary seed file format, layer encoding schema, and weights projection indexing.
|
| 52 |
+
* **Chirp packetization scheme** — the 78-chirp / 255-byte LoRA packet layout, XOR-FEC error correction, and Huffman encoding.
|
| 53 |
+
* **SVD/DCT compression pipeline** — weights reduction and reconstruction algorithms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
---
|
| 56 |
|
| 57 |
+
## 3. Core Abstractions & Methodological Innovations
|
| 58 |
+
|
| 59 |
This framework implements the following core structural innovations:
|
| 60 |
+
|
| 61 |
1. **Multidimensional Semantic Coordinate Indexing:** Decomposing conceptual queries and semantic structures into a 6D hypercube index along orthogonal axes (Domain, Subdomain, Operation, Modality, Depth, Polarity) represented as coordinate radicals ($R_C, R_F, R_A$).
|
| 62 |
2. **Embedding-Driven Weight Projection (E-PAUP):** Representing weight deltas of target layers by projecting them onto pre-existing, shared word embedding matrices of the base model, eliminating coordinate transmission overhead.
|
| 63 |
3. **Tokenizer Prefix-Suffix Varint Differential Coding:** Lossless tokenizer serialization storing tokens by ID order using variable-length prefix sharing indexes and suffix bytes, achieving a 9.37x stand-alone reduction and 3200x reference-mode reduction.
|
|
|
|
| 65 |
|
| 66 |
---
|
| 67 |
|
| 68 |
+
## 4. Tokenizer 7-Level Compression Paradigm
|
| 69 |
+
|
| 70 |
+
The tokenizer framework compresses original metadata files (~23 MB) down to either a stand-alone 2.4 MB capsule or a 28-byte base-oracle reference capsule using a 7-Level descent:
|
| 71 |
+
* **Level 1 (Raw Baseline):** Loading raw `tokenizer.json`, `merges.txt`, `vocab.json` (23 MB).
|
| 72 |
+
* **Level 2 (Structured Extraction):** Isolating vocab mappings and merge tuples (15 MB).
|
| 73 |
+
* **Level 3 (Byte/ID Delta Packing):** Varint packing of contiguous IDs; merges represented as vocabulary index pairs (7 MB).
|
| 74 |
+
* **Level 4 (Prefix-Suffix Differential Compression):** Prefix character length extraction + suffix arrays (4 MB).
|
| 75 |
+
* **Level 5 (Base Oracle Reference):** Zero-delta alignment vs base tokenizer.
|
| 76 |
+
* **Level 6 (Deflate Entropy Coding):** Zlib Level 9 hyper-deflate (2.4 MB absolute, 28 bytes reference).
|
| 77 |
+
* **Level 7 (XOR-FEC Chirp Packetization):** Packetization into 28 × 255-byte packets (27 data + 1 parity).
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
## 5. Multi-Language System Implementations
|
| 82 |
+
|
| 83 |
+
The core serialization algorithms are transpiled and verified in:
|
| 84 |
+
* `rust/`: Systems-level Rust implementation (`tokenizer_coder.rs`) for native speed.
|
| 85 |
+
* `cpp/`: Low-level C++ port (`tokenizer_coder.cpp` / `.hpp`) for embedded systems and edge microcontrollers.
|
| 86 |
+
* `go/`: Go port (`tokenizer_coder.go`) for high-concurrency server wrappers.
|
| 87 |
+
* `python/`: Production-ready Python modules.
|
| 88 |
+
* `java/`, `swift/`, `typescript/`: Language ports for enterprise, mobile, and web targets.
|
| 89 |
+
|
| 90 |
+
> **Liability Disclaimer:** This codebase contains research and validation artifacts provided "as-is" for controlled edge testing of the Language-U/1-PAUP pipeline. It is not intended for use in live production environments without prior written permission.
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## 6. RAK Miner & Edge Device Deployment Guide (4GB RAM)
|
| 95 |
From a hardware and systems engineering perspective, this pipeline is designed to execute on resource-constrained edge hardware, such as a **RAK Wireless Miner (typically a Raspberry Pi 4 with 4 GB RAM)**, without triggering Out-of-Memory (OOM) crashes. However, execution must be separated into three distinct phases to ensure 100% reliability:
|
| 96 |
|
| 97 |
### Phase 1: Weight Reconstruction (SUCCESS ✅)
|
| 98 |
+
* **How it fits:** The decoder (`decode_gemma4_seed.py`) generates weights procedurally and streams them directly to sharded `.safetensors` files on the local drive (microSD, USB SSD, or external hard drive) layer-by-layer.
|
| 99 |
* **Memory Profile:** By immediately flushing each layer tensor to disk and freeing the RAM buffers, peak memory usage stays **under 1.5 GB RAM**.
|
| 100 |
* **Smooth Execution Tip:** Ensure you have at least **15 GB of free space** on your storage drive before starting the reconstruction.
|
| 101 |
|
| 102 |
### Phase 2: Inference & Execution (SUCCESS ✅ via Single-Layer Streaming)
|
| 103 |
+
* **How it fits:** A 31B parameter model normally requires 62 GB of memory. Since the Raspberry Pi uses unified system memory shared between CPU and OS, loading the entire model into RAM is impossible. The runtime solves this by loading only **one active layer** from disk into memory, performing the token attention calculation, and immediately discarding it before loading the next layer.
|
| 104 |
* **Memory Profile:** Peak VRAM/RAM consumption remains bounded to **~30 MB to 100 MB** at any single moment.
|
| 105 |
* **Smooth Execution Tip:** Disk read latency is the primary bottleneck. Running this from a standard Class 10 microSD card or an external mechanical hard drive (HDD) will introduce seek latency and slow down the layer-streaming process. For a 100% smooth, high-throughput experience, run the model from a **high-speed USB 3.0 SSD** or connect your external hard drive directly to the Pi's USB 3.0 port (blue port) to avoid bus-speed limits.
|
| 106 |
|
| 107 |
### Phase 3: LoRA SFT Healing (WARNING ⚠️ - Extremely Tight)
|
| 108 |
+
* **The Bottleneck:** Fine-tuning (`decode_teleport.py`) is significantly heavier than inference because backpropagation requires storing activations, gradients, and optimizer states (AdamW) in RAM.
|
| 109 |
* **How to prevent OOMs:**
|
| 110 |
1. **Strict Parameter Freezing:** Ensure all reconstructed SVD base weights are strictly frozen (`requires_grad = False`). Only train the small embedding and layer normalization tensors.
|
| 111 |
2. **Batch Size Limit:** Force a batch size of `1` and gradient accumulation steps if needed.
|
|
|
|
| 123 |
Together, we form **TheAiCollective.art**—pushing the boundaries of model compression and decentralization.
|
| 124 |
|
| 125 |
*Authors: Zymatica.space | astronautshe.com | DevsOne — We Are TheAiCollective.art*
|
|
|
merges.txt
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
|
| 3 |
+
size 32169626
|
tokenizer_config.json
CHANGED
|
@@ -1,305 +1,74 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
"
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
"content": "<|quad_start|>",
|
| 62 |
-
"lstrip": false,
|
| 63 |
-
"normalized": false,
|
| 64 |
-
"rstrip": false,
|
| 65 |
-
"single_word": false,
|
| 66 |
-
"special": true
|
| 67 |
-
},
|
| 68 |
-
"248052": {
|
| 69 |
-
"content": "<|quad_end|>",
|
| 70 |
-
"lstrip": false,
|
| 71 |
-
"normalized": false,
|
| 72 |
-
"rstrip": false,
|
| 73 |
-
"single_word": false,
|
| 74 |
-
"special": true
|
| 75 |
-
},
|
| 76 |
-
"248053": {
|
| 77 |
-
"content": "<|vision_start|>",
|
| 78 |
-
"lstrip": false,
|
| 79 |
-
"normalized": false,
|
| 80 |
-
"rstrip": false,
|
| 81 |
-
"single_word": false,
|
| 82 |
-
"special": true
|
| 83 |
-
},
|
| 84 |
-
"248054": {
|
| 85 |
-
"content": "<|vision_end|>",
|
| 86 |
-
"lstrip": false,
|
| 87 |
-
"normalized": false,
|
| 88 |
-
"rstrip": false,
|
| 89 |
-
"single_word": false,
|
| 90 |
-
"special": true
|
| 91 |
-
},
|
| 92 |
-
"248055": {
|
| 93 |
-
"content": "<|vision_pad|>",
|
| 94 |
-
"lstrip": false,
|
| 95 |
-
"normalized": false,
|
| 96 |
-
"rstrip": false,
|
| 97 |
-
"single_word": false,
|
| 98 |
-
"special": true
|
| 99 |
-
},
|
| 100 |
-
"248056": {
|
| 101 |
-
"content": "<|image_pad|>",
|
| 102 |
-
"lstrip": false,
|
| 103 |
-
"normalized": false,
|
| 104 |
-
"rstrip": false,
|
| 105 |
-
"single_word": false,
|
| 106 |
-
"special": true
|
| 107 |
-
},
|
| 108 |
-
"248057": {
|
| 109 |
-
"content": "<|video_pad|>",
|
| 110 |
-
"lstrip": false,
|
| 111 |
-
"normalized": false,
|
| 112 |
-
"rstrip": false,
|
| 113 |
-
"single_word": false,
|
| 114 |
-
"special": true
|
| 115 |
-
},
|
| 116 |
-
"248058": {
|
| 117 |
-
"content": "<tool_call>",
|
| 118 |
-
"lstrip": false,
|
| 119 |
-
"normalized": false,
|
| 120 |
-
"rstrip": false,
|
| 121 |
-
"single_word": false,
|
| 122 |
-
"special": false
|
| 123 |
-
},
|
| 124 |
-
"248059": {
|
| 125 |
-
"content": "</tool_call>",
|
| 126 |
-
"lstrip": false,
|
| 127 |
-
"normalized": false,
|
| 128 |
-
"rstrip": false,
|
| 129 |
-
"single_word": false,
|
| 130 |
-
"special": false
|
| 131 |
-
},
|
| 132 |
-
"248060": {
|
| 133 |
-
"content": "<|fim_prefix|>",
|
| 134 |
-
"lstrip": false,
|
| 135 |
-
"normalized": false,
|
| 136 |
-
"rstrip": false,
|
| 137 |
-
"single_word": false,
|
| 138 |
-
"special": false
|
| 139 |
-
},
|
| 140 |
-
"248061": {
|
| 141 |
-
"content": "<|fim_middle|>",
|
| 142 |
-
"lstrip": false,
|
| 143 |
-
"normalized": false,
|
| 144 |
-
"rstrip": false,
|
| 145 |
-
"single_word": false,
|
| 146 |
-
"special": false
|
| 147 |
-
},
|
| 148 |
-
"248062": {
|
| 149 |
-
"content": "<|fim_suffix|>",
|
| 150 |
-
"lstrip": false,
|
| 151 |
-
"normalized": false,
|
| 152 |
-
"rstrip": false,
|
| 153 |
-
"single_word": false,
|
| 154 |
-
"special": false
|
| 155 |
-
},
|
| 156 |
-
"248063": {
|
| 157 |
-
"content": "<|fim_pad|>",
|
| 158 |
-
"lstrip": false,
|
| 159 |
-
"normalized": false,
|
| 160 |
-
"rstrip": false,
|
| 161 |
-
"single_word": false,
|
| 162 |
-
"special": false
|
| 163 |
-
},
|
| 164 |
-
"248064": {
|
| 165 |
-
"content": "<|repo_name|>",
|
| 166 |
-
"lstrip": false,
|
| 167 |
-
"normalized": false,
|
| 168 |
-
"rstrip": false,
|
| 169 |
-
"single_word": false,
|
| 170 |
-
"special": false
|
| 171 |
-
},
|
| 172 |
-
"248065": {
|
| 173 |
-
"content": "<|file_sep|>",
|
| 174 |
-
"lstrip": false,
|
| 175 |
-
"normalized": false,
|
| 176 |
-
"rstrip": false,
|
| 177 |
-
"single_word": false,
|
| 178 |
-
"special": false
|
| 179 |
-
},
|
| 180 |
-
"248066": {
|
| 181 |
-
"content": "<tool_response>",
|
| 182 |
-
"lstrip": false,
|
| 183 |
-
"normalized": false,
|
| 184 |
-
"rstrip": false,
|
| 185 |
-
"single_word": false,
|
| 186 |
-
"special": false
|
| 187 |
-
},
|
| 188 |
-
"248067": {
|
| 189 |
-
"content": "</tool_response>",
|
| 190 |
-
"lstrip": false,
|
| 191 |
-
"normalized": false,
|
| 192 |
-
"rstrip": false,
|
| 193 |
-
"single_word": false,
|
| 194 |
-
"special": false
|
| 195 |
-
},
|
| 196 |
-
"248068": {
|
| 197 |
-
"content": "<think>",
|
| 198 |
-
"lstrip": false,
|
| 199 |
-
"normalized": false,
|
| 200 |
-
"rstrip": false,
|
| 201 |
-
"single_word": false,
|
| 202 |
-
"special": false
|
| 203 |
-
},
|
| 204 |
-
"248069": {
|
| 205 |
-
"content": "</think>",
|
| 206 |
-
"lstrip": false,
|
| 207 |
-
"normalized": false,
|
| 208 |
-
"rstrip": false,
|
| 209 |
-
"single_word": false,
|
| 210 |
-
"special": false
|
| 211 |
-
},
|
| 212 |
-
"248070": {
|
| 213 |
-
"content": "<|audio_start|>",
|
| 214 |
-
"lstrip": false,
|
| 215 |
-
"normalized": false,
|
| 216 |
-
"rstrip": false,
|
| 217 |
-
"single_word": false,
|
| 218 |
-
"special": true
|
| 219 |
-
},
|
| 220 |
-
"248071": {
|
| 221 |
-
"content": "<|audio_end|>",
|
| 222 |
-
"lstrip": false,
|
| 223 |
-
"normalized": false,
|
| 224 |
-
"rstrip": false,
|
| 225 |
-
"single_word": false,
|
| 226 |
-
"special": true
|
| 227 |
-
},
|
| 228 |
-
"248072": {
|
| 229 |
-
"content": "<tts_pad>",
|
| 230 |
-
"lstrip": false,
|
| 231 |
-
"normalized": false,
|
| 232 |
-
"rstrip": false,
|
| 233 |
-
"single_word": false,
|
| 234 |
-
"special": true
|
| 235 |
-
},
|
| 236 |
-
"248073": {
|
| 237 |
-
"content": "<tts_text_bos>",
|
| 238 |
-
"lstrip": false,
|
| 239 |
-
"normalized": false,
|
| 240 |
-
"rstrip": false,
|
| 241 |
-
"single_word": false,
|
| 242 |
-
"special": true
|
| 243 |
-
},
|
| 244 |
-
"248074": {
|
| 245 |
-
"content": "<tts_text_eod>",
|
| 246 |
-
"lstrip": false,
|
| 247 |
-
"normalized": false,
|
| 248 |
-
"rstrip": false,
|
| 249 |
-
"single_word": false,
|
| 250 |
-
"special": true
|
| 251 |
-
},
|
| 252 |
-
"248075": {
|
| 253 |
-
"content": "<tts_text_bos_single>",
|
| 254 |
-
"lstrip": false,
|
| 255 |
-
"normalized": false,
|
| 256 |
-
"rstrip": false,
|
| 257 |
-
"single_word": false,
|
| 258 |
-
"special": true
|
| 259 |
-
},
|
| 260 |
-
"248076": {
|
| 261 |
-
"content": "<|audio_pad|>",
|
| 262 |
-
"lstrip": false,
|
| 263 |
-
"normalized": false,
|
| 264 |
-
"rstrip": false,
|
| 265 |
-
"single_word": false,
|
| 266 |
-
"special": true
|
| 267 |
}
|
|
|
|
| 268 |
},
|
| 269 |
-
"
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
"<|vision_pad|>",
|
| 281 |
-
"<|image_pad|>",
|
| 282 |
-
"<|video_pad|>"
|
| 283 |
-
],
|
| 284 |
-
"bos_token": null,
|
| 285 |
-
"chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n {%- if content is string %}\n {{- content }}\n {%- elif content is iterable and content is not mapping %}\n {%- for item in content %}\n {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain images.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Picture ' ~ image_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n {%- elif 'video' in item or item.type == 'video' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain videos.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Video ' ~ video_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n {%- elif 'text' in item %}\n {{- item.text }}\n {%- else %}\n {{- raise_exception('Unexpected item type in content.') }}\n {%- endif %}\n {%- endfor %}\n {%- elif content is none or content is undefined %}\n {{- '' }}\n {%- else %}\n {{- raise_exception('Unexpected content type.') }}\n {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n {{- '<|im_start|>system\\n' }}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {%- if content %}\n {{- '\\n\\n' + content }}\n {%- endif %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {{- '<|im_start|>system\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" %}\n {%- set content = render_content(message.content, false)|trim %}\n {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if ns.multi_step_tool %}\n {{- raise_exception('No user query found in messages.') }}\n{%- endif %}\n{%- for message in messages %}\n {%- set content = render_content(message.content, true)|trim %}\n {%- if message.role == \"system\" %}\n {%- if not loop.first %}\n {{- raise_exception('System message must be at the beginning.') }}\n {%- endif %}\n {%- elif message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content|trim %}\n {%- if loop.index0 > ns.last_query_index %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if loop.first %}\n {%- if content|trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- else %}\n {{- raise_exception('Unexpected message role.') }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is true %}\n {{- '<think>\\n' }}\n {%- else %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
|
| 286 |
-
"clean_up_tokenization_spaces": false,
|
| 287 |
-
"eos_token": "<|im_end|>",
|
| 288 |
-
"errors": "replace",
|
| 289 |
-
"model_max_length": 262144,
|
| 290 |
-
"pad_token": "<|endoftext|>",
|
| 291 |
-
"split_special_tokens": false,
|
| 292 |
-
"tokenizer_class": "Qwen2Tokenizer",
|
| 293 |
-
"unk_token": null,
|
| 294 |
-
"add_bos_token": false,
|
| 295 |
-
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 296 |
-
"extra_special_tokens": {
|
| 297 |
-
"audio_bos_token": "<|audio_start|>",
|
| 298 |
-
"audio_eos_token": "<|audio_end|>",
|
| 299 |
-
"audio_token": "<|audio_pad|>",
|
| 300 |
-
"image_token": "<|image_pad|>",
|
| 301 |
-
"video_token": "<|video_pad|>",
|
| 302 |
-
"vision_bos_token": "<|vision_start|>",
|
| 303 |
-
"vision_eos_token": "<|vision_end|>"
|
| 304 |
-
}
|
| 305 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"audio_token": "<|audio|>",
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"boa_token": "<|audio>",
|
| 5 |
+
"boi_token": "<|image>",
|
| 6 |
+
"bos_token": "<bos>",
|
| 7 |
+
"eoa_token": "<audio|>",
|
| 8 |
+
"eoc_token": "<channel|>",
|
| 9 |
+
"eoi_token": "<image|>",
|
| 10 |
+
"eos_token": "<eos>",
|
| 11 |
+
"eot_token": "<turn|>",
|
| 12 |
+
"escape_token": "<|\"|>",
|
| 13 |
+
"etc_token": "<tool_call|>",
|
| 14 |
+
"etd_token": "<tool|>",
|
| 15 |
+
"etr_token": "<tool_response|>",
|
| 16 |
+
"extra_special_tokens": [
|
| 17 |
+
"<|video|>"
|
| 18 |
+
],
|
| 19 |
+
"image_token": "<|image|>",
|
| 20 |
+
"mask_token": "<mask>",
|
| 21 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 22 |
+
"pad_token": "<pad>",
|
| 23 |
+
"padding_side": "left",
|
| 24 |
+
"processor_class": "Gemma4Processor",
|
| 25 |
+
"response_schema": {
|
| 26 |
+
"type": "object",
|
| 27 |
+
"properties": {
|
| 28 |
+
"role": {
|
| 29 |
+
"const": "assistant"
|
| 30 |
+
},
|
| 31 |
+
"thinking": {
|
| 32 |
+
"type": "string"
|
| 33 |
+
},
|
| 34 |
+
"content": {
|
| 35 |
+
"type": "string"
|
| 36 |
+
},
|
| 37 |
+
"tool_calls": {
|
| 38 |
+
"x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>",
|
| 39 |
+
"type": "array",
|
| 40 |
+
"items": {
|
| 41 |
+
"type": "object",
|
| 42 |
+
"properties": {
|
| 43 |
+
"type": {
|
| 44 |
+
"const": "function"
|
| 45 |
+
},
|
| 46 |
+
"function": {
|
| 47 |
+
"type": "object",
|
| 48 |
+
"x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})",
|
| 49 |
+
"properties": {
|
| 50 |
+
"name": {
|
| 51 |
+
"type": "string"
|
| 52 |
+
},
|
| 53 |
+
"arguments": {
|
| 54 |
+
"type": "object",
|
| 55 |
+
"x-parser": "gemma4-tool-call",
|
| 56 |
+
"additionalProperties": {}
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
}
|
| 62 |
+
}
|
| 63 |
},
|
| 64 |
+
"x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
|
| 65 |
+
},
|
| 66 |
+
"soc_token": "<|channel>",
|
| 67 |
+
"sot_token": "<|turn>",
|
| 68 |
+
"stc_token": "<|tool_call>",
|
| 69 |
+
"std_token": "<|tool>",
|
| 70 |
+
"str_token": "<|tool_response>",
|
| 71 |
+
"think_token": "<|think|>",
|
| 72 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 73 |
+
"unk_token": "<unk>"
|
| 74 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vocab.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|