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")# 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") - 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
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: openrail
|
| 4 |
+
datasets:
|
| 5 |
+
- nuprl/MultiPL-T
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# MultiPL-T CodeLlama-34b
|
| 9 |
+
|
| 10 |
+
This repository holds several [CodeLlama-34b](https://huggingface.co/meta-llama/CodeLlama-34b-hf) fine-tunes, all fine-tuned on MultiPL-T data.
|
| 11 |
+
Examine the commit message to determine the language and checkpoint. We have a checkpoint
|
| 12 |
+
for each epoch.
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
For more information the training process, see the MultiPL-T paper:
|
| 16 |
+
|
| 17 |
+
```
|
| 18 |
+
@misc{cassano:multipl-t,
|
| 19 |
+
title={Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMs},
|
| 20 |
+
author={Federico Cassano and John Gouwar and Francesca Lucchetti and Claire Schlesinger and Anders Freeman and Carolyn Jane Anderson and Molly Q Feldman and Michael Greenberg and Abhinav Jangda and Arjun Guha},
|
| 21 |
+
year={2024},
|
| 22 |
+
eprint={2308.09895},
|
| 23 |
+
archivePrefix={arXiv},
|
| 24 |
+
primaryClass={cs.PL}
|
| 25 |
+
}
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
For usage instructions, see the model card for the original model. Replace the model name with the name of this repository, and set `revision=COMMIT_HASH`.
|