Downloads · 30 days
128
39% of all-time downloads
duanxianpi/IntelliTex
IntelliTex is a text generation model from duanxianpi. Use it when you need the model to write or continue text. The card lists the license as mit.
IntelliTeX is an experimental Small Language Model (SLM) study for converting English, spoken-style math descriptions into a single LaTeX equation. It is intended as a research artifact (training regimes, decoding con…
Downloads · 30 days
128
39% of all-time downloads
All-time downloads
331
Public
Parameters
223M
892 MB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors892 MB · 100%
From the Hugging Face model README
IntelliTeX is an experimental Small Language Model (SLM) study for converting English, spoken-style math descriptions into a single LaTeX equation. It is intended as a research artifact (training regimes, decoding constraints, stress tests), not a production-ready LaTeX authoring system.
Salesforce/codet5p-220m (CodeT5+ 220M)Intended use
Not recommended
We evaluated multiple training configurations to understand what improves a compact model most:
Main benchmark (Speech2LaTeX test set)
Stress tests (MathBridge subsets)
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "duanxianpi/IntelliTeX"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
text = "the integral from zero to one of x squared dx"
prompt = f"Convert natural-language math into a STRICT LaTeX equation\n{text}"
inputs = tok(prompt, return_tensors="pt")
out = model.generate(
**inputs,
max_length=512,
)
print(tok.decode(out[0], skip_special_tokens=True))
# Ouput: $$\int_{0}^{1}x^{2}\,dx$$
A live, in-browser demonstration using the transformer.js library showcases this efficiency advantage on typical CPU hardware.
| Model | |
|---|---|
| IntelliTeX | ![]() |
| Qwen2.5-Coder-0.5B-Instruct | ![]() |
| Model Architecture | Method | EM ↑ | CR ↑ | CER ↓ | TexBLEU ↑ |
|---|---|---|---|---|---|
| SmolLM2 (135M) | Base | 0.005 | 0.790 | 42.40 | 0.743 |
| Base + Grammar | 0.011 | 0.822 | 7.90 | 0.279 | |
| LoRA | 0.126 | 0.957 | 0.90 | 0.823 | |
| LoRA + Grammar | 0.127 | 0.957 | 0.91 | 0.824 | |
| SmolLM2 (360M) | Base | 0.107 | 0.695 | 9.38 | 0.802 |
| Base + Grammar | 0.142 | 0.760 | 10.00 | 0.812 | |
| LoRA | 0.242 | 0.980 | 0.49 | 0.861 | |
| LoRA + Grammar | 0.243 | 0.980 | 0.49 | 0.862 | |
| CodeT5+ (220M) | Base | 0.000 | 0.921 | 96.01 | 0.725 |
| LoRA | 0.258 | 0.913 | 0.39 | 0.874 | |
| FPFT | 0.467 | 0.982 | 0.22 | 0.912 | |
| Stage 1 + FPFT (IntelliTeX) | 0.463 | 0.998 | 0.22 | 0.915 | |
| Qwen2.5-Coder (0.5B) | Base | 0.161 | 0.974 | 1.27 | 0.830 |
| Base + Grammar | 0.160 | 0.978 | 1.27 | 0.831 | |
| LoRA | 0.155 | 0.909 | 2.71 | 0.836 | |
| LoRA + Grammar | 0.155 | 0.967 | 1.75 | 0.838 | |
| FPFT | 0.405 | 0.990 | 0.24 | 0.902 | |
| Qwen2.5-Coder (3B) | Base | 0.294 | 0.991 | 0.46 | 0.869 |
| Base + Grammar | 0.293 | 0.996 | 0.45 | 0.870 | |
| FPFT | 0.507 | 0.997 | 0.18 | 0.919 | |
| Qwen2.5-Coder (32B) | Base | 0.121 | 1.000 | 0.38 | 0.863 |
Note: EM = Exact Match, CR = Compilable Rate, CER = Character Error Rate. Base = Original Instruct Model, Grammar = Structured Decoding, Stage 1 = Domain-Adaptive Pre-training.
Performance on Long Context Inputs (Source > 115 chars)
Demonstrates the model's ability to understand lengthy natural language descriptions.
| Model (FPFT) | EM ↑ | CR ↑ | CER ↓ | TexBLEU ↑ |
|---|---|---|---|---|
| CodeT5+ (220M) | 0.150 | 0.967 | 0.219 | 0.868 |
| IntelliTeX (Stage 1 + FPFT) | 0.195 | 0.997 | 0.211 | 0.873 |
| Qwen2.5-Coder (0.5B) | 0.129 | 0.976 | 0.292 | 0.859 |
| Qwen2.5-Coder (3B) | 0.209 | 0.996 | 0.199 | 0.874 |
Performance on Long Sequence Generation (Target > 60 chars)
Demonstrates the model's ability to generate complex, long LaTeX formulas.
| Model (FPFT) | EM ↑ | CR ↑ | CER ↓ | TexBLEU ↑ |
|---|---|---|---|---|
| CodeT5+ (220M) | 0.049 | 0.940 | 0.297 | 0.827 |
| IntelliTeX (Stage 1 + FPFT) | 0.076 | 0.991 | 0.312 | 0.828 |
| Qwen2.5-Coder (0.5B) | 0.037 | 0.967 | 0.394 | 0.816 |
| Qwen2.5-Coder (3B) | 0.070 | 0.988 | 0.350 | 0.822 |