Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
custom_code
text-generation-inference
Instructions to use Liu-Xiang/santacoder-finetuned-alanstack-ec2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Liu-Xiang/santacoder-finetuned-alanstack-ec2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Liu-Xiang/santacoder-finetuned-alanstack-ec2", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Liu-Xiang/santacoder-finetuned-alanstack-ec2", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Liu-Xiang/santacoder-finetuned-alanstack-ec2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Liu-Xiang/santacoder-finetuned-alanstack-ec2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Liu-Xiang/santacoder-finetuned-alanstack-ec2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Liu-Xiang/santacoder-finetuned-alanstack-ec2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Liu-Xiang/santacoder-finetuned-alanstack-ec2
- SGLang
How to use Liu-Xiang/santacoder-finetuned-alanstack-ec2 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 "Liu-Xiang/santacoder-finetuned-alanstack-ec2" \ --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": "Liu-Xiang/santacoder-finetuned-alanstack-ec2", "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 "Liu-Xiang/santacoder-finetuned-alanstack-ec2" \ --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": "Liu-Xiang/santacoder-finetuned-alanstack-ec2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Liu-Xiang/santacoder-finetuned-alanstack-ec2 with Docker Model Runner:
docker model run hf.co/Liu-Xiang/santacoder-finetuned-alanstack-ec2
Ctrl+K
- Mar22_04-29-03_llm-back-project-workbench-0
- Mar22_06-57-09_llm-back-project-workbench-0
- Mar22_13-11-04_llm-back-project-workbench-0
- Mar22_13-13-52_llm-back-project-workbench-0
- Mar22_13-14-24_llm-back-project-workbench-0
- Mar22_13-21-53_llm-back-project-workbench-0
- Mar22_14-01-11_llm-back-project-workbench-0
- Mar22_14-01-55_llm-back-project-workbench-0
- Mar22_14-03-16_llm-back-project-workbench-0
- Mar22_14-06-19_llm-back-project-workbench-0
- Mar22_14-07-42_llm-back-project-workbench-0
- Mar22_14-24-44_llm-back-project-workbench-0
- Mar23_01-49-22_llm-back-project-workbench-0
- Mar23_01-57-11_llm-back-project-workbench-0