Text Generation
Transformers
PyTorch
TensorBoard
code
gpt2
Generated from Trainer
custom_code
text-generation-inference
Instructions to use mrm8488/santacoder-finetuned-the-stack-swift with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrm8488/santacoder-finetuned-the-stack-swift with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mrm8488/santacoder-finetuned-the-stack-swift", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mrm8488/santacoder-finetuned-the-stack-swift", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("mrm8488/santacoder-finetuned-the-stack-swift", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mrm8488/santacoder-finetuned-the-stack-swift with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mrm8488/santacoder-finetuned-the-stack-swift" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mrm8488/santacoder-finetuned-the-stack-swift", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mrm8488/santacoder-finetuned-the-stack-swift
- SGLang
How to use mrm8488/santacoder-finetuned-the-stack-swift 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 "mrm8488/santacoder-finetuned-the-stack-swift" \ --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": "mrm8488/santacoder-finetuned-the-stack-swift", "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 "mrm8488/santacoder-finetuned-the-stack-swift" \ --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": "mrm8488/santacoder-finetuned-the-stack-swift", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mrm8488/santacoder-finetuned-the-stack-swift with Docker Model Runner:
docker model run hf.co/mrm8488/santacoder-finetuned-the-stack-swift
Commit History
-
Update README.md
d7394bd -
Update README.md
99b9470 -
Update config.json
5bed5c0 -
Create modeling_gpt2_mq.py
8038186 -
Create configuration_gpt2_mq.py
e429f6f -
Upload tokenizer
303b47f -
End of training
4b41fd4 -
Training in progress, step 9500
1c1903d -
Training in progress, step 8500
1d9a753 -
Training in progress, step 7500
49afe9a -
Training in progress, step 6500
e41f85e
-
Training in progress, step 5500
e46ff74 -
Training in progress, step 4500
11c2d2d -
Training in progress, step 3500
97ba2ae -
Training in progress, step 2500
0615394 -
Training in progress, step 1500
78d5d50 -
Training in progress, step 500
93258a9
-
initial commit
655a533