Instructions to use nuprl/MultiPL-T-CodeLlama_34b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nuprl/MultiPL-T-CodeLlama_34b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nuprl/MultiPL-T-CodeLlama_34b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nuprl/MultiPL-T-CodeLlama_34b") model = AutoModelForCausalLM.from_pretrained("nuprl/MultiPL-T-CodeLlama_34b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nuprl/MultiPL-T-CodeLlama_34b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nuprl/MultiPL-T-CodeLlama_34b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nuprl/MultiPL-T-CodeLlama_34b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nuprl/MultiPL-T-CodeLlama_34b
- SGLang
How to use nuprl/MultiPL-T-CodeLlama_34b 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 "nuprl/MultiPL-T-CodeLlama_34b" \ --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": "nuprl/MultiPL-T-CodeLlama_34b", "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 "nuprl/MultiPL-T-CodeLlama_34b" \ --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": "nuprl/MultiPL-T-CodeLlama_34b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nuprl/MultiPL-T-CodeLlama_34b with Docker Model Runner:
docker model run hf.co/nuprl/MultiPL-T-CodeLlama_34b
model_codellama_34b_multiplt_lua-epoch4
Browse files
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "model_codellama_34b_multiplt_lua/checkpoint-
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "model_codellama_34b_multiplt_lua/checkpoint-520",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
pytorch_model-00001-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9852637497
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb20390191eec5c6150848720439e60579dccbe2281a144d68f52b1f3ac38f00
|
| 3 |
size 9852637497
|
pytorch_model-00002-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9689093137
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac54780aecdfa0506830888edff3514bb2afadf4a0f33157e1ac945eaf6140d9
|
| 3 |
size 9689093137
|
pytorch_model-00003-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9689093137
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2ee493ab6a6572c5174eb4806e865731335797641c383e6c6771494a33f343f
|
| 3 |
size 9689093137
|
pytorch_model-00004-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9689093137
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bef231d17684f12a243f5a0965a2f47d81528c95c4ba5362fbfaeff792a4590c
|
| 3 |
size 9689093137
|
pytorch_model-00005-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9689093137
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2bbb8eb687611bea80c80ac48bcac422b2bda6c794473cbc7e8002c41a96b7e7
|
| 3 |
size 9689093137
|
pytorch_model-00006-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9689093137
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ec00ecf097e6a0cfc9d0776d73473c3181b68213b6efe665402509f4290c765
|
| 3 |
size 9689093137
|
pytorch_model-00007-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9189985945
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a584988252438248b92e556cd24f8a67d4ce5f98e922d8d5167402764e963e9
|
| 3 |
size 9189985945
|