Text Generation
Transformers
Safetensors
gemma2
Generated from Trainer
trl
hf_jobs
sft
text-generation-inference
Instructions to use KexuanShi/sft_gemma2_2b_code_layerdrop_p010 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KexuanShi/sft_gemma2_2b_code_layerdrop_p010 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KexuanShi/sft_gemma2_2b_code_layerdrop_p010")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KexuanShi/sft_gemma2_2b_code_layerdrop_p010") model = AutoModelForCausalLM.from_pretrained("KexuanShi/sft_gemma2_2b_code_layerdrop_p010", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KexuanShi/sft_gemma2_2b_code_layerdrop_p010 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KexuanShi/sft_gemma2_2b_code_layerdrop_p010" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KexuanShi/sft_gemma2_2b_code_layerdrop_p010", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KexuanShi/sft_gemma2_2b_code_layerdrop_p010
- SGLang
How to use KexuanShi/sft_gemma2_2b_code_layerdrop_p010 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 "KexuanShi/sft_gemma2_2b_code_layerdrop_p010" \ --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": "KexuanShi/sft_gemma2_2b_code_layerdrop_p010", "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 "KexuanShi/sft_gemma2_2b_code_layerdrop_p010" \ --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": "KexuanShi/sft_gemma2_2b_code_layerdrop_p010", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KexuanShi/sft_gemma2_2b_code_layerdrop_p010 with Docker Model Runner:
docker model run hf.co/KexuanShi/sft_gemma2_2b_code_layerdrop_p010
Commit History
-
Upload checkpoint-1701
Verified signature0541efe -
Upload checkpoint-1512
Verified signature3539a01 -
Upload checkpoint-1323
Verified signature4d3276e -
Upload checkpoint-1134
Verified signature08cd2ea -
Upload checkpoint-945
Verified signature543d08d -
Upload checkpoint-756
Verified signature1d0ac4c -
Upload checkpoint-567
Verified signatureab8138b -
Upload checkpoint-378
Verified signature3e712b3 -
Upload checkpoint-189
Verified signature921fbe2 -
Add trainer model card
Verified signature684e8c3 -
Upload final checkpoint
Verified signaturec40a29b -
initial commit
Verified signature25f0904