Text Generation
Transformers
Safetensors
llama
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use shreydan/SmolLM2-360M-Reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shreydan/SmolLM2-360M-Reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shreydan/SmolLM2-360M-Reasoning") 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("shreydan/SmolLM2-360M-Reasoning") model = AutoModelForCausalLM.from_pretrained("shreydan/SmolLM2-360M-Reasoning", 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 shreydan/SmolLM2-360M-Reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shreydan/SmolLM2-360M-Reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shreydan/SmolLM2-360M-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shreydan/SmolLM2-360M-Reasoning
- SGLang
How to use shreydan/SmolLM2-360M-Reasoning 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 "shreydan/SmolLM2-360M-Reasoning" \ --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": "shreydan/SmolLM2-360M-Reasoning", "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 "shreydan/SmolLM2-360M-Reasoning" \ --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": "shreydan/SmolLM2-360M-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use shreydan/SmolLM2-360M-Reasoning with Docker Model Runner:
docker model run hf.co/shreydan/SmolLM2-360M-Reasoning
Commit History
-
Training in progress, step 3000, checkpoint
Verified signature133995a -
Training in progress, step 3000
Verified signaturea5535b8 -
Training in progress, step 2700, checkpoint
Verified signaturef8452b1 -
Training in progress, step 2700
Verified signature2fbc06b -
Training in progress, step 2400, checkpoint
Verified signaturefb43691 -
Training in progress, step 2400
Verified signatured77a644 -
Training in progress, step 2100, checkpoint
Verified signature7ed4122 -
Training in progress, step 2100
Verified signature1531b45 -
Training in progress, step 1800, checkpoint
Verified signature383a52d -
Training in progress, step 1800
Verified signature18ea7b9 -
Training in progress, step 1500, checkpoint
Verified signaturef1552c2 -
Training in progress, step 1500
Verified signature01a64b4
-
Training in progress, step 1200, checkpoint
Verified signature8e6d6c7 -
Training in progress, step 1200
Verified signaturece8215b -
Training in progress, step 900, checkpoint
Verified signatured19d076 -
Training in progress, step 900
Verified signature87b2c0c -
Training in progress, step 600, checkpoint
Verified signature795aa2d -
Training in progress, step 600
Verified signatured582f98 -
Training in progress, step 300, checkpoint
Verified signature8cb05a1 -
Training in progress, step 300
Verified signaturee5e8b8b -
Upload tokenizer
Verified signature25f9f58 -
Upload LlamaForCausalLM
Verified signature12b16fb -
initial commit
Verified signaturea74f912