Text Generation
Transformers
PyTorch
gpt2
code_generation
R programming
sas
santacoder
custom_code
text-generation-inference
Instructions to use infinitylogesh/statscoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use infinitylogesh/statscoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="infinitylogesh/statscoder", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("infinitylogesh/statscoder", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("infinitylogesh/statscoder", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use infinitylogesh/statscoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "infinitylogesh/statscoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "infinitylogesh/statscoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/infinitylogesh/statscoder
- SGLang
How to use infinitylogesh/statscoder 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 "infinitylogesh/statscoder" \ --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": "infinitylogesh/statscoder", "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 "infinitylogesh/statscoder" \ --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": "infinitylogesh/statscoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use infinitylogesh/statscoder with Docker Model Runner:
docker model run hf.co/infinitylogesh/statscoder
Commit ·
a28e531
1
Parent(s): b7adda1
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
| 1 |
---
|
| 2 |
license: openrail
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: openrail
|
| 3 |
+
datasets:
|
| 4 |
+
- bigcode/the-stack-dedup
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- code_generation
|
| 8 |
+
- R programming
|
| 9 |
+
- sas
|
| 10 |
+
- santacoder
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
# Statscoder
|
| 14 |
+
|
| 15 |
+
This model is a fine-tuned version of [bigcode/santacoder](https://huggingface.co/bigcode/santacoder) on `R` and `SAS` language repositories in [the stack ](https://huggingface.co/datasets/bigcode/the-stack-dedup) dataset.
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
## Training procedure
|
| 19 |
+
|
| 20 |
+
The model was finetuned using the code adapted from [loubnabnl/santacoder-finetuning](https://github.com/loubnabnl/santacoder-finetuning). Adapted to handle multiple subsets of datasets and it is [here](https://github.com/infinitylogesh/santacoder-finetuning).
|
| 21 |
+
|
| 22 |
+
The following hyperparameters were used during training:
|
| 23 |
+
- learning_rate: 5e-05
|
| 24 |
+
- train_batch_size: 8
|
| 25 |
+
- eval_batch_size: 8
|
| 26 |
+
- seed: 42
|
| 27 |
+
- gradient_accumulation_steps: 4
|
| 28 |
+
- optimizer: adafactor
|
| 29 |
+
- lr_scheduler_type: cosine
|
| 30 |
+
- lr_scheduler_warmup_steps: 100
|
| 31 |
+
- training_steps: 1600
|
| 32 |
+
- seq_length: 1024
|
| 33 |
+
- no_fp16
|