Instructions to use ArmelR/starcoder-gradio-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ArmelR/starcoder-gradio-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ArmelR/starcoder-gradio-v0")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ArmelR/starcoder-gradio-v0") model = AutoModelForCausalLM.from_pretrained("ArmelR/starcoder-gradio-v0") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ArmelR/starcoder-gradio-v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ArmelR/starcoder-gradio-v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ArmelR/starcoder-gradio-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ArmelR/starcoder-gradio-v0
- SGLang
How to use ArmelR/starcoder-gradio-v0 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 "ArmelR/starcoder-gradio-v0" \ --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": "ArmelR/starcoder-gradio-v0", "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 "ArmelR/starcoder-gradio-v0" \ --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": "ArmelR/starcoder-gradio-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ArmelR/starcoder-gradio-v0 with Docker Model Runner:
docker model run hf.co/ArmelR/starcoder-gradio-v0
Update README.md
Browse files
README.md
CHANGED
|
@@ -76,6 +76,18 @@ outputs = model.generate(
|
|
| 76 |
input_len=len(inputs["input_ids"])
|
| 77 |
print(tokenizer.decode(outputs[0][input_len:]))
|
| 78 |
```
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
# More information
|
| 81 |
For further information, refer to [StarCoder](https://huggingface.co/bigcode/starcoder).
|
|
|
|
| 76 |
input_len=len(inputs["input_ids"])
|
| 77 |
print(tokenizer.decode(outputs[0][input_len:]))
|
| 78 |
```
|
| 79 |
+
# Updates
|
| 80 |
+
Gradio dataset `.filter(lambda x : ("gradio" in x["content"] or "gr." in x["content"]) and "streamlit" not in x["content"]`)
|
| 81 |
+
Guanaco `ArmelR/oasst1_guanaco`
|
| 82 |
+
- StarCoderbase (950, 1350)
|
| 83 |
+
- max_steps = 2000
|
| 84 |
+
- shuffle_buffer = 100
|
| 85 |
+
- batch_size = 2
|
| 86 |
+
- gradient_accumulation_steps = 4
|
| 87 |
+
- num_warmup_steps = 100
|
| 88 |
+
- weight_decay = 0.01
|
| 89 |
+
- StarCoderplus (2000)
|
| 90 |
+
|
| 91 |
+
Guanaco multi-turn (HuggingFaceH4/oasst1_en)
|
| 92 |
# More information
|
| 93 |
For further information, refer to [StarCoder](https://huggingface.co/bigcode/starcoder).
|