Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Text generation
Generated from Trainer
text-generation-inference
Instructions to use ljb0967/codeparrot-ds-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ljb0967/codeparrot-ds-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ljb0967/codeparrot-ds-2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ljb0967/codeparrot-ds-2") model = AutoModelForCausalLM.from_pretrained("ljb0967/codeparrot-ds-2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ljb0967/codeparrot-ds-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ljb0967/codeparrot-ds-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ljb0967/codeparrot-ds-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ljb0967/codeparrot-ds-2
- SGLang
How to use ljb0967/codeparrot-ds-2 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 "ljb0967/codeparrot-ds-2" \ --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": "ljb0967/codeparrot-ds-2", "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 "ljb0967/codeparrot-ds-2" \ --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": "ljb0967/codeparrot-ds-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ljb0967/codeparrot-ds-2 with Docker Model Runner:
docker model run hf.co/ljb0967/codeparrot-ds-2
Commit History
-
Training complete
Verified signature42a0f1e
-
Training in progress, step 65242
Verified signature1dfa558 -
Training in progress, step 65000
Verified signature2b5dd2c -
Training in progress, step 60000
Verified signaturec54eee5 -
Training in progress, step 55000
Verified signature73e4c71 -
Training in progress, step 50000
Verified signatured8779f1 -
Training in progress, step 45000
Verified signature55f5cdb -
Training in progress, step 40000
Verified signatureb9dd15e -
Training in progress, step 35000
Verified signature8617e3f -
Training in progress, step 30000
Verified signature161c2dd -
Training in progress, step 25000
Verified signaturecdfeb42 -
Training in progress, step 20000
Verified signaturef013703 -
Training in progress, step 15000
Verified signaturee880505 -
Training in progress, step 10000
Verified signature9c39faa
-
Training in progress, step 5000
Verified signaturef870840 -
initial commit
Verified signature61fa099