Text Generation
Transformers
Safetensors
ncp_smol
next-concept-prediction
conceptlm
causal-lm
smollm2
tessera
custom_code
Instructions to use yava-code/Tessera-1B-Nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yava-code/Tessera-1B-Nano with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yava-code/Tessera-1B-Nano", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("yava-code/Tessera-1B-Nano", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yava-code/Tessera-1B-Nano 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" # 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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yava-code/Tessera-1B-Nano
- SGLang
How to use yava-code/Tessera-1B-Nano 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" \ --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", "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" \ --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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yava-code/Tessera-1B-Nano with Docker Model Runner:
docker model run hf.co/yava-code/Tessera-1B-Nano
File size: 1,146 Bytes
eb46968 | 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 | {
"intervention": {
"shuffle_minus_predicted": 0.0008374229073524475,
"zero_minus_predicted": 0.10504236817359924
},
"predicted": {
"codebook_perplexity": 7.5476508140563965,
"codebook_usage": 0.856249988079071,
"loss_by_chunk_offset": {
"0": 2.5110912322998047,
"1": 2.520437240600586,
"2": 2.5094692707061768,
"3": 2.515815258026123
},
"ntp_loss": 2.5142061039805412,
"perplexity": 12.356794873753902
},
"shuffle": {
"codebook_perplexity": 7.5476508140563965,
"codebook_usage": 0.856249988079071,
"loss_by_chunk_offset": {
"0": 2.5119338035583496,
"1": 2.5215582847595215,
"2": 2.5100176334381104,
"3": 2.5166521072387695
},
"ntp_loss": 2.5150435268878937,
"perplexity": 12.367147070821142
},
"zero": {
"codebook_perplexity": 7.5476508140563965,
"codebook_usage": 0.856249988079071,
"loss_by_chunk_offset": {
"0": 2.61773681640625,
"1": 2.6253929138183594,
"2": 2.6141862869262695,
"3": 2.619673013687134
},
"ntp_loss": 2.6192484721541405,
"perplexity": 13.725404684277025
}
} |