Text Generation
Transformers
Safetensors
llama
next-concept-prediction
conceptlm
causal-lm
smollm2
tessera
text-generation-inference
Instructions to use yava-code/Tessera-1B-Nano-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yava-code/Tessera-1B-Nano-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yava-code/Tessera-1B-Nano-Base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yava-code/Tessera-1B-Nano-Base") model = AutoModelForCausalLM.from_pretrained("yava-code/Tessera-1B-Nano-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yava-code/Tessera-1B-Nano-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yava-code/Tessera-1B-Nano-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yava-code/Tessera-1B-Nano-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yava-code/Tessera-1B-Nano-Base
- SGLang
How to use yava-code/Tessera-1B-Nano-Base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "yava-code/Tessera-1B-Nano-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yava-code/Tessera-1B-Nano-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "yava-code/Tessera-1B-Nano-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yava-code/Tessera-1B-Nano-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yava-code/Tessera-1B-Nano-Base with Docker Model Runner:
docker model run hf.co/yava-code/Tessera-1B-Nano-Base
Fix loading snippet in model card
Browse files
README.md
CHANGED
|
@@ -1,76 +1,76 @@
|
|
| 1 |
-
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
pipeline_tag: text-generation
|
| 4 |
-
base_model: HuggingFaceTB/SmolLM2-360M
|
| 5 |
-
tags:
|
| 6 |
-
- next-concept-prediction
|
| 7 |
-
- conceptlm
|
| 8 |
-
- causal-lm
|
| 9 |
-
- smollm2
|
| 10 |
-
- tessera
|
| 11 |
-
license: apache-2.0
|
| 12 |
-
---
|
| 13 |
-
|
| 14 |
-
# Tessera-1B-Nano-Base
|
| 15 |
-
|
| 16 |
-
The matched NTP-only baseline of the Tessera-1B-Nano comparison from Paragon
|
| 17 |
-
Intelligence Labs: the unchanged `HuggingFaceTB/SmolLM2-360M` backbone,
|
| 18 |
-
continued-pretrained without a concept path. It exists so the concept-arm result
|
| 19 |
-
is interpretable.
|
| 20 |
-
|
| 21 |
-
## TL;DR
|
| 22 |
-
|
| 23 |
-
This arm is the control of a token-matched comparison: it consumed the same
|
| 24 |
-
tokens of the same packed corpus, in the same order, from the same
|
| 25 |
-
initialization as the concept arm, with no restarts and no NaNs.
|
| 26 |
-
|
| 27 |
-
- **Token loss is the reference**: the final numbers below are the baseline the
|
| 28 |
-
concept arm is compared against.
|
| 29 |
-
- The comparison outcome and the intervention readings live in the whitepaper at
|
| 30 |
-
`docs/whitepaper.md` in the ncp-smol repository.
|
| 31 |
-
|
| 32 |
-
## Evaluation
|
| 33 |
-
|
| 34 |
-
| Metric | Value |
|
| 35 |
-
| --- | ---: |
|
| 36 |
-
| Held-out NTP loss | 2.5135 |
|
| 37 |
-
| Held-out perplexity | 12.3485 |
|
| 38 |
-
| Training tokens | 999,948,288 |
|
| 39 |
-
| Tracked compute estimate | $24.88 |
|
| 40 |
-
|
| 41 |
-
Intervention deltas are increases in held-out NTP loss relative to normal predicted concept
|
| 42 |
-
feedback, evaluated on identical batches.
|
| 43 |
-
|
| 44 |
-
## Architecture
|
| 45 |
-
|
| 46 |
-
- chunk size: 4
|
| 47 |
-
- product code: 15 segments x 64 entries
|
| 48 |
-
- causal concept blocks: 2
|
| 49 |
-
- injection point: before token decoder block 2
|
| 50 |
-
- NCP target: next continuous concept
|
| 51 |
-
- loss: `L_ntp + 1 L_ncp + 1 L_vq`
|
| 52 |
-
|
| 53 |
-
This is a compact ConceptLM-style implementation, not an 8.9B NCP-ArchPreview replica. It
|
| 54 |
-
omits iterative residual coding, cross-scale residual connections, and the large-scale
|
| 55 |
-
training recipe.
|
| 56 |
-
|
| 57 |
-
## Training data and provenance
|
| 58 |
-
|
| 59 |
-
The matched corpus and the training record are pinned in the ncp-smol repository:
|
| 60 |
-
packed-cache SHA256 hashes, the complete metric log, trainer state, and the raw
|
| 61 |
-
intervention evaluation JSON (also shipped in this repository as `eval.json` and
|
| 62 |
-
`metrics.jsonl`).
|
| 63 |
-
|
| 64 |
-
## Loading
|
| 65 |
-
|
| 66 |
-
```python
|
| 67 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 68 |
-
|
| 69 |
-
tokenizer = AutoTokenizer.from_pretrained("yava-code/Tessera-1B-Nano-Base")
|
| 70 |
-
model = AutoModelForCausalLM.from_pretrained("yava-code/Tessera-1B-Nano-Base")
|
| 71 |
-
```
|
| 72 |
-
|
| 73 |
-
## References
|
| 74 |
-
|
| 75 |
-
- ConceptLM: https://arxiv.org/abs/2602.08984
|
| 76 |
-
- NCP-ArchPreview: https://arxiv.org/abs/2609.10715
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
base_model: HuggingFaceTB/SmolLM2-360M
|
| 5 |
+
tags:
|
| 6 |
+
- next-concept-prediction
|
| 7 |
+
- conceptlm
|
| 8 |
+
- causal-lm
|
| 9 |
+
- smollm2
|
| 10 |
+
- tessera
|
| 11 |
+
license: apache-2.0
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Tessera-1B-Nano-Base
|
| 15 |
+
|
| 16 |
+
The matched NTP-only baseline of the Tessera-1B-Nano comparison from Paragon
|
| 17 |
+
Intelligence Labs: the unchanged `HuggingFaceTB/SmolLM2-360M` backbone,
|
| 18 |
+
continued-pretrained without a concept path. It exists so the concept-arm result
|
| 19 |
+
is interpretable.
|
| 20 |
+
|
| 21 |
+
## TL;DR
|
| 22 |
+
|
| 23 |
+
This arm is the control of a token-matched comparison: it consumed the same
|
| 24 |
+
tokens of the same packed corpus, in the same order, from the same
|
| 25 |
+
initialization as the concept arm, with no restarts and no NaNs.
|
| 26 |
+
|
| 27 |
+
- **Token loss is the reference**: the final numbers below are the baseline the
|
| 28 |
+
concept arm is compared against.
|
| 29 |
+
- The comparison outcome and the intervention readings live in the whitepaper at
|
| 30 |
+
`docs/whitepaper.md` in the ncp-smol repository.
|
| 31 |
+
|
| 32 |
+
## Evaluation
|
| 33 |
+
|
| 34 |
+
| Metric | Value |
|
| 35 |
+
| --- | ---: |
|
| 36 |
+
| Held-out NTP loss | 2.5135 |
|
| 37 |
+
| Held-out perplexity | 12.3485 |
|
| 38 |
+
| Training tokens | 999,948,288 |
|
| 39 |
+
| Tracked compute estimate | $24.88 |
|
| 40 |
+
|
| 41 |
+
Intervention deltas are increases in held-out NTP loss relative to normal predicted concept
|
| 42 |
+
feedback, evaluated on identical batches.
|
| 43 |
+
|
| 44 |
+
## Architecture
|
| 45 |
+
|
| 46 |
+
- chunk size: 4
|
| 47 |
+
- product code: 15 segments x 64 entries
|
| 48 |
+
- causal concept blocks: 2
|
| 49 |
+
- injection point: before token decoder block 2
|
| 50 |
+
- NCP target: next continuous concept
|
| 51 |
+
- loss: `L_ntp + 1 L_ncp + 1 L_vq`
|
| 52 |
+
|
| 53 |
+
This is a compact ConceptLM-style implementation, not an 8.9B NCP-ArchPreview replica. It
|
| 54 |
+
omits iterative residual coding, cross-scale residual connections, and the large-scale
|
| 55 |
+
training recipe.
|
| 56 |
+
|
| 57 |
+
## Training data and provenance
|
| 58 |
+
|
| 59 |
+
The matched corpus and the training record are pinned in the ncp-smol repository:
|
| 60 |
+
packed-cache SHA256 hashes, the complete metric log, trainer state, and the raw
|
| 61 |
+
intervention evaluation JSON (also shipped in this repository as `eval.json` and
|
| 62 |
+
`metrics.jsonl`).
|
| 63 |
+
|
| 64 |
+
## Loading
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 68 |
+
|
| 69 |
+
tokenizer = AutoTokenizer.from_pretrained("yava-code/Tessera-1B-Nano-Base")
|
| 70 |
+
model = AutoModelForCausalLM.from_pretrained("yava-code/Tessera-1B-Nano-Base")
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
## References
|
| 74 |
+
|
| 75 |
+
- ConceptLM: https://arxiv.org/abs/2602.08984
|
| 76 |
+
- NCP-ArchPreview: https://arxiv.org/abs/2609.10715
|