Instructions to use stillerman/santacoder-ruby with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stillerman/santacoder-ruby with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stillerman/santacoder-ruby", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("stillerman/santacoder-ruby", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("stillerman/santacoder-ruby", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use stillerman/santacoder-ruby with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stillerman/santacoder-ruby" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stillerman/santacoder-ruby", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/stillerman/santacoder-ruby
- SGLang
How to use stillerman/santacoder-ruby 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 "stillerman/santacoder-ruby" \ --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": "stillerman/santacoder-ruby", "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 "stillerman/santacoder-ruby" \ --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": "stillerman/santacoder-ruby", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use stillerman/santacoder-ruby with Docker Model Runner:
docker model run hf.co/stillerman/santacoder-ruby
| ## Model | |
| This model is a fine-tuned version of [BigCode/SantaCoder](https://huggingface.co/bigcode/santacoder) on the Ruby portion of [The Stack](https://huggingface.co/datasets/bigcode/the-stack-dedup). | |
| ## Training | |
| This model was trained using character-level FIM with [this script](https://github.com/Stillerman/santacoder-finetuning) invoked like this | |
| ``` | |
| train.py --model_path=bigcode/santacoder --dataset_name=bigcode/the-stack-dedup \ | |
| --subset=data/ruby --data_column content --split=train \ | |
| --seq_length 2048 --max_steps 4000 --batch_size 3 \ | |
| --gradient_accumulation_steps 8 --learning_rate 5e-5 \ | |
| --num_warmup_steps 500 --eval_freq 1000 --save_freq 1000 \ | |
| --log_freq 1 --num_workers=12 --no_fp16 --streaming \ | |
| --fim_rate=0.5 --fim_spm_rate=0.5 | |
| ``` | |
| on a 40GB A100 for 48 hours. | |
| ## Performance | |
| [MultiPL-E](https://nuprl.github.io/MultiPL-E/) HumanEval Ruby | |
| - pass@1 = 0.10 | |
| - pass@10 = 0.14 |