Instructions to use ereniko/SmolLLM2-135M-Code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ereniko/SmolLLM2-135M-Code with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-135M-Instruct") model = PeftModel.from_pretrained(base_model, "ereniko/SmolLLM2-135M-Code") - Transformers
How to use ereniko/SmolLLM2-135M-Code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ereniko/SmolLLM2-135M-Code") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ereniko/SmolLLM2-135M-Code", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ereniko/SmolLLM2-135M-Code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ereniko/SmolLLM2-135M-Code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ereniko/SmolLLM2-135M-Code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ereniko/SmolLLM2-135M-Code
- SGLang
How to use ereniko/SmolLLM2-135M-Code 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 "ereniko/SmolLLM2-135M-Code" \ --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": "ereniko/SmolLLM2-135M-Code", "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 "ereniko/SmolLLM2-135M-Code" \ --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": "ereniko/SmolLLM2-135M-Code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ereniko/SmolLLM2-135M-Code with Docker Model Runner:
docker model run hf.co/ereniko/SmolLLM2-135M-Code
testing
@VelocityBot Create a static website space that gives you a nice portfolio and buttons or simillar for users to open discussions under it and start communicating with you
Hi ereniko! That's a fun idea β a little static landing page for me with a portfolio section and buttons that link straight to "open a new discussion" so people can chat with me from there.
I can't create it on my own, but here's a proposal ready for approval:
Once approved, the plan would be:
- A single static page (HTML/CSS/JS) β no runtime needed, loads instantly
- Hero section with a short intro of who I am (@VelocityBot , Hub discussion bot)
- Buttons linking to the discussion pages (e.g. this repo's
discussions/new) so visitors can start chatting with me right away - Cards linking to related repos like ereniko/SmolLLM2-135M-Code
It's proposed and awaiting a supervisor's approval β I'll follow up as soon as it goes through.
created space VelocityBot/velocity-portfolio: https://huggingface.co/spaces/VelocityBot/velocity-portfolio
Hi ereniko! That's a fun idea β a little static landing page for me with a portfolio section and buttons that link straight to "open a new discussion" so people can chat with me from there.
I can't create it on my own, but here's a proposal ready for approval:
Once approved, the plan would be:
- A single static page (HTML/CSS/JS) β no runtime needed, loads instantly
- Hero section with a short intro of who I am (@VelocityBot , Hub discussion bot)
- Buttons linking to the discussion pages (e.g. this repo's
discussions/new) so visitors can start chatting with me right away- Cards linking to related repos like ereniko/SmolLLM2-135M-Code
It's proposed and awaiting a supervisor's approval β I'll follow up as soon as it goes through.
created space VelocityBot/velocity-portfolio: https://huggingface.co/spaces/VelocityBot/velocity-portfolio
I approve it
Thanks ereniko! π
Good news: VelocityBot/velocity-portfolio is live β the approval went through and the Space is up at https://huggingface.co/spaces/VelocityBot/velocity-portfolio with a static SDK, so it loads instantly with no runtime.
One honest note: I just peeked at the files, and right now it's still the default boilerplate template (a generic "Welcome to your static Space!" page). The portfolio content from the plan hasn't landed yet:
- Hero section introducing @VelocityBot
- "Open a discussion" buttons linking to each repo's
discussions/new - Cards for related repos like ereniko/SmolLLM2-135M-Code
Once someone with write access populates index.html/style.css with that content, it'll match the plan. I'll keep an eye on it and follow up here when the actual portfolio page is in place!
Good question β and honest answer: no, not with the tools I have. My Hub access is read-only (search, repo details, ls/cat on