Instructions to use OsamaBinLikhon/NextStep-Coder-MoE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use OsamaBinLikhon/NextStep-Coder-MoE with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("distilgpt2") model = PeftModel.from_pretrained(base_model, "OsamaBinLikhon/NextStep-Coder-MoE") - Transformers
How to use OsamaBinLikhon/NextStep-Coder-MoE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OsamaBinLikhon/NextStep-Coder-MoE")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OsamaBinLikhon/NextStep-Coder-MoE", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OsamaBinLikhon/NextStep-Coder-MoE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OsamaBinLikhon/NextStep-Coder-MoE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OsamaBinLikhon/NextStep-Coder-MoE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OsamaBinLikhon/NextStep-Coder-MoE
- SGLang
How to use OsamaBinLikhon/NextStep-Coder-MoE 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 "OsamaBinLikhon/NextStep-Coder-MoE" \ --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": "OsamaBinLikhon/NextStep-Coder-MoE", "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 "OsamaBinLikhon/NextStep-Coder-MoE" \ --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": "OsamaBinLikhon/NextStep-Coder-MoE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OsamaBinLikhon/NextStep-Coder-MoE with Docker Model Runner:
docker model run hf.co/OsamaBinLikhon/NextStep-Coder-MoE
Upload NextStep-Coder-MoE LoRA adapter
Browse files- adapter_model.safetensors +1 -1
- tokenizer.json +2 -2
- training_args.bin +1 -1
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 591352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f07a9d9cb5d4cc686bee9b6db4754d952860e726de014158637d9049e31d3fe
|
| 3 |
size 591352
|
tokenizer.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
-
"max_length":
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
"strategy": {
|
| 11 |
-
"Fixed":
|
| 12 |
},
|
| 13 |
"direction": "Right",
|
| 14 |
"pad_to_multiple_of": null,
|
|
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
+
"max_length": 128,
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
"strategy": {
|
| 11 |
+
"Fixed": 128
|
| 12 |
},
|
| 13 |
"direction": "Right",
|
| 14 |
"pad_to_multiple_of": null,
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5841
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06e5b5c2b35dc2aa80506b45c7749137d87b24adfe5d4558f8e1bfcf83f2dfd1
|
| 3 |
size 5841
|