Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
text-generation-inference
Instructions to use Huyle2501/SmolLM2-NewGen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Huyle2501/SmolLM2-NewGen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Huyle2501/SmolLM2-NewGen")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Huyle2501/SmolLM2-NewGen") model = AutoModelForCausalLM.from_pretrained("Huyle2501/SmolLM2-NewGen", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Huyle2501/SmolLM2-NewGen with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Huyle2501/SmolLM2-NewGen" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Huyle2501/SmolLM2-NewGen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Huyle2501/SmolLM2-NewGen
- SGLang
How to use Huyle2501/SmolLM2-NewGen 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 "Huyle2501/SmolLM2-NewGen" \ --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": "Huyle2501/SmolLM2-NewGen", "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 "Huyle2501/SmolLM2-NewGen" \ --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": "Huyle2501/SmolLM2-NewGen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Huyle2501/SmolLM2-NewGen with Docker Model Runner:
docker model run hf.co/Huyle2501/SmolLM2-NewGen
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Huyle2501/SmolLM2-NewGen")
model = AutoModelForCausalLM.from_pretrained("Huyle2501/SmolLM2-NewGen", device_map="auto")Quick Links
SmolLM2-testing
This model is a fine-tuned version of HuggingFaceTB/SmolLM2-135M on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 2.8183
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- num_epochs: 2
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.3244 | 0.1066 | 100 | 3.1575 |
| 2.9347 | 0.2132 | 200 | 3.0467 |
| 2.8302 | 0.3198 | 300 | 2.9874 |
| 2.8362 | 0.4264 | 400 | 2.9479 |
| 2.7913 | 0.5330 | 500 | 2.9120 |
| 2.7092 | 0.6397 | 600 | 2.8882 |
| 2.6953 | 0.7463 | 700 | 2.8684 |
| 2.6043 | 0.8529 | 800 | 2.8508 |
| 2.5504 | 0.9595 | 900 | 2.8356 |
| 2.4937 | 1.0661 | 1000 | 2.8345 |
| 2.3495 | 1.1727 | 1100 | 2.8333 |
| 2.3568 | 1.2793 | 1200 | 2.8295 |
| 2.3536 | 1.3859 | 1300 | 2.8278 |
| 2.3287 | 1.4925 | 1400 | 2.8236 |
| 2.3339 | 1.5991 | 1500 | 2.8211 |
| 2.3566 | 1.7058 | 1600 | 2.8193 |
| 2.3626 | 1.8124 | 1700 | 2.8185 |
| 2.3146 | 1.9190 | 1800 | 2.8183 |
Framework versions
- Transformers 4.56.1
- Pytorch 2.8.0+cu126
- Datasets 4.0.0
- Tokenizers 0.22.0
- Downloads last month
- 6
Model tree for Huyle2501/SmolLM2-NewGen
Base model
HuggingFaceTB/SmolLM2-135M
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Huyle2501/SmolLM2-NewGen")