53 KiB
Third-party notices
Kimi K3 and K3.1-Pro release fixtures and native text adapter
The configuration fixtures in zig/src/families/kimi_k3/fixtures/ are Moonshot AI's release files, Copyright (c) 2026
Moonshot AI. k3-config.json comes from Kimi K3 at revision f831ab66814297da540d832a5235f8e904f29d06, under the
Kimi K3 License. k31-config.json comes from Kimi K3.1 Pro at revision
6d0a0202956796543364d666ab19c6ad1a494ee1, under the Kimi K3.1-Pro License. These are
the models' release licenses, including their additional conditions, not the TensorFold Apache-2.0 license.
The native XTML rendering and argument helpers in zig/src/server/kimi_prompt.zig
and kimi_values.zig adapt that release's encoding_k3.py; native tokenizer
integration follows its tokenization_kimi.py. The release-rendered prompt
fixtures in zig/src/server/fixtures/kimi/golden.json retain their revision and
source hashes. These adaptations retain the same copyright and license notice.
The GLM-OCR HIP operators in zig/kernels/hip/glm_ocr/pointwise.hip
adapt reduction ordering and vectorized LayerNorm statistics from PyTorch
revision 8514f05, aten/src/ATen/native/cuda/Reduce.cuh and
aten/src/ATen/native/cuda/layer_norm_kernel.cu. These are maintained
TensorFold adaptations under the BSD-3-Clause license, Copyright (c) 2016-
Facebook, Inc. and the other holders listed in
LICENSES/PyTorch-BSD-3.txt.
The optional native attention adapter in zig/src/hip/attention_aotriton.zig
uses the AOTriton 0.11.1 version-1 forward ABI from upstream revision
d34f3b6c824df77d5c5788a2e7555b2398be4b79, under the MIT license.
The declarations follow the original headers; this adapter is maintained
by TensorFold. The AOTriton library and architecture images are external
runtime dependencies. See LICENSES/AOTriton-MIT.txt.
TensorFold uses MLX and
mlx-lm, MIT License, Copyright © 2023 Apple Inc.
The native engine installs and links neither. It reads checkpoints in their formats, and its Metal kernels under
zig/kernels/metal/ repeat the arithmetic of MLX's kernels and mlx-lm's model math, many of them bit for bit.
The Python engine, frozen at 0.6.6, installs MLX and mlx-lm as dependencies.
Nemotron 3.5 Parse on HIP
The reference tool tools/zig/nemotron_parse_reference.py adapts run_transformers_inference.py from NVIDIA's
nvidia/Nemotron-3.5-Parse at revision
4035ffb1d8f8bafcdb867dfaf6f7514f101464f9, and keeps that file's SPDX header. The native family follows the same
release's code for its math, rounding and resizing; each file is written for TensorFold, and the file named is the
reference:
zig/src/families/nemotron_parse/processor.zig:NemotronParseImageProcessorinhf_nemotron_parse_processor.py(the aspect-preserving resize, the NaViT white padding, the normalization and the patch order).zig/src/families/nemotron_parse/tower.ziganddecoder.zig:RadioWithNeck,_VisionTransformer,NemotronParseDecoder,_DecoderLayer,_GQAAttentionand_ScaledEmbeddinginhf_nemotron_parse_modeling.py.zig/kernels/hip/ops/vl_position.hpp:_normalized_2d_position_pagesinhf_prefix_geometry.py.
These release files are Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES, under the NVIDIA OpenMDW License 1.1; see the license text.
LightOnOCR-3 release fixtures
The configuration fixtures for LightOnOCR-3 are LightOn's release files, unchanged, under the Apache License 2.0; see
the license text. zig/src/families/lighton_ocr/fixtures/config.json and
processor_config.json come from lightonai/LightOnOCR-3-1B at revision 23d544085c886bbdace647bcfab91203299417e2.
zig/src/families/qwen3_5/fixtures/lighton-ocr-0.8b.json is the config.json of lightonai/LightOnOCR-3-0.8B at
revision 36d8636925327c671bd8e479c517a004f7566bd9, and lighton-ocr-4b.json the config.json of
lightonai/LightOnOCR-3-4B at revision b71010f095dc3735de7ee6b9969bff8f8f50b39a.
MLX and mlx-lm adaptations
In the Python engine, frozen at 0.6.6, the DeltaNet implementations in
src/tensorfold/kernels/qwen/dense/v1/lane_gdn.py and
lane_tree.py adapt mlx-lm's qwen3_5 and gated_delta model math and kernels under its MIT License.
The native engine carries that adaptation. zig/kernels/metal/qwen3_5/gdn_pre.metal, gdn_chain.metal and
gdn_post.metal are generated from the Python engine's dense Qwen kernels, whose recurrence step is lane_tree.py's.
zig/kernels/metal/core/deltanet.metal and Flash Next's zig/kernels/metal/flashnext/q4_gdn_*.metal run the same
model math.
Qwen Flash Next
The n-gram ID helpers translate Hugging Face transformers' models/qwen4_exp/modeling_qwen4_exp.py with renamed
identifiers. The native engine's are in Zig and Metal, in zig/src/families/flashnext/config.zig and the
fz_ple_ids kernel of zig/src/families/flashnext/replay.zig. The Python engine's, frozen at 0.6.6, are in MLX and
NumPy, in src/tensorfold/families/qwen4_exp/model.py and cuda/ngram.py.
Copyright 2026 The Qwen Team and The HuggingFace Inc. team, Apache License 2.0.
See the license text. The same helpers appear in mlx-vlm's
models/qwen4_exp/language.py, MIT License, Copyright © 2025 Prince Canuma.
The native engine's image and video input for Flash Next follows transformers' get_rope_index positions in
models/qwen4_exp/modeling_qwen4_exp.py (zig/src/families/flashnext/vis_prompt.zig) and its Qwen3-VL video
processor and processor in models/qwen3_vl/ (frame sampling, smart_resize, pair times and the prompt layout;
zig/src/core/qwen_vl/video.zig, zig/src/server/images.zig). Copyright 2025 and 2026 The Qwen Team and The
HuggingFace Inc. team, Apache License 2.0; see the license text.
GLM-5.3-Flash on Apple Silicon
The native GLM-5.3-Flash engine (zig/src/families/glm/) runs the Python glm5_next family's decode kernels.
tools/zig/gen_glm_kernels.py generates zig/kernels/metal/glm/ from that family's Metal kernels
(src/tensorfold/kernels/glm/flash/v1/ at the v0.6.6 tag), which @chadhurley25075-png wrote in
#9 (credits).
zig/kernels/metal/glm_kda_prompt.metal extends the generated KDA kernel to prompt chunks.
In the Python engine, frozen at 0.6.6, the MLX engine of glm5_next
(src/tensorfold/families/glm5_next/: the forward pass in model.py, kda.py,
mla.py and mlp.py, the draft head in mtp.py, runtime.py) and its Metal kernels
(src/tensorfold/kernels/glm/flash/v1/) are written for TensorFold. What they follow or port:
- The forward pass follows, op for op on its prefill path, the GLM-5.3-Flash (
glm5_next) implementation added to mlx-vlm by PR #2030 (by Lazarus-931; MIT License, Copyright (c) 2025 Prince Canuma), as vendored by oMLX (Apache-2.0). Nothing is imported from either at runtime. The native forward inzig/src/families/glm/follows the Python one. kernels/glm/flash/v1/kda.pyis ported from mlx-vlm PR #2105 ("glm5_next: fuse the KDA decode chain into one Metal kernel", by avlp12;mlx_vlm/models/glm5_next/fused_kda.py; closed without merging, MIT License, Copyright (c) 2025 Prince Canuma): the whole KDA decode step in one Metal kernel. TensorFold runs a window of rows in order inside the launch, folds the 4-bitf_b/g_bprojections in with MLX's one-rowqmv_quadarithmetic, and keeps its own rounding points. Its precision rules (precise exp, uncontracted sums of squares) are also used infused.py,moe.pyandhc.py. The nativezig/kernels/metal/glm/kda_rows*.metalare generated from it.kernels/glm/flash/v1/sparse_attention.pyis mlx-vlm'sindexed_sparse_attentionkernel (mlx_vlm/models/sparse_attention.py) as extended by mlx-vlm PR #2245 ("Fix GLM-5.3 cached decode batch invariance", by raullenchai; closed without merging, MIT License, Copyright (c) 2025 Prince Canuma), adapted to TensorFold's single latent cache. The nativezig/kernels/metal/glm/sparse_attention*.metalare generated from it.- mlx-vlm PR #2107 (the sparse indexer's incremental decode and a stale-pool fix, by avlp12) needed no code:
TensorFold's cache already pools once per completed block. Its stale-pool case is pinned by the Python engine's
tests/test_glm5_ported_kernels.py. - The hyper-connection kernel
_HC_SPLITinkernels/glm/flash/v1/kernels.py, and the sinkhorn and collapse inhc.py, repeat thehc_sinkhorn_collapsekernel of mlx-vlm'smlx_vlm/models/deepseek_v4/hyper_connection.py(MIT License, Copyright (c) 2026 Apple Inc.), with its output type set to the input's. The nativezig/kernels/metal/glm/hc_expand_10.metalis generated fromhc.py, andzig/kernels/metal/core/hc_boundary.metalruns the same split, Sinkhorn and collapse. - The 4-bit matvec
_QMV_ROWSinkernels.pyis Flash Next'sqmv_rowswith MLX's group-64 scale indexing, and the expert kernels (_EXPERT_GROUP,_EXPERT_QMV) follow Flash Next'sexpert_group/grouped_gateup. The row kernels inkernels.py,moe.pyandhc.pyrepeat the arithmetic and partitions of MLX 0.32's own kernels (MIT License, Copyright © 2023 Apple Inc.):qmv_fast,qmv_quadandgather_qmv_fast(quantized.h),GEMVKernelandGEMVTKernel(gemv.h) and therms_normkernels, one row per grid slice with the tiling MLX picks for one row, so each row keeps MLX's one-row bits. The nativezig/kernels/metal/glm/qmv*.metal,gemv*.metal,moe_*.metalandrouter.metalare generated from these.
Gemma 4 on Apple Silicon
The native Gemma 4 engine (zig/src/families/gemma4/) ports the Python engine's dense Gemma 4 decode, which @gilby
wrote in #360 on @cshintov's Gemma kernels from
#10 (credits).
Its reference is gilby's gemma4-dense branch at a6ff795e: RowDecode in src/tensorfold/kernels/gemma/v1/decode.py
and the _EMIT, qkv_prep, attn_tail and dense_tail kernels and the attention partials and merge in glue.py and
attention.py. zig/kernels/metal/gemma4/glue.metal repeats that arithmetic, and each kernel names its source.
Where that reference calls MLX or mlx-lm, glue.metal repeats their kernels' arithmetic (MLX and mlx-lm, MIT License,
Copyright © 2023 Apple Inc.; see the license text): gemma_rms_looped is MLX's rms_looped from
mlx/backend/metal/kernels/rms_norm.metal, the kernel mx.fast.rms_norm runs for rows past 4,096, with its thread
counts, reads and rounding points; gemma_embed is MLX's affine dequantize followed by a bf16 multiply;
gemma_geglu and gemma_softcap are geglu and logit_softcap from mlx-lm's models/gemma4_text.py as MLX's
bf16 ops; and gemma_rope_freqs is mlx-lm's ProportionalRoPE frequencies, computed as MLX's pow computes them.
The image tower (zig/src/families/gemma4/vision.zig, zig/kernels/metal/gemma4/vision.metal) follows
Gemma4VisionModel and Gemma4MultimodalEmbedder in transformers' models/gemma4/modeling_gemma4.py, and
zig/src/families/gemma4/image.zig follows Gemma4ImageProcessorPil in image_processing_pil_gemma4.py
(get_aspect_ratio_preserving_size, the patch layout and the rescale). Copyright 2026 the HuggingFace Team, Apache
License 2.0; see the license text. The engine runs none of their code.
The drafter (zig/src/families/gemma4/dflash.zig) implements z-lab's DFlash for Gemma 4 31B from the MLX model listed
under vendored code (z-lab/dflash, MIT License, Copyright © 2026 Z Lab); the native
engine vendors no copy.
The 12B (gemma4_unified) and its MTP assistant (zig/src/families/gemma4/assistant.zig, assistant_weights.zig)
follow @gilby's gemma4_unified family at 6b0ead7a (gilby/TensorFold,
src/tensorfold/families/gemma4_unified/model.py and assistant.py), which follows Gemma4UnifiedAssistantForCausalLM
in transformers. The 12B's image embedder (zig/src/families/gemma4/vision_unified.zig) follows
Gemma4UnifiedVisionEmbedder in models/gemma4_unified/modeling_gemma4_unified.py, and image.zig's merged patches
patches_merge in image_processing_gemma4_unified.py (transformers, Copyright 2026 the HuggingFace Team, Apache
License 2.0; see the license text). The engine runs none of their code.
Other widths (zig/src/families/gemma4/widths.zig and the stacks in weights.zig) follow @gilby's oQ per-layer widths
at 76c83c37 on the gemma4-dense branch: each module's MLX affine width from the config, and a q|k|v or gate|up stack
whose members differ split into runs of equal widths (src/tensorfold/kernels/gemma/v1/matmul.py). The engine runs none of
that code.
CUDA
The Python engine's CUDA backends, frozen at 0.6.6, use PyTorch, BSD-3-Clause, and
Triton, MIT, supplied by NVIDIA's container rather than bundled.
Dense Qwen implements mlx-lm's model math. CUDA DFlash2 implementations port z-lab's architecture under
the MIT License, Copyright © 2026 Z Lab.
The native CUDA build links neither PyTorch nor Triton. It runs its own kernels (zig/kernels/cuda/), and it loads
Triton-compiled cubins (zig/src/cuda/triton.zig) only from a captured set named by TENSORFOLD_CUDA_KERNELS or
installed beside the executable.
Flash Next implements transformers' model math under the attribution above. In the Python engine, its new CUDA DeltaNet kernel follows flash-linear-attention's numerics, MIT; its NCCL wrapper follows vLLM's stream convention, Apache-2.0, without copying either implementation.
The earlier #927 Drama backbone included a Gated DeltaNet prefill adapted from Flash Linear Attention.
The merged Drama family uses #939/#956's operators instead. The staged BF16 GEMV candidate in
zig/kernels/cuda/drama3_staged_gemv.cu and the direct-I/O stager in zig/src/families/drama3/cuda/stager.zig
come from plotarmordev's #927 implementation. Their qualification against the merged model is separate from
#927's earlier native baseline receipts.
The Python engine's GLM CUDA engine implements transformers' models/glm5_next/modular_glm5_next.py math,
Apache-2.0, without including that source. Its draft inputs and thinking-off rendering follow the public GLM recipe
from Mia-AiLab without including recipe code.
The native CUDA GLM family (zig/src/families/glm/cuda_*.zig, its kernels in zig/kernels/cuda/glm_*.cu) implements
the same math. Its image tower, on Metal (zig/src/families/glm/vision.zig) and on CUDA (cuda_vision.zig,
zig/kernels/cuda/glm_vision.cu), and the PyTorch reference that checks it (tools/glm_vision_ref.py) follow
mlx-vlm's glm5_next (vision.py, and processing.py for the reference's patches; MIT License, Copyright (c) 2025
Prince Canuma) without importing it.
In the Python engine, frozen at 0.6.6, GLM EXL3 (families/glm5_next/cuda/exl3.py, exl3.cu, exl3_mm.py), the
shared EXL3 module (src/tensorfold/cuda/exl3/) and the EXL3 loaders of Qwen3.8-27B and Qwen3.8 Flash Next
(families/qwen3_5/cuda/exl3_load.py, families/qwen4_exp/cuda/exl3.py; the module and the loaders are @vcruz305's,
from #42) read
ExLlamaV3's EXL3 format: its trellis layout and bitstream, its
"3inst", "mcg" and "mul1" codebooks, its half-integer bit widths and its tensor-core fragment order. Flash
Next's packs also carry ExLlamaV3's n-gram row codec, read as its ngram_dequant reads it. ExLlamaV3 uses the
MIT License, Copyright © 2025 Turboderp. TensorFold's decoders and kernels are separate implementations,
checked bit for bit against ExLlamaV3's dequantization.
The native zig/src/core/exl3_format.zig reference decoder, the zig/src/core/exl3_projection*.zig decoder and
zig/kernels/metal/core/exl3_projection.metal separately implement the same format and codebooks
under the Turboderp attribution above. So do the native checkpoint scan (zig/src/core/exl3_load.zig,
exl3_metal_load.zig), the CUDA kernels (zig/kernels/cuda/exl3_*.cu, exl3_decode.cuh, exl3_candidate.cuh) and
their Zig side (zig/src/cuda/exl3*.zig), and GLM's reader of its EXL3 experts (zig/src/families/glm/cuda_exl3.zig).
No captured kernel binaries or model weights are bundled.
The EXLR8 reader, decoder, pull and kernels (zig/src/core/exlr8*.zig, zig/src/cli/pull_exlr8*.zig,
zig/src/cuda/exlr8.zig, zig/kernels/metal/core/exlr8*.metal, zig/kernels/cuda/exlr8*.cu) read kindlingai's exlr8
v2 format as the Loader section of the glm-5.3-exlr8-k2-k3-k4
model card lays it out. The format's packing, manifests and error tables are kindlingai's, offered under
CC BY 4.0; its codebook, Hadamard rotation and tile order are
ExLlamaV3's, under the Turboderp attribution above. TensorFold's implementations are its own, checked bit for bit
against the format's reference loader (MIT License, Copyright (c) 2025 Turboderp), which is not included.
zig/tests/fixtures/exlr8/oracle.json holds that loader's digests and a few sampled values of the release; no
weights are bundled.
In the Python engine, frozen at 0.6.6, Flash Next's optional int8 and int4 KV caches
(families/qwen4_exp/cuda/kvcache.py, by @vcruz305 in #47) follow
the cache quantization scheme of ExLlamaV3 -cq 8 and -cq 4
(MIT License, Copyright (c) 2025 Turboderp, text below): groups of 32, one fp16 absmax scale per group, the group
rotated by a 32-point Hadamard, midpoint-grid codes, compand_a == 0. 8-bit stores each code as a signed int8
(q - 128). 4-bit stores two unsigned codes per byte, low nibble first (the same bits as ExLlamaV3's little-endian
packing, a uint8 tensor rather than their uint32 words). Their dequantizer folds another 1/sqrt(32) into the scale
and applies the unnormalized butterfly on the way out; this cache applies the normalized H32 to the query and to the
merged output instead, and leaves the stored codes rotated. Scales match their quantizer bit for bit. Reconstructed
values agree within fp16/bf16 rounding (under 0.01 on random groups), not bit for bit. The quantizer and the attention
dequant are written for TensorFold and checked against an independent reference of that arithmetic. The native engine
has no quantized KV cache and refuses --kv-dtype.
The two-rank CUDA RoCE gather (zig/src/cuda/roce.zig, zig/kernels/cuda/roce_gather.cu) adapts
the one-shot all-gather protocol of b12x's RoCEnante
(b12x/comm/roce/, PRs #295 and #315): a device-resident epoch, sequence flags after each payload, two slots by
sequence parity and a timeout that fails the transport. Copyright 2026 Luke Alonso and the b12x contributors,
Apache License 2.0 (see the license text); b12x ships no NOTICE file.
The Zig tensor-parallel fabric's RoCE path (zig/src/fabric/tp/mailbox.cu, roce.zig, roce_verbs.zig) adapts
the same one-shot all-gather protocol of b12x's RoCEnante (b12x/comm/roce/, PRs #295 and #315) for any family that
runs tensor parallelism over it, under the same copyright and Apache License 2.0 terms.
Cloudflare Clef
zig/src/server/clef_encode.zig and clef_answer.zig, the host head in zig/src/core/joint_schema/
(reference.zig, reference_attn.zig), the device heads in zig/src/hip/joint_schema/ and
zig/src/cuda/joint_schema/ with their kernels in zig/kernels/hip/joint_schema/joint_schema.hip and
zig/kernels/cuda/joint_schema.cu port Cloudflare's Clef release code, joint_schema_model.py in
Cloudflare/clef and
Cloudflare/clef-flash: the record rendering and encoding
(render, question_options, encode_record), the verbatim system prompt, the joint schema head
(JointSchemaHead, EvidenceRoutingLayer) and the SystemOne answer shape (systemone_answer). The encoder's first
port is gilby's. Copyright Cloudflare, Inc., Apache License 2.0; see the license text.
tools/clef_head_golden.py, tools/clef_tokens.py and tools/clef_head_gate.py run that file:
zig/src/core/joint_schema/fixtures/clef_tiny.json holds a generated head's outputs (no Cloudflare weights), and
zig/src/server/fixtures/clef_tokens.json the Clef-Flash tokenizer's ids for synthetic records.
Vendored code and weights
In the Python engine, frozen at 0.6.6, src/tensorfold/drafters/vendor/z_lab_dflash/model_mlx.py is the unmodified
dflash/model_mlx.py from
z-lab/dflash, MIT License, Copyright © 2026 Z Lab.
The native engine vendors no copy. Its DFlash2 drafter, zig/src/families/qwen27/dflash/, implements z-lab's
architecture under that attribution.
In the Python engine, frozen at 0.6.6, src/tensorfold/families/deepseek_v4/vendor/encoding_dsv4.py is the
unmodified encoding/encoding_dsv4.py of
deepseek-ai/DeepSeek-V4-Flash (revision 60d8d70), and
tests/fixtures/deepseek_v4/ holds two of its test cases, MIT License, Copyright (c) 2023 DeepSeek.
The MTP layer that engine drafts with comes from that checkpoint's last shard (MIT), converted by
families/deepseek_v4/convert.py. The native engine has no DeepSeek-V4 family and ships none of these files.
zig/kernels/cuda/ggml_iq2xxs_tables.cuh holds ggml's IQ2_XXS grid and sign
tables as ggml-common.h defines them, MIT License, Copyright (c) 2023-2026 The ggml authors (the license text is
below); tools/zig/bolt_ggml.py reads them from that file. The IQ2_XXS and Q8_0 kernels that use them for Nemotron 3.5
Bolt's GGML checkpoints (zig/kernels/cuda/ggml.cu, zig/src/cuda/ggml.zig) are TensorFold's own.
TensorFold ships no model weights. The z-lab/Qwen3.8-27B-DFlash2 model card states Apache-2.0.
The optional incoai/GLM-5.3-Flash-DFlash2 model card states Apache-2.0 too. Each checkpoint keeps its own license.
Structured output: libtfgrammar
lib/libtfgrammar in the release archives is zig/src/grammar/tf_grammar.cc compiled with the C++ sources of
xgrammar v0.2.8, Apache License 2.0, Copyright (c) 2024 by XGrammar Contributors
(its NOTICE: "XGrammar Copyright (c) 2024 by XGrammar Contributors"), and the headers it bundles:
dlpack, Apache License 2.0, and picojson,
BSD 2-Clause License, Copyright 2009-2010 Cybozu Labs, Inc. and 2011-2014 Kazuho Oku. Nothing of theirs is in this
repository; the build reads a checkout given with -Dxgrammar=DIR, and each archive carries xgrammar's and dlpack's
license and xgrammar's notice in LICENSES/. picojson's license:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Cortheon
--cortheon (zig/src/server/cortheon/) adapts Cortheon's task-classification word lists,
its stage sequences and their purposes, its rules for when a task needs outside sources, and its instruction-filter patterns,
rewritten in Zig. MIT License, Copyright (c) 2026 Cortheon contributors; the license text is below.
Model release and library code these files follow
These follow a model's release code or a library's model code for their math, rounding or resizing. Each is written for TensorFold; the file named is the reference.
tools/lfm3/ref64.pyandzig/kernels/xpu/lfm3.cl:modeling_lfm3.pyin LiquidAI/LFM3-1.7B. Copyright Liquid AI, LFM Open License v1.0; see the license text.zig/kernels/metal/minimax_m3/glue.metal: the rounding points ofmodeling_minimax_m3_vl.pyin transformers.zig/src/families/ricursive/(its layer order and rounding points),zig/kernels/metal/ricursive/glue.metal,zig/kernels/cuda/ricursive.cu,ricursive.cuh,ricursive_prep.cu,ricursive_prep.cuhandtools/zig/ricursive_reference.py:modeling_ricursive.pyin ricursiveAI/Ripple-65B-Preview at revision240d5966cbe00f0627c699e59ef58560b60303cf: the scaled embedding, the value residual, the per-head q/k norms, RoPE on sliding layers only, the fp32 sigmoid gate, the clamped SwiGLU and the four norms a layer. The release's SGLang modelinference/server/model.pycomputes the same layers; what is in it alone is its serving (the W4A4 kernels, the capture of hidden states for a drafter), which this family does not take. Copyright ricursiveAI, Apache License 2.0; see the license text. The reference's--releaseand--release-f64modes import the release's ownmodeling_ricursive.pyfrom the checkpoint at run time; TensorFold does not include it.zig/src/families/ricursive/dflash2.zigandzig/kernels/metal/ricursive/dflash2.metal(the DFlash2 drafter for ricursiveAI/Ripple-65B-Preview-DFlash2):DFlash2DraftModel,GroupedDynamicCausalConvandCandidateSelectorindflash/model.pyof z-lab/dflash at revision07ebd93db9f472af339b644bb70221ad8428328a, MIT License, Copyright © 2026 Z Lab, with itsapply_rotary_pos_emb's rounding points; the RMSNorm, rotary cos and sin, and SiLU MLP of the release'smodeling_ricursive.pyabove (RicursiveRMSNorm,RicursiveRotaryEmbedding,RicursiveMLP), at the drafter's config. The target's taps are the hidden statesextract_context_featurein thatmodel.pytakes (hidden_states[layer_id + 1]), here ofmodeling_ricursive.py'soutput_hidden_states: a tapped layer's output, before the final norm. The NoPE layer isno_rope_layersin the drafter'sconfig.json(ricursiveAI/Ripple-65B-Preview-DFlash2 at revision35609b3be3dd08a822b3ba1257c1ea5dd6f87632, Apache License 2.0);zig/src/families/ricursive/fixtures/dflash2_config.jsonis thatconfig.json, unchanged. The 16,384-token draft window is frominference/server/README.mdin the release above.zig/src/vision/qwen_cuda.zig:Qwen3_5VisionModelin transformers.zig/src/core/picture/patches_test.zig: recorded image-processor output data fromLfm3VlImageProcessorandQwen2VLImageProcessorin transformers; the processing implementation is described below.zig/src/families/flashnext/rotary_config.zig:_compute_yarn_parametersin transformers, for the 64 rotary dims.zig/kernels/metal/idol.metal,zig/kernels/cuda/idol.cuandzig/kernels/cuda/idol_attention.cuh: the rounding points of Idol's denoiser in speridlabs/idol-sdk at4702a7f0. Copyright speridlabs, Apache License 2.0; see the license text.
transformers is Copyright The HuggingFace Team, Apache License 2.0; see the license text.
Image patch preparation
zig/src/core/picture/patches.zig implements the image budgets and geometry described by the
Qwen2-VL model card,
Qwen2.5-VL model card and
LFM2-VL model card.
Its discrete sizing, patch ordering, normalization and cache identities are pinned by TensorFold's own tests and
black-box processing outputs. The implementation was rewritten from those behavior sources; the recorded comparison
data in patches_test.zig retains its provenance above.
MIT License text
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Flash Next CUDA image integration
This notice covers the Flash Next image input on CUDA that @shantanugoel added to the Python engine in
#146, under src/tensorfold/vision/ and
src/tensorfold/families/qwen4_exp/cuda/; that engine is frozen at 0.6.6. The native engine ships none of this code.
The multimodal rotary and image-feature integration is adapted from MiaAI-Lab's
Flash Next vision patch 0008,
MIT License, Copyright (c) 2026 MiaAI-Lab. The license is included in LICENSES/MiaAI-Lab-MIT.txt.
The port preserves the v0.5 CUDA execution APIs and adds an offline EXL3 vision adapter.
Pictures in the native engine
zig/src/core/picture/ reads PNG, JPEG and WebP pictures to the RGB pixels Pillow loads them as (Pillow 12.3 for
TensorFold 0.6.6's PNG and JPEG, Pillow 13.0.0 for WebP), and the families' processors resize them. No libjpeg-turbo,
libwebp, Pillow or PyTorch code is included.
- JPEG pictures decode in libjpeg-turbo 3.1.4.1's TurboJPEG library (
libturbojpeg), the release Pillow 12.3 bundles, loaded at run time and called with Pillow's decoder settings. TensorFold neither includes nor ships it; libjpeg-turbo is under the IJG, BSD-3-Clause and zlib licenses. - WebP pictures decode in libwebp 1.6.0's decoder library (
libwebpdecoder), the release Pillow 13.0.0 bundles, loaded at run time. TensorFold neither includes nor ships it; libwebp is under the BSD-3-Clause license, Copyright (c) 2010, Google Inc. - PNG pictures decode from the PNG specification on Zig's zlib inflater, and each layout becomes 8-bit samples as
Pillow's PNG modes hold it. The bicubic resizes repeat, bit for bit, the fixed-point arithmetic of Pillow's
Image.resize(MIT-CMU License, Copyright © 1997-2011 by Secret Labs AB, Copyright © 1995-2011 by Fredrik Lundh and contributors, Copyright © 2010 by Jeffrey 'Alex' Clark and contributors; the license is inLICENSES/Pillow-MIT-CMU.txt) and of PyTorch's antialiased uint8 bicubic (BSD-3-Clause, Copyright (c) 2016- Facebook, Inc. and the other holders listed inLICENSES/PyTorch-BSD-3.txt). zig/src/families/lfm2/image.zigports transformers'Lfm2VlImageProcessorandLfm2VlProcessor(smart resize, tile grid, placeholder tokens). Apache License 2.0, Copyright 2025 the HuggingFace Inc. team; see the license text.
Intel GPU engine (XPU)
The Intel GPU kernels and host code (zig/kernels/xpu/, zig/src/xpu/, the xpu_* files of the families) are written for
TensorFold. What they follow or copy:
- The Level Zero loader and the Intel compute runtime are loaded at run time and are not bundled;
ocloccompiles the kernels at build time and is not distributed.
Fish Audio Drama 3 on CUDA
zig/src/families/drama3/, zig/kernels/cuda/drama3*.cu and drama3*.cuh implement the model math of
SGLang-Omni's sglang_omni/models/fishaudio_drama3 (revision 416a70c0),
Apache-2.0, without including its source. The codec they decode with is Fish Audio's modded DAC from
Fish Speech (Fish Audio Community License Agreement v1.0), itself built on
descript-audio-codec (MIT License, Copyright (c) 2023-present,
Descript); codec.zig and drama3_codec.cu are separate implementations of its arithmetic and include no Fish Speech
or descript-audio-codec source. The samplers draw from the Philox stream of SGLang-Omni's Triton sampling kernels.
drama3_fp8.cu is TensorFold's fp8_experts.cu with per-row FP8 activation scales, the dynamic activation scheme
SGLang serves the checkpoint's FP8 experts with. The resampler in wav.zig follows torchaudio's functional.resample
(BSD-2-Clause) without including its source.
TensorFold ships no Drama 3 weights and no codec weights. fishaudio/drama-3
and its codec.pth are under the Fish Audio Community License Agreement v1.0: research and non-commercial use,
commercial use below its revenue threshold, and no Hosted Service without a separate license from Fish Audio. Users
obtain the checkpoint and accept that license themselves.
DeepSeek-V4.1 shared checkpoint forms
The DeepSeek-V4.1 config and checkpoint planning combine @jayleaton’s chain (#727) and @akol1’s #825 admission. The reference is DeepSeek AI’s MIT licensed inference at revision 2cba9e42aa026125f3ed06c6d98c1db82f7ca027, Copyright (c) 2023 DeepSeek. EXL3 scanning reuses the common checkpoint scanner and retains its ExLlamaV3 attribution.
The shared Engram host code and token-map builder combine @jayleaton’s #668 and @akol1’s #824, #825 and #826. Normalization, PCG64 and bucket metadata follow the pinned DeepSeek MIT reference above. nfkd_data.zig is generated Unicode decomposition data from #824; it is kept verbatim.
DeepSeek-V4.1 CUDA sources
The CUDA sources and loading combine @jayleaton’s #671, #674 and #727 contributions. Source comments retain the original TensorFold Python-kernel blob receipts. Generic EXL3 variants extend the one common EXL3 operators and their per-slot epilogues; tile decoding is shared. The ExLlamaV3 MIT attribution, Copyright (c) 2025 Turboderp, applies as described above. No external reference, captured cubin, model shard or CUDA compiler is bundled by this patch.
DeepSeek-V4.1 Metal image preparation
The image preparation (zig/src/families/deepseek_v41/metal/vision_prep.zig,
zig/src/families/deepseek_v41/metal/vision_prepare.zig) follows the image budgets and geometry of
image_processor.py in DeepSeek AI's MIT licensed
deepseek-ai/DeepSeek-V4.1-Flash-1017
(revision 08c8657f02291e11b6f6b63e0e16014f8e748518), Copyright (c) 2023 DeepSeek.
Shared EXL3 resolver setup
The shared EXL3 resolver split and CUDA lane option forwarding retain work from PR #728 by @ajensenwaud, with the common EXL3 and DeepSeek contributor credits preserved.
MiaAI-Lab Flash Next prompt expert staging
zig/kernels/cuda/nvfp4_experts_tile.cu adapts the K32 shared-memory pipeline in patch0014 of
MiaAI-Lab's Flash Next recipe,
recipe commit e1f564eb915bb5272474b6c1c527aec3b9ed3de6. It credits TensorFold Contributors for the expert
arithmetic and staging design. Copyright (c) 2026 MiaAI-Lab and Copyright (c) 2026 TensorFold contributors.
The complete original MIT notices and permission text are retained in Mia-FlashNext-MIT.txt.
MiaAI-Lab Flash Next int4 kernel
zig/kernels/cuda/fn_int4.cu is the fn_int4.cu that patch 0002 of
MiaAI-Lab's dual-Spark recipe creates, at
recipe commit 04f2b53826dca9a52893f2bce9d49bb3d1828e88, under the Apache License 2.0, Copyright 2026 MiaAI-Lab.
That recipe's NOTICE reads "Qwen3.8-Flash-Next on 2x DGX Spark with TensorFold / Copyright 2026 MiaAI-Lab" and asks a
redistributor to keep it and to state what changed, which this section and the file's own header do. The license text
is Apache-2.0.txt. TensorFold's three changes: the head's dense items hold 16 MT rows rather
than 16, one more int4_prompt_kernel instantiation builds for the routed gate/up (both marked TF: in the file), and
the local copies of the mma, the non-allocating load and the cp.async copies are replaced by the shared ones in
zig/kernels/cuda/common/, whose instruction text is the same. The groups-of-64 instantiations a two-rank serve would
need are not built. The host packer and the launchers in zig/src/cuda/int4.zig are TensorFold's.
Ling-3.0-tiny and Ling-3.1-flash
Ling-3.0-tiny and Ling-3.1-flash are MIT licensed by inclusionAI. The host family package
(zig/src/families/ling/) is a port of @jschmied's ling-tiny branch (98026d35). TensorFold ships no Ling weights.
MOSS-Image seeded noise
zig/src/families/moss_image/noise.zig is an altered port, to Zig, of the code x86 PyTorch runs for torch.randn on a
seeded CPU generator, so that it makes the same latents bit for bit:
- PyTorch's mt19937 engine and
normal_fill(BSD-3-Clause, Copyright (c) 2016- Facebook, Inc. and the other holders listed inLICENSES/PyTorch-BSD-3.txt). log256_psandsincos256_psfromavx_mathfun.h, which PyTorch includes (zlib license, Copyright (C) 2012 Giovanni Garberoglio, based on Julien Pommier'ssse_mathfun.h, Copyright (C) 2007; the license is inLICENSES/avx_mathfun-zlib.txt).
DeepSeek chat encoder output fixture
zig/src/server/fixtures/deepseek_v41_encoder/cases.jsonl.gz contains 328
request/output cases supplied from DeepSeek's encoder, under the MIT license,
Copyright (c) 2026 DeepSeek. The unmodified license is beside the fixture as
LICENSE.
This is test data, not an encoder implementation. TensorFold's renderer was
written from these outputs and its existing code without consulting the encoder's source.
Thinking-off checkpoint template fixtures
The fixtures in zig/src/server/fixtures/thinking/ are unmodified release files, used only as host-test inputs:
glm53.jinjaandglm53-tokenizer_config.jsoncome from nvidia/GLM-5.3-Flash-NVFP4 at revisionda920bb0b9f4(NVIDIA's quantization of zai-org's GLM-5.3-Flash), under the MIT license its model card states. SeeLICENSES/MIT.txt.lfm2.jinjaandlfm2-tokenizer_config.jsoncome from LiquidAI/LFM2.5-24B-A2B-MLX-4bit at revision667408d494bde191c2cb9dd4f4549827816b9275, under the LFM Open License v1.0. SeeLICENSES/LFM-Open-1.0.txt.qwen38.jinjaandqwen38-tokenizer_config.jsoncome from TensorFold/Qwen3.8-27B-MLX-4bit at revision70ae7fac63274ff2eac54152031433374cb80f2f(an MLX conversion of Qwen/Qwen3.8-27B, whose template it carries), under the Apache License 2.0. SeeLICENSES/Apache-2.0.txt.
Unlimited-OCR-2
The unlimited-ocr family (zig/src/families/uocr/ and its kernels) follows these parts of the Python code that ships
with baidu/Unlimited-OCR-2 at revision
0480966938291445591f69f08a13b041c073a96a, the release's own files:
modeling_unlimitedocr.py: the page guard (_uocr_page_count_guard), gundam's tiles (dynamic_preprocess,find_closest_aspect_ratio), the views' token layout and the prompt (_uocr_build_inputs,infer), whichgenerate.zig,preprocess.zig,prompt.zigandchat_template.jinjarepeat;deepencoder.py, its CLIP section only (CLIPVisionEmbeddings,NoTPTransformer,VitModel,quick_gelu,get_abs_pos; the release's own code, citing no library there): the class row, the position table resized to a tile, the pre-norm,quick_gelu's 1.702 and the layer order, whichvision.zig's CLIP steps repeat;dash_attention.pyandmodeling_deepseekv2.py: the DASH router (block keys, page-aware candidates, top 16, entmax-1.5).
The release ships no LICENSE file; its model card states license: mit, and these notices carry that licence's text
("MIT License text" above). The SAM encoder, the decoder's attention, its page2d rotary and its MoE gate follow none of
the release's code: they are written from the papers and from the release's modules measured through their inputs and
outputs. resize.zig follows no code either: it is the antialiased bicubic the release asks of torch
(F.interpolate(mode="bicubic", antialias=True, align_corners=False), Keys' cubic with a = -0.5, taps spread by the
scale and normalised) for the position tables, written to that operator's definition, with its fp32 rounding order fixed
by measuring torch's output on the release's tables bit for bit.
TensorFold ships none of these files and no Unlimited-OCR-2 weights; tools/zig/uocr_reference.py runs the release's
own code as the reference.
Indian-script tokenizer fixture
INDIC in tools/zig/tokenizer_parity.py holds one sentence of
IN22-Gen (AI4Bharat) in its 22 languages, unchanged, under
CC BY 4.0. It is tokenizer test input only. The composition exclusions
and ZWJ/ZWNJ conjuncts after it are TensorFold's own.
Inkling 2 Small test fixtures
zig/src/families/inkling2/fixtures/ holds files and values taken from Thinking Machines' Inkling 2 Small release at
revision 2ad1157016e1aac77b6ff1b770e7c05229403134, under the Apache License 2.0 stated on its model card (see
the license text): config.json, chat_template.jinja, mini_tokenizer.json (its
tokenizer.json cut to the added tokens, the byte alphabet and the first 1,500 merges) and the prompts and ids in
prompt_cases.json and mini_cases.json, which the Hugging Face transformers and tokenizers libraries produced from
those files. tiny_config.json and the tensor tables
tiny_model_header.txt and tiny_mtp_header.txt describe tiny-random/inkling-2 at revision
0a57c72e4e5b68aafe1d983dbb62980344a5fcd7, a randomly initialised model whose model card names that release as its base
model and states no licence; no weights are included. tools/zig/inkling2_fixtures.py rebuilds all of these files.
Inkling 2 Mini fixtures and loop references
mini_config.json, mini_model_header.txt and mini_mtp_header.txt in
zig/src/families/inkling2/fixtures/ come from the 2026-11-20 published snapshot of
thinkingmachines/Inkling-2-Mini at ed40e7da625f594fc9c4990f5f66be24873c22d7, under the Apache License 2.0
stated on its model card (see the license text). The public model API supplied that full revision and last-modified time 2026-11-20T22:55:20Z. The fixture config differs from the supplied published config.json only by its explicit _fixture_provenance annotation; after excluding that annotation, every checkpoint config field matches. The folded tables contain only metadata from the model and MTP safetensors
headers, no tensor data or weights. tools/zig/inkling2_fixtures.py rebuilds all three from the Mini release, or from its
extracted headers, with the same revision annotation. No revision was derived from fixture digests.
release_chat_template.jinja and release_tokenizer_config.json in the same folder are byte-identical copies of that
revision's chat_template.jinja and tokenizer_config.json, under the same license.
tiny_mini_config.json and the tensor table tiny_mini_model_header.txt in the same folder describe
hf-internal-testing/tiny-inkling2-mini at revision ee242a48af34ff0729518f4ac28cfcb847e470ab, the tiny checkpoint
that docs/design/inkling-2-mini.md names for same-engine exactness; its model card states no licence. The config is a
byte-identical copy and the table holds only metadata from the model.safetensors header, no tensor data or weights.
tools/zig/inkling2_fixtures.py rebuilds both, from that file or its extracted model.header.json.
The Mini loop host/reference implementations in zig/src/families/inkling2/loop.zig, loop_model.zig, loop_engine.zig,
loop_math_cuda.zig, the CUDA and Metal loop kernels and the stored-expert implementations in modelopt.zig and
zig/kernels/cuda/inkling2/modelopt.cu are independent TensorFold implementations of the supplied math-only Mini
specification. Its primary reference is huggingface/transformers PR #51050 at head 6173a2f6: the Mini configuration and
forward pass in models/inkling2_loop/modular_inkling2_loop.py and modeling_inkling2_loop.py, with the temporary
NVFP4/MXFP8 expert dequantization in core_model_loading.py and the checkpoint mappings in conversion_mapping.py.
ModelOpt here names the checkpoint format and that Transformers arithmetic; no NVIDIA Model Optimizer source was used or
vendored. The specification also records Neywa-Labs/mlx-vlm at fd6404fb as its second reading of the loop and DSpark
implementation (mlx_vlm/models/inkling2/ and mlx_vlm/speculative/drafters/inkling2_dspark/). Transformers is Apache-2.0;
mlx-vlm is MIT (see LICENSES/MIT.txt). No reference source code is vendored. The supplied materials
give only these two abbreviated reference heads, not their full commit SHAs.
Inkling 2 attention kernels
zig/kernels/cuda/inkling2/attention.cu, zig/kernels/cuda/inkling2/prompt_attention.cu and
zig/src/families/inkling2/kernels.zig compute the attention of Hugging Face transformers'
src/transformers/models/inkling2/modeling_inkling2.py at commit 109a7d19bf66
(huggingface/transformers, Apache-2.0). The query and key L2 clips come
from Inkling2L2Clip and Inkling2ScaledL2Clip, the relative-position logits from Inkling2RelativeLogits, and the
sinks and sigmoid output gate from Inkling2SlidingAttention and Inkling2FullAttention. The kernels, their chunked
layout and their rounding points are TensorFold's own.
Inkling 2 glue kernels
zig/kernels/cuda/inkling2/ops.cu, zig/kernels/cuda/inkling2/rows.cu and zig/src/families/inkling2/ops.zig compute
these layers of Hugging Face transformers' src/transformers/models/inkling2/modeling_inkling2.py at commit
109a7d19bf66 (huggingface/transformers, Apache-2.0):
Inkling2NormedEmbedding, Inkling2BlockAttentionResidual, Inkling2ShortConvolution,
Inkling2DynamicShortConvolution, Inkling2TopKRouter, Inkling2SoftcappedSwiGLU and Inkling2Softcap. The kernels
are TensorFold's own.
Inkling 2 expert and vision kernels
zig/kernels/cuda/inkling2/experts.cu and zig/src/families/inkling2/experts.zig run Inkling2Experts from Hugging
Face transformers' src/transformers/models/inkling2/modeling_inkling2.py at commit 109a7d19bf66
(huggingface/transformers, Apache-2.0) on main's EXL3 grouped-expert
arithmetic. zig/kernels/cuda/inkling2/vision.cu and zig/src/families/inkling2/vision.zig compute the same file's
vision tower: Inkling2VisionEmbeddings, Inkling2VisionRotaryEmbedding, Inkling2VisionAttention,
Inkling2VisionMLP and Inkling2VisionMerger. zig/src/families/inkling2/image.zig follows Inkling2ImageProcessor
in image_processing_inkling2.py at the same commit for its 40-pixel patches and the tower's input tables.
Hy4-flash NVFP4 tensor table and build scripts
zig/src/families/hy4_flash/nvfp4_header.txt lists names, types and shapes from the safetensors headers of the NVFP4
build atakans/Hy4-flash-NVFP4 at revision
30f201acf0b4f9ba178817bcbc04ccfa3ec473f9, made from Tencent's Hy4-flash release
(tencent/Hy4-flash at revision d88c9dfd96ba4f2e6b92adba0b8e8f1c8696f959)
under the Tencent Hy License 1.0 (see the license text); no weights are included.
tools/hy4_flash/nvfp4.py and tools/hy4_flash/engram_fp8.py rebuild that checkpoint (docs/receipts/hy4-flash-nvfp4/).
ERNIE 5.5 pre-tokenizer fixture
zig/src/core/tokenizer/fixtures/onig_anchors.json holds the pre-tokenizer steps of the tokenizer.json in Baidu's
baidu/ERNIE-5.5-Flash-Preview at revision
ace1100dcde7bf4eb06add6ae11ce4f43a11ddfe (all but its last, ByteLevel), under the Apache License 2.0 stated on its
model card (see the license text), and the pieces the Hugging Face tokenizers library splits
with them and with a few other patterns. tools/zig/onig_anchor_fixtures.py rebuilds the file.
ERNIE 5.5 test fixtures and chat encoding
zig/src/families/ernie5_5/fixtures/ holds files and values taken from Baidu's
baidu/ERNIE-5.5-Flash-Preview at revision
ace1100dcde7bf4eb06add6ae11ce4f43a11ddfe, under the Apache License 2.0 stated on its model card (see
the license text): config.json, a byte-identical copy; mini_tokenizer.json, its
tokenizer.json cut to added tokens 0 to 20, the byte alphabet and the first 1,500 merges; release_header.txt, the
names, dtypes and shapes in its 128 model shards' safetensors headers, with no weights; and the prompts, spans and ids
in prompt_cases.json and mini_cases.json, which the release's encoding_ernie.py and tokenization_ernie.py
produced through the Hugging Face transformers and tokenizers libraries. zig/src/families/ernie5_5/prompt.zig writes
the text part of that chat encoding in TensorFold's own code, written after reading encoding_ernie.py and checked
against those outputs; no source is copied. tools/zig/ernie5_5_fixtures.py rebuilds all of these files.
Inkling 2 DSpark drafter kernels
zig/kernels/cuda/inkling2/dspark.cu, zig/kernels/cuda/inkling2/dspark_many.cuh and
zig/src/families/inkling2/dspark_ops.zig compute the drafter in
vllm/models/inkling2/nvidia/dspark.py at commit abb8194dc35e of
vllm-project/vllm (Apache-2.0): the tap mix and its RMS norm in
Inkling2DSparkDecoder.mix, Inkling2DraftSelfAttention, Inkling2DraftMLP and the recurrent Inkling2MarkovHead.
The drafter's weights ship in Thinking Machines' Inkling 2 Small release under Apache-2.0. The kernels are TensorFold's
own.
GigaChat 4 test fixtures
zig/src/families/gigachat4/fixtures/config_708b.json is a byte-identical copy of the config.json of
ai-sage/GigaChat4-708B-A41B at revision
2baf8b0cf71f1528c14e7a274877d9c8fbf22697, MIT License, Copyright (c) 2026 Giga (see
the license text); header_708b_fp8.txt lists the names, dtypes and shapes in that
release's 45 model shards' safetensors headers.
TensorFold ships no GigaChat 4 37B weights or files. tools/zig/gigachat4_fixtures.py fetches their headers to a
local folder outside the repository for the gated tests. Users obtain the checkpoint and accept its
Noncommercial License for individuals 1.0
themselves: FP8 release,
BF16 release. TensorFold's Apache-2.0 licence does not
change those terms. The 37B tests read only user-supplied local config and header files.