Instructions to use Flab-Pruner/Flab-Nxcode-5.7B-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Flab-Pruner/Flab-Nxcode-5.7B-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Flab-Pruner/Flab-Nxcode-5.7B-instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Flab-Pruner/Flab-Nxcode-5.7B-instruct") model = AutoModelForCausalLM.from_pretrained("Flab-Pruner/Flab-Nxcode-5.7B-instruct") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Flab-Pruner/Flab-Nxcode-5.7B-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Flab-Pruner/Flab-Nxcode-5.7B-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Flab-Pruner/Flab-Nxcode-5.7B-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Flab-Pruner/Flab-Nxcode-5.7B-instruct
- SGLang
How to use Flab-Pruner/Flab-Nxcode-5.7B-instruct 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 "Flab-Pruner/Flab-Nxcode-5.7B-instruct" \ --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": "Flab-Pruner/Flab-Nxcode-5.7B-instruct", "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 "Flab-Pruner/Flab-Nxcode-5.7B-instruct" \ --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": "Flab-Pruner/Flab-Nxcode-5.7B-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Flab-Pruner/Flab-Nxcode-5.7B-instruct with Docker Model Runner:
docker model run hf.co/Flab-Pruner/Flab-Nxcode-5.7B-instruct
Upload 3 files
Browse files
model-00001-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4244e537a5cbd5a1edbb859a5605b9ff5f14e05c1261daa8788e95122c4fb923
|
| 3 |
+
size 4977085240
|
model-00002-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:500e23d29c90444e4741b796c016620cf81da91902fb5b8b91b3cfe20d7ba2e1
|
| 3 |
+
size 4935983496
|
model-00003-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c2b14dd02d1badd4e953c00b6b50186457515d7cefd826c5eea547808992a9d
|
| 3 |
+
size 1555344048
|