Text Generation
Transformers
PyTorch
English
gpt_bigcode
HumanEval
StarCoder
Eval Results (legacy)
text-generation-inference
Instructions to use jinaai/starcoder-1b-textbook with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinaai/starcoder-1b-textbook with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jinaai/starcoder-1b-textbook")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jinaai/starcoder-1b-textbook") model = AutoModelForCausalLM.from_pretrained("jinaai/starcoder-1b-textbook") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use jinaai/starcoder-1b-textbook with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jinaai/starcoder-1b-textbook" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jinaai/starcoder-1b-textbook", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jinaai/starcoder-1b-textbook
- SGLang
How to use jinaai/starcoder-1b-textbook 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 "jinaai/starcoder-1b-textbook" \ --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": "jinaai/starcoder-1b-textbook", "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 "jinaai/starcoder-1b-textbook" \ --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": "jinaai/starcoder-1b-textbook", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jinaai/starcoder-1b-textbook with Docker Model Runner:
docker model run hf.co/jinaai/starcoder-1b-textbook
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,7 +32,14 @@ That is an improvement of almost 12 points over the starcoder 1b baseline, almos
|
|
| 32 |
|
| 33 |
The results (on the human eval benchmark) are on par with other open-source models like StarCoderBase (30.4) StarCoder(33.6) CodeGen-16B-Mono(29.3) while the model being 15 times smaller.
|
| 34 |
|
| 35 |
-
It still underperforms compared to other models like CodeLLama (53%)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
## Disclaimer
|
|
@@ -43,3 +50,6 @@ It still underperforms compared to other models like CodeLLama (53%) or chat gpt
|
|
| 43 |
* This model has not been aligned with human preferences and therefore could potentially generate harmful content
|
| 44 |
* This model has been trained on a dataset generated by ChatGPT 3.5, and you should check the legal status of AI-generated content in your jurisdiction before using it. You should make sure that your usage complies with the OpenAI Terms of Use, in so far as legally applicable.
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
The results (on the human eval benchmark) are on par with other open-source models like StarCoderBase (30.4) StarCoder(33.6) CodeGen-16B-Mono(29.3) while the model being 15 times smaller.
|
| 34 |
|
| 35 |
+
It still underperforms compared to other models like CodeLLama (53%) chat gpt 4 (82) or wizard coder (73.2), but these model are more than 30 times bigger.
|
| 36 |
+
|
| 37 |
+
## Finetuning details
|
| 38 |
+
|
| 39 |
+
We did full parameter fine-tuning and used a Nvidia a40 for 12 hours using a batch size of 128 and a micro-batch size of 8.
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
To reproduce the training just follow the training instructions in our [open source codebase](https://github.com/jina-ai/textbook)
|
| 43 |
|
| 44 |
|
| 45 |
## Disclaimer
|
|
|
|
| 50 |
* This model has not been aligned with human preferences and therefore could potentially generate harmful content
|
| 51 |
* This model has been trained on a dataset generated by ChatGPT 3.5, and you should check the legal status of AI-generated content in your jurisdiction before using it. You should make sure that your usage complies with the OpenAI Terms of Use, in so far as legally applicable.
|
| 52 |
|
| 53 |
+
## Credits
|
| 54 |
+
|
| 55 |
+
This model was trained and released by [Jina.ai](https://jina.ai/)
|