Instructions to use Kai12341/codeparrot-ds-fast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kai12341/codeparrot-ds-fast with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kai12341/codeparrot-ds-fast")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Kai12341/codeparrot-ds-fast") model = AutoModelForCausalLM.from_pretrained("Kai12341/codeparrot-ds-fast", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Kai12341/codeparrot-ds-fast with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kai12341/codeparrot-ds-fast" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kai12341/codeparrot-ds-fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Kai12341/codeparrot-ds-fast
- SGLang
How to use Kai12341/codeparrot-ds-fast 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 "Kai12341/codeparrot-ds-fast" \ --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": "Kai12341/codeparrot-ds-fast", "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 "Kai12341/codeparrot-ds-fast" \ --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": "Kai12341/codeparrot-ds-fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Kai12341/codeparrot-ds-fast with Docker Model Runner:
docker model run hf.co/Kai12341/codeparrot-ds-fast
codeparrot-ds-fast
This model is a fine-tuned version of gpt2 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 3.7034
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0005
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- num_epochs: 1
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 5.0073 | 0.0533 | 200 | 5.1243 |
| 4.685 | 0.1067 | 400 | 4.8637 |
| 4.5059 | 0.16 | 600 | 4.6787 |
| 4.3095 | 0.2133 | 800 | 4.5581 |
| 4.1536 | 0.2667 | 1000 | 4.4384 |
| 4.0469 | 0.32 | 1200 | 4.3332 |
| 3.9417 | 0.3733 | 1400 | 4.2495 |
| 3.841 | 0.4267 | 1600 | 4.1737 |
| 3.72 | 0.48 | 1800 | 4.0918 |
| 3.6337 | 0.5333 | 2000 | 4.0258 |
| 3.5766 | 0.5867 | 2200 | 3.9505 |
| 3.5221 | 0.64 | 2400 | 3.8845 |
| 3.4027 | 0.6933 | 2600 | 3.8252 |
| 3.4128 | 0.7467 | 2800 | 3.7814 |
| 3.3485 | 0.8 | 3000 | 3.7483 |
| 3.3857 | 0.8533 | 3200 | 3.7230 |
| 3.2951 | 0.9067 | 3400 | 3.7100 |
| 3.3037 | 0.96 | 3600 | 3.7034 |
Framework versions
- Transformers 4.51.1
- Pytorch 2.5.1+cu124
- Datasets 3.5.0
- Tokenizers 0.21.0
- Downloads last month
- 21
Model tree for Kai12341/codeparrot-ds-fast
Base model
openai-community/gpt2