Text Generation
Transformers
Safetensors
code
gpt2
custom_code
Eval Results (legacy)
text-generation-inference
Run this model with HF Jobs
Run olivierdehaene/optimized-santacoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/olivierdehaene/optimized-santacoder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/olivierdehaene/optimized-santacoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/olivierdehaene/optimized-santacoder. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/olivierdehaene/optimized-santacoder. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use olivierdehaene/optimized-santacoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use olivierdehaene/optimized-santacoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="olivierdehaene/optimized-santacoder", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("olivierdehaene/optimized-santacoder", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("olivierdehaene/optimized-santacoder", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use olivierdehaene/optimized-santacoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "olivierdehaene/optimized-santacoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "olivierdehaene/optimized-santacoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/olivierdehaene/optimized-santacoder
- SGLang
How to use olivierdehaene/optimized-santacoder 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 "olivierdehaene/optimized-santacoder" \ --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": "olivierdehaene/optimized-santacoder", "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 "olivierdehaene/optimized-santacoder" \ --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": "olivierdehaene/optimized-santacoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use olivierdehaene/optimized-santacoder with Docker Model Runner:
docker model run hf.co/olivierdehaene/optimized-santacoder
OlivierDehaene commited on
Commit ·
691db44
1
Parent(s): 7d2ded6
update tokenizer
Browse filesFiles changed (5)
- README.md+14-7
- config.json-1
- special_tokens_map.json+9-1
- tokenizer.json+47-1
- tokenizer_config.json+5-5
167 unmodified lines16816917017117217317417517617717812 unmodified lines19119219319419519619726 unmodified lines22422522622722822923015 unmodified lines24624724824925025125225325425525632 unmodified lines289290291292167 unmodified linesverified: false---# SantaCoderPlay with the model on the [SantaCoder Space Demo](https://huggingface.co/spaces/bigcode/santacoder-demo).# Table of Contents12 unmodified lines- **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)- **Project Website:** [bigcode-project.org](www.bigcode-project.org)- **Paper:** [🎅SantaCoder: Don't reach for the stars!🌟](https://t.co/YV3pzUbYOr)- **Point of Contact:** [contact@bigcode-project.org](mailto:contact@bigcode-project.org)- **Languages:** Python, Java, and JavaScript26 unmodified lines# pip install -q transformersfrom transformers import AutoModelForCausalLM, AutoTokenizercheckpoint = "bigcode/santacoder"device = "cuda" # for GPU usage or "cpu" for CPU usagetokenizer = AutoTokenizer.from_pretrained(checkpoint)15 unmodified lines```### Load other checkpointsWe upload the checkpoint of each experiment to a seperate branch as well as the intermediate checkpoints as commits on the branches. You can load them with the `revision` flag:```pythonmodel = AutoModelForCausalLM.from_pretrained("bigcode/santacoder",revision="no-fim", # name of branch or commit hashtrust_remote_code=True)32 unmodified linesThe model is licenses under the CodeML Open RAIL-M v0.1 license. You can find the full license [here](https://huggingface.co/spaces/bigcode/license).# Citation**TODO**167 unmodified lines16816917017117217317417517617717812 unmodified lines19119219319419519619726 unmodified lines22422522622722822923015 unmodified lines24624724824925025125225325425525632 unmodified lines289290291292293294295296297298299167 unmodified linesverified: false---# Optimizd SantaCoderA up to 60% faster version of bigcode/santacoder.# Table of Contents12 unmodified lines- **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)- **Project Website:** [bigcode-project.org](www.bigcode-project.org)- **Paper:** [🎅SantaCoder: Don't reach for the stars!🌟](https://arxiv.org/abs/2301.03988)- **Point of Contact:** [contact@bigcode-project.org](mailto:contact@bigcode-project.org)- **Languages:** Python, Java, and JavaScript26 unmodified lines# pip install -q transformersfrom transformers import AutoModelForCausalLM, AutoTokenizercheckpoint = "olivierdehaene/optimized-santacoder"device = "cuda" # for GPU usage or "cpu" for CPU usagetokenizer = AutoTokenizer.from_pretrained(checkpoint)15 unmodified lines```### Load other checkpointsWe upload the checkpoint of each experiment to a separate branch as well as the intermediate checkpoints as commits on the branches. You can load them with the `revision` flag:```pythonmodel = AutoModelForCausalLM.from_pretrained("olivierdehaene/optimized-santacoder",revision="no-fim", # name of branch or commit hashtrust_remote_code=True)32 unmodified linesThe model is licenses under the CodeML Open RAIL-M v0.1 license. You can find the full license [here](https://huggingface.co/spaces/bigcode/license).# Citation```@article{allal2023santacoder,title={SantaCoder: don't reach for the stars!},author={Allal, Loubna Ben and Li, Raymond and Kocetkov, Denis and Mou, Chenghao and Akiki, Christopher and Ferrandis, Carlos Munoz and Muennighoff, Niklas and Mishra, Mayank and Gu, Alex and Dey, Manan and others},journal={arXiv preprint arXiv:2301.03988},year={2023}}```
12345{"_name_or_path": "bigcode/santacoder","activation_function": "gelu_fast","architectures": ["GPT2LMHeadCustomModel"1234{"activation_function": "gelu_fast","architectures": ["GPT2LMHeadCustomModel"
1{}123456789{"additional_special_tokens": ["<|endoftext|>","<fim-prefix>","<fim-middle>","<fim-suffix>","<fim-pad>"]}
1 unmodified line23456781 unmodified line"version": "1.0","truncation": null,"padding": null,"added_tokens": [],"normalizer": null,"pre_tokenizer": {"type": "Sequence",1 unmodified line234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253541 unmodified line"version": "1.0","truncation": null,"padding": null,"added_tokens": [{"id": 49152,"content": "<|endoftext|>","single_word": false,"lstrip": false,"rstrip": false,"normalized": false,"special": true},{"id": 49153,"content": "<fim-prefix>","single_word": false,"lstrip": false,"rstrip": false,"normalized": false,"special": true},{"id": 49154,"content": "<fim-middle>","single_word": false,"lstrip": false,"rstrip": false,"normalized": false,"special": true},{"id": 49155,"content": "<fim-suffix>","single_word": false,"lstrip": false,"rstrip": false,"normalized": false,"special": true},{"id": 49156,"content": "<fim-pad>","single_word": false,"lstrip": false,"rstrip": false,"normalized": false,"special": true}],"normalizer": null,"pre_tokenizer": {"type": "Sequence",
1234567{"name_or_path": "bigcode/digit-bytelevel-bpe-jss-v1.1-49152","special_tokens_map_file": "/Users/leandro/.cache/huggingface/hub/models--bigcode--digit-bytelevel-bpe-jss-v1.1-49152/snapshots/fa09b77949689a484afafc5f89534e6b6ba2c151/special_tokens_map.json","tokenizer_class": "PreTrainedTokenizerFast","vocab_size": 49152,"model_max_length": 2048}1234567{"errors": "replace","tokenizer_class": "GPT2TokenizerFast","bos_token": "<|endoftext|>","eos_token": "<|endoftext|>","model_max_length": 2048}
README.md+14-7
config.json-1
special_tokens_map.json+9-1
tokenizer.json+47-1
tokenizer_config.json+5-5