Instructions to use yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm") model = AutoModelForCausalLM.from_pretrained("yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm
- SGLang
How to use yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm 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 "yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm" \ --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": "yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm", "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 "yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm" \ --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": "yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm with Docker Model Runner:
docker model run hf.co/yanghuattt/microsoft_CodeGPT-small-java_1_ft_clm
Commit History
-
Upload model
Verified signature5f0611e -
Upload tokenizer
Verified signature4325df4 -
Upload model
Verified signaturea1c0343
-
Upload model
Verified signature5416ade -
Upload model
Verified signature67c92ff -
Upload model
Verified signaturefd1ec35 -
Upload model
Verified signaturec8ba983 -
Upload model
Verified signaturef9f41f9 -
Upload model
Verified signature738395b -
Upload model
Verified signatureac6d346
-
Training step 1000, Perplexity: 3.7212
Verified signaturecfb24aa -
Training step 500, Perplexity: 3.7597
Verified signature39e7058 -
Training step 1000, Perplexity: 3.7212
Verified signature16792dc -
Training step 500, Perplexity: 3.7597
Verified signaturee819c6b
-
Upload model
Verified signaturebdf0aef -
Upload tokenizer
Verified signature5cc24c6 -
Upload model
Verified signature50d062e -
End of training
Verified signatured1ad432 -
Model save
Verified signaturedda140a -
Training in progress, step 4975
Verified signaturea4c2027 -
Training in progress, step 4500
Verified signatured3b305c -
Training in progress, step 4000
Verified signaturec0746c7 -
Training in progress, step 3500
Verified signature94f8033 -
Training in progress, step 3000
Verified signature0afd380 -
Training in progress, step 2500
Verified signature0396046 -
Training in progress, step 2000
Verified signature96ba782 -
Training in progress, step 1500
Verified signature5ea9ddb -
Training in progress, step 1000
Verified signature89c0255 -
Training in progress, step 500
Verified signature3790e19 -
initial commit
Verified signature52a4e81