Text Generation
Transformers
Safetensors
gemma2
Generated from Trainer
sft
trl
hf_jobs
text-generation-inference
Instructions to use KexuanShi/sft_gemma2_2b_code_layerres_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_layerres_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_layerres_p010")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KexuanShi/sft_gemma2_2b_code_layerres_p010") model = AutoModelForCausalLM.from_pretrained("KexuanShi/sft_gemma2_2b_code_layerres_p010", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KexuanShi/sft_gemma2_2b_code_layerres_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_layerres_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_layerres_p010", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KexuanShi/sft_gemma2_2b_code_layerres_p010
- SGLang
How to use KexuanShi/sft_gemma2_2b_code_layerres_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_layerres_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_layerres_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_layerres_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_layerres_p010", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KexuanShi/sft_gemma2_2b_code_layerres_p010 with Docker Model Runner:
docker model run hf.co/KexuanShi/sft_gemma2_2b_code_layerres_p010
Commit History
26 days ago
-
Upload checkpoint-1701
Verified signature1e317c5 -
Upload checkpoint-1512
Verified signature371a2bd -
Upload checkpoint-1323
Verified signature463ee56 -
Upload checkpoint-1134
Verified signature4843841 -
Upload checkpoint-945
Verified signature3c5a21b -
Upload checkpoint-756
Verified signature6fbe2a6 -
Upload checkpoint-567
Verified signaturefd896a5 -
Upload checkpoint-378
Verified signaturefb6b3d2 -
Upload checkpoint-189
Verified signature78128e1 -
Add trainer model card
Verified signature5d8ee1d -
Upload final
Verified signature22f77ec -
initial commit
Verified signatureccd7610