Instructions to use KingTomate1/Tomato-v1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KingTomate1/Tomato-v1.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KingTomate1/Tomato-v1.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KingTomate1/Tomato-v1.0") model = AutoModelForCausalLM.from_pretrained("KingTomate1/Tomato-v1.0", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KingTomate1/Tomato-v1.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KingTomate1/Tomato-v1.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KingTomate1/Tomato-v1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KingTomate1/Tomato-v1.0
- SGLang
How to use KingTomate1/Tomato-v1.0 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 "KingTomate1/Tomato-v1.0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KingTomate1/Tomato-v1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "KingTomate1/Tomato-v1.0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KingTomate1/Tomato-v1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KingTomate1/Tomato-v1.0 with Docker Model Runner:
docker model run hf.co/KingTomate1/Tomato-v1.0
Tomato v1.0
A 100.7M-parameter English assistant, fine-tuned from SupraLabs/Supra2-100M-Instruct with LoRA on SmolTalk.
Training
- LoRA: r = 16, alpha = 32, dropout 0.05, 2.6M trainable parameters (2.5 %)
- 40 steps, batch 8, max sequence length 512, lr 2e-5 (cosine), fp32
- Data: 1200 conversations from
HuggingFaceTB/smol-smoltalk
Evaluation
Prompt-sensitive benchmark (17 cases: format compliance, brevity, uncertainty, arithmetic, coherence), greedy decoding, identical settings for both models:
| Category | Base | Tomato v1.0 |
|---|---|---|
| Format compliance | 0/5 | 0/5 |
| Brevity | 0/3 | 1/3 |
| Uncertainty on invented facts | 0/4 | 0/4 |
| Arithmetic | 0/3 | 0/3 |
| Coherence (no repetition loops) | 0/2 | 2/2 |
| Total | 0/17 | 3/17 |
Knowledge benchmarks (identical subsets and seeds):
| Task | n | Base | Tomato v1.0 |
|---|---|---|---|
| ARC-Easy | 800 | 41.25 % | 41.25 % |
| HellaSwag | 800 | 30.50 % | 30.50 % |
| MMLU | 600 | 24.67 % | 24.67 % |
| GSM8K | 150 | 1.33 % | 1.33 % |
Tomato v1.0 is more concise and no longer falls into repetition loops. Knowledge scores are unchanged: 1200 conversations are not enough to add knowledge to a 100M-parameter model.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("KingTomate1/Tomato-v1.0")
model = AutoModelForCausalLM.from_pretrained("KingTomate1/Tomato-v1.0", dtype="auto")
msgs = [{"role": "user", "content": "Name three primary colors."}]
ids = tok.apply_chat_template(msgs, tokenize=True, add_generation_prompt=True, return_dict=False)
out = model.generate(ids, do_sample=False, max_new_tokens=64)
print(tok.decode(out[0][len(ids):], skip_special_tokens=True))
Limitations
- 100M parameters: short factual answers, classification and extraction only.
- No reliable multi-step reasoning, small effective context (2048 tokens).
- English only.
License
Apache-2.0 (inherited from the base model).
- Downloads last month
- -
Model tree for KingTomate1/Tomato-v1.0
Base model
SupraLabs/Supra2-100M-Base