Text Generation
Transformers
PyTorch
Safetensors
gpt_bigcode
code
Eval Results (legacy)
text-generation-inference
Instructions to use nuprl/MultiPL-T-StarCoderBase_15b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nuprl/MultiPL-T-StarCoderBase_15b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nuprl/MultiPL-T-StarCoderBase_15b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nuprl/MultiPL-T-StarCoderBase_15b") model = AutoModelForCausalLM.from_pretrained("nuprl/MultiPL-T-StarCoderBase_15b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use nuprl/MultiPL-T-StarCoderBase_15b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nuprl/MultiPL-T-StarCoderBase_15b" # 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-StarCoderBase_15b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nuprl/MultiPL-T-StarCoderBase_15b
- SGLang
How to use nuprl/MultiPL-T-StarCoderBase_15b 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-StarCoderBase_15b" \ --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-StarCoderBase_15b", "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-StarCoderBase_15b" \ --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-StarCoderBase_15b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nuprl/MultiPL-T-StarCoderBase_15b with Docker Model Runner:
docker model run hf.co/nuprl/MultiPL-T-StarCoderBase_15b
Update README.md
Browse files
README.md
CHANGED
|
@@ -48,7 +48,7 @@ model-index:
|
|
| 48 |
---
|
| 49 |
# MultiPLCoder-15b
|
| 50 |
|
| 51 |
-
15 billion parameter version of MultiPLCoder, a set of StarCoder-based models finetuned on the MultiPL-T dataset.
|
| 52 |
These models are state-of-the-art at low-resource languages, such as: Lua, Racket, and OCaml.
|
| 53 |
|
| 54 |
This 15 billion parameter model is the most capable of the MultiPLCoder family. However, it requires a dedicated GPU for inference.
|
|
@@ -78,8 +78,8 @@ model = AutoModelForCausalLM.from_pretrained("nuprl/MultiPLCoder-15b", revision=
|
|
| 78 |
|
| 79 |
Note that the model's default configuration does not enable caching, therefore you must specify to use the cache on generation.
|
| 80 |
```py
|
| 81 |
-
toks = tokenizer.encode("-- Fibonacci iterative", return_tensors="pt")
|
| 82 |
-
out = model.generate(toks, use_cache=True, do_sample=True, temperature=0.2, top_p=0.95, max_length=
|
| 83 |
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
| 84 |
```
|
| 85 |
```
|
|
|
|
| 48 |
---
|
| 49 |
# MultiPLCoder-15b
|
| 50 |
|
| 51 |
+
15 billion parameter version of MultiPLCoder, a set of StarCoder-based models finetuned on the [MultiPL-T dataset](https://huggingface.co/datasets/nuprl/MultiPL-T).
|
| 52 |
These models are state-of-the-art at low-resource languages, such as: Lua, Racket, and OCaml.
|
| 53 |
|
| 54 |
This 15 billion parameter model is the most capable of the MultiPLCoder family. However, it requires a dedicated GPU for inference.
|
|
|
|
| 78 |
|
| 79 |
Note that the model's default configuration does not enable caching, therefore you must specify to use the cache on generation.
|
| 80 |
```py
|
| 81 |
+
toks = tokenizer.encode("-- Fibonacci iterative", return_tensors="pt").cuda()
|
| 82 |
+
out = model.generate(toks, use_cache=True, do_sample=True, temperature=0.2, top_p=0.95, max_length=256)
|
| 83 |
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
| 84 |
```
|
| 85 |
```
|