Instructions to use niclasfw/SmolLM3-3B-llm-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use niclasfw/SmolLM3-3B-llm-code with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM3-3B-Base") model = PeftModel.from_pretrained(base_model, "niclasfw/SmolLM3-3B-llm-code") - Transformers
How to use niclasfw/SmolLM3-3B-llm-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="niclasfw/SmolLM3-3B-llm-code")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("niclasfw/SmolLM3-3B-llm-code", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use niclasfw/SmolLM3-3B-llm-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "niclasfw/SmolLM3-3B-llm-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "niclasfw/SmolLM3-3B-llm-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/niclasfw/SmolLM3-3B-llm-code
- SGLang
How to use niclasfw/SmolLM3-3B-llm-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 "niclasfw/SmolLM3-3B-llm-code" \ --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": "niclasfw/SmolLM3-3B-llm-code", "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 "niclasfw/SmolLM3-3B-llm-code" \ --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": "niclasfw/SmolLM3-3B-llm-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use niclasfw/SmolLM3-3B-llm-code with Docker Model Runner:
docker model run hf.co/niclasfw/SmolLM3-3B-llm-code
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
@@ -15,7 +20,7 @@ tags: []
|
|
| 15 |
|
| 16 |
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
- **Developed by:** [More Information Needed]
|
| 21 |
- **Funded by [optional]:** [More Information Needed]
|
|
@@ -196,4 +201,7 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 196 |
|
| 197 |
## Model Card Contact
|
| 198 |
|
| 199 |
-
[More Information Needed]
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: HuggingFaceTB/SmolLM3-3B-Base
|
| 3 |
+
library_name: peft
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- base_model:adapter:HuggingFaceTB/SmolLM3-3B-Base
|
| 7 |
+
- lora
|
| 8 |
+
- transformers
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for Model ID
|
|
|
|
| 20 |
|
| 21 |
<!-- Provide a longer summary of what this model is. -->
|
| 22 |
|
| 23 |
+
|
| 24 |
|
| 25 |
- **Developed by:** [More Information Needed]
|
| 26 |
- **Funded by [optional]:** [More Information Needed]
|
|
|
|
| 201 |
|
| 202 |
## Model Card Contact
|
| 203 |
|
| 204 |
+
[More Information Needed]
|
| 205 |
+
### Framework versions
|
| 206 |
+
|
| 207 |
+
- PEFT 0.18.1
|