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
File size: 1,467 Bytes
42322ca | 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 | {
"data": {
"cache_dir": "/vol/.cache/data/fineweb-edu-1b",
"cache_train_tokens": null,
"dataset": "HuggingFaceFW/fineweb-edu",
"overfit": false,
"revision": "87f09149ef4734204d70ed1d046ddc9ca3f2b8f9",
"sequence_length": 1024,
"shuffle_buffer": 10000,
"subset": "sample-10BT",
"text_column": "text",
"train_split": "train",
"train_tokens": 1000000000,
"validation_split": null,
"validation_tokens": 10000000
},
"model": {
"base_model": "HuggingFaceTB/SmolLM2-360M",
"chunk_size": 4,
"codebook_size": 64,
"concept_layers": 2,
"dtype": "bfloat16",
"insert_layer": 1,
"ncp_target": "continuous",
"ncp_weight": 1.0,
"revision": "f8027fd0eaeea54caa13c31d31b9fdc459c38b49",
"segments": 15,
"vq_weight": 1.0
},
"optim": {
"beta1": 0.9,
"beta2": 0.95,
"eps": 1e-08,
"grad_accum_steps": 16,
"learning_rate": 3e-05,
"max_grad_norm": 1.0,
"micro_batch_size": 8,
"min_lr_ratio": 0.1,
"warmup_ratio": 0.01,
"weight_decay": 0.1
},
"run": {
"mode": "ntp",
"name": "fineweb-edu-ntp",
"output_dir": "/vol/runs/fineweb-edu-ntp",
"resume": true,
"seed": 17
},
"train": {
"compile": false,
"eval_batches": 32,
"eval_every_tokens": 100000000,
"hourly_cost_usd": 2.74,
"log_every_steps": 10,
"max_wall_time_minutes": 1320,
"run_budget_usd": 60.0,
"save_every_tokens": 100000000
}
} |