Text Generation
Transformers
TensorBoard
ONNX
Safetensors
Transformers.js
English
llama
conversational
text-generation-inference
Instructions to use viktoroo/SmolLM2-360M-Tools with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use viktoroo/SmolLM2-360M-Tools with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="viktoroo/SmolLM2-360M-Tools") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("viktoroo/SmolLM2-360M-Tools") model = AutoModelForCausalLM.from_pretrained("viktoroo/SmolLM2-360M-Tools") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Transformers.js
How to use viktoroo/SmolLM2-360M-Tools with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'viktoroo/SmolLM2-360M-Tools'); - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use viktoroo/SmolLM2-360M-Tools with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "viktoroo/SmolLM2-360M-Tools" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "viktoroo/SmolLM2-360M-Tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/viktoroo/SmolLM2-360M-Tools
- SGLang
How to use viktoroo/SmolLM2-360M-Tools 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 "viktoroo/SmolLM2-360M-Tools" \ --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": "viktoroo/SmolLM2-360M-Tools", "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 "viktoroo/SmolLM2-360M-Tools" \ --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": "viktoroo/SmolLM2-360M-Tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use viktoroo/SmolLM2-360M-Tools with Docker Model Runner:
docker model run hf.co/viktoroo/SmolLM2-360M-Tools
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,6 +17,20 @@ base_model:
|
|
| 17 |
|
| 18 |

|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
## Table of Contents
|
| 21 |
|
| 22 |
1. [Model Summary](##model-summary)
|
|
|
|
| 17 |
|
| 18 |

|
| 19 |
|
| 20 |
+
> [!WARNING]
|
| 21 |
+
> # DISCLAIMER
|
| 22 |
+
> This repository is a repack of `HuggingFaceTB/SmolLM2-360M-Instruct`.
|
| 23 |
+
>
|
| 24 |
+
> No model weights were modified. No additional fine-tuning was performed.
|
| 25 |
+
> The only change is an updated `chat_template` in `tokenizer_config.json`.
|
| 26 |
+
>
|
| 27 |
+
> The new chat template:
|
| 28 |
+
> - injects a system prompt if none is provided,
|
| 29 |
+
> - documents available external tools,
|
| 30 |
+
> - defines a function-calling protocol using `<tool_call>` and `<tool_response>` blocks.
|
| 31 |
+
>
|
| 32 |
+
> Because the weights are unchanged, behavior, capabilities, and safety limitations are inherited directly from the original `SmolLM2-360M-Instruct` checkpoint. The model has not been trained or aligned to actually follow the new tool-calling protocol. It may produce malformed tool calls or incorrect tool usage without further fine-tuning.
|
| 33 |
+
|
| 34 |
## Table of Contents
|
| 35 |
|
| 36 |
1. [Model Summary](##model-summary)
|