Text Generation
Transformers
PyTorch
Safetensors
English
gpt_bigcode
trl
rlhf
text-generation-inference
Instructions to use lvwerra/starcoderbase-gsm8k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lvwerra/starcoderbase-gsm8k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lvwerra/starcoderbase-gsm8k")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lvwerra/starcoderbase-gsm8k") model = AutoModelForCausalLM.from_pretrained("lvwerra/starcoderbase-gsm8k") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lvwerra/starcoderbase-gsm8k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lvwerra/starcoderbase-gsm8k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lvwerra/starcoderbase-gsm8k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lvwerra/starcoderbase-gsm8k
- SGLang
How to use lvwerra/starcoderbase-gsm8k 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 "lvwerra/starcoderbase-gsm8k" \ --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": "lvwerra/starcoderbase-gsm8k", "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 "lvwerra/starcoderbase-gsm8k" \ --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": "lvwerra/starcoderbase-gsm8k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lvwerra/starcoderbase-gsm8k with Docker Model Runner:
docker model run hf.co/lvwerra/starcoderbase-gsm8k
Create README.md (#2)
Browse files- Create README.md (c6f16a6d20f04cd75bdaa264d4251e8b07184b18)
Co-authored-by: Shengyi Costa Huang <vwxyzjn@users.noreply.huggingface.co>
README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: bigscience-openrail-m
|
| 3 |
+
datasets:
|
| 4 |
+
- gsm8k
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- trl
|
| 9 |
+
- transformers
|
| 10 |
+
- rlhf
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# starcoderbase-triviaqa
|
| 14 |
+
|
| 15 |
+
This model is baesed on https://huggingface.co/bigcode/starcoderbase and is fine-tuned on the GSM8K dataset using reinforcement learning via TRL's `TextEnvironment` (https://github.com/huggingface/trl/pull/424).
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
### Out of Scope Use
|
| 19 |
+
- Replacing human expertise
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
## Bias, Risks, and Limitations
|
| 23 |
+
- May generate answers that are incorrect or misleading.
|
| 24 |
+
- May copy answers from the training data verbatim.
|
| 25 |
+
- May generate language that is hateful or promotes discrimination ([example](https://huggingface.co/trl-lib/llama-7b-se-rl-peft/discussions/7#64376083369f6f907f5bfe4c)).
|
| 26 |
+
- May generate language that is offensive to direct or indirect users or to people or groups mentioned.
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
### Recommendations
|
| 30 |
+
- Answers should be validated through the use of external sources.
|
| 31 |
+
- Disparities between the data contributors and the direct and indirect users of the technology should inform developers in assessing what constitutes an appropriate use case.
|
| 32 |
+
- Further research is needed to attribute model generations to sources in the training data, especially in cases where the model copies answers from the training data.
|