Skip to page content
SAVRN
Search Plan a project

Open-weight model · Feature extraction

ToarimEmbedder

by Manuel Antonio Camacho Reyes ManyCamDS/ToarimEmbedder

ToarimEmbedder is an open-weight model for feature extraction from Manuel Antonio Camacho Reyes, released under Apache License 2.0. It has 24M parameters. At 16-bit it needs about 0.1 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

TóarimEmbedder es una arquitectura algorítmica de embeddings con estado (stateful) diseñada específicamente para resolver la amnesia contextual y la pérdida de continuidad en sistemas de Recuperación Aumentada por Generación (RAG) aplicados a corpus técnicos…

Parameters24M
Context—
Weights97.2 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve ToarimEmbedder (24M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.0 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 18, 2026.

ToarimEmbedder on every accelerator the SAVRN Index prices, at every precision

Model Card

By Manuel Antonio Camacho Reyes, published under apache-2.0, revision fe48849cbbd0.

TóarimEmbedder es una arquitectura algorítmica de embeddings con estado (stateful) diseñada específicamente para resolver la amnesia contextual y la pérdida de continuidad en sistemas de Recuperación Aumentada por Generación (RAG) aplicados a corpus técnicos extensos y altamente regulados (manuales de maquinaria pesada, compendios normativos, bitácoras operativas y expedientes legales). A diferencia de los modelos basados en Transformers convencionales con atención densa cuadrática $O(n^2)$, TóarimEmbedder opera con complejidad lineal $O(n)$ en procesadores convencionales (CPU), permitiendo a las organizaciones indexar internamente su propiedad intelectual de forma ágil, blindando sus…

Read Manuel Antonio Camacho Reyes's full model card

TóarimEmbedder: Motor de Embeddings Continuos con Estado para RAG Industrial

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Python](https://img.shields.io/badge/Python-3.12%2B-brightgreen.svg)](https://www.python.org/) [![Hardware](https://img.shields.io/badge/Hardware-Exclusively_CPU-orange.svg)](#requisitos-de-hardware-y-despliegue-en-cpu) [![Format](https://img.shields.io/badge/Format-Safetensors-blueviolet.svg)](#seguridad-y-soberania-de-datos) [![Air-Gapped](https://img.shields.io/badge/Air--Gapped-100%25_Offline-success.svg)](#soporte-nativo-air-gapped-redes-aisladas)

TóarimEmbedder es una arquitectura algorítmica de embeddings con estado (stateful) diseñada específicamente para resolver la amnesia contextual y la pérdida de continuidad en sistemas de Recuperación Aumentada por Generación (RAG) aplicados a corpus técnicos extensos y altamente regulados (manuales de maquinaria pesada, compendios normativos, bitácoras operativas y expedientes legales).

A diferencia de los modelos basados en Transformers convencionales con atención densa cuadrática $O(n^2)$, TóarimEmbedder opera con complejidad lineal $O(n)$ en procesadores convencionales (CPU), permitiendo a las organizaciones indexar internamente su propiedad intelectual de forma ágil, blindando sus secretos comerciales y abatiendo los costos de infraestructura hasta en un 70.6%.


El Desafío en Sectores Industriales y Regulados

En entornos industriales complejos, los expedientes técnicos presentan una elevada interdependencia secuencial y superan fácilmente decenas de miles de tokens. Las premisas de diseño o advertencias de seguridad suelen formularse en los capítulos iniciales, mientras que las secuencias de mitigación ante emergencias o excepciones operativas se detallan cientos de páginas después.

Las implementaciones RAG tradicionales fracasan en este escenario: 1. Amnesia por Fragmentación Estática (Chunking): Al cortar los textos en bloques atómicos de 256 a 512 tokens sin estado dinámico, se destruye la continuidad sintáctica y la correferencia anafórica de largo alcance. 2. Fenómeno Lost in the Middle: Los motores de búsqueda semántica ignoran activamente información crucial situada en regiones intermedias del documento. 3. Colapso en Razonamiento de Múltiples Saltos (Multi-hop Reasoning): Los fragmentos recuperados carecen de la inercia semántica que vincula los parámetros de origen con las acciones correctivas, elevando riesgos de no conformidad en auditorías o accidentes operativos.


La Solución Tóarim: Aprendizaje Anidado y Memoria Continua

TóarimEmbedder sustituye los pesados cálculos matriciales por formulaciones algebraicas lineales que integran tres núcleos algorítmicos:

flowchart TD
    A["Texto Documental (Secuencia de Chunks)"] --> B["Tokenizador WordPiece Rust (Local, ~711 KB)"]
    B --> C["Base Embeddings (dim: 768)"]
    C --> D["DocumentGraphEnricher: Convolución GNN O(L)"]
    D --> E["TitanMemoryLayer: Bucle HOPE con Sherman-Morrison"]
    C -. "Conexión Residual" .-> F["Residual Sum + LayerNorm"]
    E --> F
    F --> G["Mean Pooling Vectorial"]
    G --> H["Normalización Esférica L2"]
    H --> I["Vector Unitario (768 dimensiones)"]
    E -. "Estado M_t persistente" .-> E
  1. Enriquecimiento Estructural $O(L)$ (DocumentGraphEnricher): Aplica una convolución de grafos (GCN) con normalización espectral tridiagonal que modela dependencias topológicas locales inmediatas sin requerir matrices densas $O(L^2)$.
  2. Compresión Latente SVD (LowRankLinear): Descompone las proyecciones en factores de bajo rango ($W \approx U \cdot V$), reduciendo la complejidad paramétrica a $O(d \cdot k)$.
  3. Memoria Continua Titan (TitanMemoryLayer): Bucle de Nested Learning con una matriz de memoria interna $M \in \mathbb{R}^{k \times k}$. La actualización de rango 1 se estabiliza mediante el Lema de Sherman-Morrison: $$\text{factor} = \frac{\eta_t}{1 + \eta_t |k_t|^2}$$ $$M_t = \alpha_t M_{t-1} + \text{factor} \cdot (e_t \otimes k_t^T)$$ Esto desacopla la memoria contextual del tamaño del documento: la memoria es plana y constante, independientemente de si el documento contiene 500 o 500,000 tokens.

Tabla Comparativa de Rendimiento y Costes

Resultados obtenidos en pruebas empíricas sobre documentos normativos extensos (+500 páginas):

Métrica / Dimensión TóarimEmbedder (Local) OpenAI text-emb-3-large Cohere embed-v3.0 BGE-M3 (BAAI)
Complejidad Asintótica $O(n)$ Lineal $O(n^2)$ Cuadrática $O(n^2)$ Cuadrática $O(n^2)$ Cuadrática
Límite de Contexto Teóricamente $\infty$ (Stateful) 8,191 tokens 512 tokens 8,192 tokens
Hardware Requerido CPU Convencional API en la Nube API en la Nube GPU Dedicada (>5.5 GB VRAM)
Consumo de VRAM 0 MB (Libre de GPU) N/A (Propietario) N/A (Propietario) 5,500+ MB VRAM
RAM Incremental ~101.8 MB N/A N/A ~2,500 MB
TCO (500M Tokens) ~$22.22 USD (VPS CPU) ~$65.00 USD Facturación por llamada Coste mensual GPU cloud ($$$)
Privacidad / Soberanía 100% On-Premise Local Terceros (Nube pública) Terceros (Nube pública) On-Premise (Requiere GPU)

Inicio Rápido (Quickstart)

Instalación de Dependencias

pip install torch tokenizers safetensors numpy
# O utilizando UV:
uv add torch tokenizers safetensors numpy

1. Ingesta Continua con Inercia Semántica (Python Nativo)

from toarim_embedder import TóarimEmbedder

# Inicialización segura (carga automática de safetensors y tokenizador local)
embedder = TóarimEmbedder()

# Chunks secuenciales de un manual técnico
chunks_manual = [
    "Capítulo 1: Especificaciones de diseño y límites de presión en calderas de vapor...",
    "Capítulo 2: Configuración del circuito cerrado de refrigeración secundaria...",
    "Capítulo 18: Procedimiento de actuación ante fallo por sobrepresión crítica..."
]

# maintain_state=True arrastra la memoria Titan M_t a lo largo del documento
embeddings_documento = embedder.embed_documents(chunks_manual, maintain_state=True)
print(f"Chunks procesados: {len(embeddings_documento)} (Dimensión: {len(embeddings_documento[0])})")

# Consulta de búsqueda (Siempre opera en modo STATELESS para evitar sesgos)
query = "¿Cuál es el protocolo ante sobrepresión en la caldera?"
query_embedding = embedder.embed_query(query)

Integraciones con Frameworks RAG

Integración con LangChain y ChromaDB

from langchain_community.vectorstores import Chroma
from toarim_embedder import TóarimEmbedder

toarim = TóarimEmbedder()

# Ingesta en base de datos vectorial local
vectorstore = Chroma.from_texts(
    texts=chunks_manual,
    embedding=toarim,
    persist_directory="./chroma_db_industrial"
)

# Recuperación semántica contextualizada
resultados = vectorstore.similarity_search("fallo en refrigeración secundaria", k=3)
for doc in resultados:
    print(f"Contenido recuperado: {doc.page_content[:120]}...")

Integración con LlamaIndex

from llama_index.core.embeddings import BaseEmbedding
from toarim_embedder import TóarimEmbedder

class ToarimLlamaIndexEmbedding(BaseEmbedding):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self._model = TóarimEmbedder()

    def _get_query_embedding(self, query: str):
        return self._model.embed_query(query)

    def _get_text_embedding(self, text: str):
        return self._model.embed_query(text)

    def _get_text_embeddings(self, texts: list[str]):
        return self._model.embed_documents(texts, maintain_state=True)

Ciberseguridad y Soberanía Tecnológica

TóarimEmbedder ha sido diseñado bajo estándares estrictos de ciberseguridad industrial:

  1. Serialización Segura con safetensors: Se elimina por completo el uso de pickle / torch.load desprotegido, erradicando la vulnerabilidad de Ejecución Remota de Código (RCE).
  2. Soporte Nativo Air-Gapped (Redes Aisladas): Incorpora el archivo compilado tokenizer.json (711 KB, motor Rust), permitiendo inicializaciones y ejecuciones en infraestructuras SCADA o plantas sin conexión a Internet (local_files_only=True).
  3. Higienización de Memoria Multi-Inquilino (reset_state()): Para evitar la fuga de información confidencial entre diferentes manuales o clientes (Cross-Tenant State Leakage), el orquestador puede purgar el estado residual: python embedder.reset_state() # Limpia de inmediato la memoria Titan M
  4. Protección contra Denegación de Servicio (DoS): Sanitización y validación estricta de entradas y acotamiento de longitud de secuencias.

Aceleración en CPU y Cuantización INT8

Para estaciones de trabajo o servidores con procesadores estándar (Intel Core / Xeon, AMD Ryzen / EPYC):

embedder = TóarimEmbedder()

# Aceleración mediante Cuantización Dinámica INT8 (AVX-512 VNNI / AMX)
embedder.quantize()

# Reduce la huella en memoria en ~50% (~47 MB) y duplica el rendimiento por núcleo
vector = embedder.embed_query("Verificación de válvulas")

Requisitos de Hardware y Despliegue en CPU

  • Procesador: Cualquier CPU moderna x86_64 o ARM64 (Intel 10ª gen+, AMD Zen 2+, Apple Silicon, AWS Graviton).
  • Memoria RAM: Mínimo 512 MB de RAM disponibles (~100 MB ocupados por el modelo).
  • Almacenamiento: ~100 MB para pesos (model.safetensors) y tokenizador (tokenizer.json).
  • Aceleradores: No requiere GPU (0 MB de VRAM).

Licencia

Este proyecto está distribuido bajo la licencia Apache 2.0. Consulte el archivo de licencia para obtener más detalles.

Configuration

Architecture
TóarimEmbeddingModel
Vocabulary size
30,522
Model type
toarim

Identity and Version

Repository
ManyCamDS/ToarimEmbedder
Publisher
Manuel Antonio Camacho Reyes
Task
Feature extraction
Modality
Text
Library
transformers
Parameters
24M parameters
Languages
es, en
Revision
fe48849cbbd097dfd9eae3ba63ef9762820aefd7
First published
2026-10-16
Last updated
2026-10-16

Files and Weights

6 files, 98.0 MB in total. The weights are 1 file totalling 97.2 MB in safetensors.

Weights1 file · 97.2 MB
Configuration2 files · 23.0 KB
Tokenizer1 file · 711.4 KB
Documentation1 file · 10.3 KB
Repository1 file · 133 B
Every file
FileTypeSizeSHA-256
model.safetensorsWeights97.2 MB b08b418ad294
config.jsonConfiguration241 B —
toarim_embedder.pyConfiguration22.8 KB —
README.mdDocumentation10.3 KB —
.gitattributesRepository133 B —
tokenizer.jsonTokenizer711.4 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
97.2 MB
Download from Manuel Antonio Camacho Reyes

Released by Manuel Antonio Camacho Reyes through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published97.2 MB
16-bit0.0 GB
8-bit0.0 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About ToarimEmbedder

How much GPU memory does ToarimEmbedder need?

About 0.1 GB at 16-bit and 0 GB at 4-bit: the weights (24M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run ToarimEmbedder on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use ToarimEmbedder commercially?

Yes. ToarimEmbedder is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Feature extraction

jano-tts

Jano

This is the model card of a transformers model that has been pushed on the Hub. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Use the code below to get started with the model. Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

Open weights 25M parameters transformers

More details please refer to our Github: FlagEmbedding. FlagEmbedding can map any text to a low-dimensional dense vector which can be used for tasks like retrieval, classification, clustering, or semantic search. And it also can be used in vector databases for LLMs. Updates - 10/12/2023: Release LLM-Embedder, a unified embedding model to support diverse retrieval augmentation needs for LLMs. Paper:fire: - 09/15/2023: The technical report of BGE has been released - 09/15/2023: The masive training data of BGE has been released - 09/12/2023: New models: - 09/07/2023: Update fine-tune code: Add script to mine hard negatives and support adding instruction during fine-tuning. - 08/09/2023: BGE…

Open weights mit 24M parameters 512 tokens transformers

Model · Feature extraction

Corpus-ViT

Gugu8

A vision encoder with a runtime-selectable token budget, built to sit between an image and an LLM. A coarse 32px grid covers the whole image; a router spends extra 16px detail only on the regions that need it. Output length is 49 + 3k tokens — 49 at k=0, 121 at k=24 — so you choose the tokens/fidelity trade-off per image, at inference, with no retraining. 24.94M parameters. Trained in 6000 steps (~30 min) on 2× Kaggle T4 by distillation from google/siglip-base-patch16-224 (86M). This is a working, honest baseline, not a competitive encoder. On the Flickr30k official test split it reaches 8.95 mean R@1 against the teacher's 83.25 — roughly 10% of its teacher. Chance on 1000 images is 0.10.…

Open weights apache-2.0 25M parameters transformers

Model · Feature extraction

starwell

Charles Norton

Starwell is a generative model for stellarator design. Given a number of field periods, an aspect ratio and a target magnetic-gradient scale length LgradB, it samples a plasma boundary for the mhdstable problem of the ConStellaration benchmark, predicts its benchmark metrics, and lays out modular coils for it. Boundaries are SurfaceRZFourier dicts (rcos, zsin) that constellaration evaluates directly; sample also takes tau, guidance, steps and seed, and model.config.sampling holds the integrator's defaults. Coils are simsopt CurveXYZFourier coefficients for one half period with their currents, and simsopt.field.coilsviasymmetries builds the full set; limits (in metres and per metre) sets the…

Open weights mit 26M parameters transformers

Model · Feature extraction

jina-embeddings-v2-small-en

Jina AI

The easiest way to starting using jina-embeddings-v2-small-en is to use Jina AI's Embedding API. jina-embeddings-v2-small-en is an English, monolingual embedding model supporting 8192 sequence length. It is based on a BERT architecture (JinaBERT) that supports the symmetric bidirectional variant of ALiBi to allow longer sequence length. The backbone jina-bert-v2-small-en is pretrained on the C4 dataset. The model is further trained on Jina AI's collection of more than 400 millions of sentence pairs and hard negatives. These pairs were obtained from various domains and were carefully selected through a thorough cleaning process. The embedding model was trained using 512 sequence length, but…

Open weights apache-2.0 33M parameters 8,192 tokens sentence-transformers

More details please refer to our Github: FlagEmbedding. If you are looking for a model that supports more languages, longer texts, and other retrieval methods, you can try using bge-m3. FlagEmbedding focuses on retrieval-augmented LLMs, consisting of the following projects currently: - 1/30/2024: Release BGE-M3, a new member to BGE model series! M3 stands for Multi-linguality (100+ languages), Multi-granularities (input length up to 8192), Multi-Functionality (unification of dense, lexical, multi-vec/colbert retrieval). It is the first embedding model which supports all three retrieval methods, achieving new SOTA on multi-lingual (MIRACL) and cross-lingual (MKQA) benchmarks. Technical…

Open weights mit 33M parameters 512 tokens sentence-transformers