Instructions to use yanghuattt/microsoft_CodeGPT-small-java_0_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_0_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_0_ft_clm")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yanghuattt/microsoft_CodeGPT-small-java_0_ft_clm") model = AutoModelForCausalLM.from_pretrained("yanghuattt/microsoft_CodeGPT-small-java_0_ft_clm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yanghuattt/microsoft_CodeGPT-small-java_0_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_0_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_0_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_0_ft_clm
- SGLang
How to use yanghuattt/microsoft_CodeGPT-small-java_0_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_0_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_0_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_0_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_0_ft_clm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yanghuattt/microsoft_CodeGPT-small-java_0_ft_clm with Docker Model Runner:
docker model run hf.co/yanghuattt/microsoft_CodeGPT-small-java_0_ft_clm
Commit History
-
Upload model
Verified signature2e56d01
-
Upload model
Verified signature3504806 -
Upload model
Verified signature141e693 -
Upload tokenizer
Verified signaturea29016f -
Upload model
Verified signature8a1c651
-
Upload model
Verified signature9df6e9c -
Upload model
Verified signature27f173f -
Upload model
Verified signature0c67ecf -
Upload model
Verified signature846f525 -
Upload model
Verified signature1d34b10 -
Upload model
Verified signaturebe847ce -
Upload model
Verified signature34a50d3 -
Upload model
Verified signature77496f6 -
Upload model
Verified signature7e80dfe -
Upload model
Verified signature5e7113b -
Upload model
Verified signaturea7fb95e -
Upload tokenizer
Verified signature903769f -
Upload model
Verified signaturec619ad8 -
Upload tokenizer
Verified signature8c920a6 -
Upload model
Verified signature07893b6
-
Training step 1500, Perplexity: 3.3223
Verified signaturea4cc49d -
Training step 1000, Perplexity: 3.3335
Verified signaturef3269f8 -
Training step 500, Perplexity: 3.3653
Verified signaturee25f866 -
Training step 1500, Perplexity: 3.3223
Verified signature8619dc9 -
Training step 1000, Perplexity: 3.3335
Verified signature45c888a -
Training step 500, Perplexity: 3.3653
Verified signature380b3df
-
Upload model
Verified signature91d5261 -
Upload model
Verified signature67985f0 -
Upload model
Verified signature8910b15 -
Upload model
Verified signature80583a4 -
Upload model
Verified signature2bf38f6 -
Upload model
Verified signature44ec6ae -
Upload model
Verified signature3749100 -
Upload model
Verified signaturedb2652f -
Upload tokenizer
Verified signaturebf2a159 -
Upload model
Verified signature09a4f73 -
Model save
Verified signature1f37b43 -
Training in progress, step 3210
Verified signature32d0df4 -
Training in progress, step 3000
Verified signature8b41772 -
Training in progress, step 2500
Verified signaturea7052f4 -
Training in progress, step 2000
Verified signature01bb061 -
Training in progress, step 1500
Verified signature3a5abcc -
Training in progress, step 1000
Verified signature280bcba -
Training in progress, step 500
Verified signature3280678 -
initial commit
Verified signaturefe1406a