Instructions to use JetBrains/CodeLlama-7B-Kexer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JetBrains/CodeLlama-7B-Kexer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JetBrains/CodeLlama-7B-Kexer")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JetBrains/CodeLlama-7B-Kexer") model = AutoModelForCausalLM.from_pretrained("JetBrains/CodeLlama-7B-Kexer") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use JetBrains/CodeLlama-7B-Kexer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JetBrains/CodeLlama-7B-Kexer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JetBrains/CodeLlama-7B-Kexer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JetBrains/CodeLlama-7B-Kexer
- SGLang
How to use JetBrains/CodeLlama-7B-Kexer 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 "JetBrains/CodeLlama-7B-Kexer" \ --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": "JetBrains/CodeLlama-7B-Kexer", "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 "JetBrains/CodeLlama-7B-Kexer" \ --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": "JetBrains/CodeLlama-7B-Kexer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JetBrains/CodeLlama-7B-Kexer with Docker Model Runner:
docker model run hf.co/JetBrains/CodeLlama-7B-Kexer
Update README.md (#1)
Browse files- Update README.md (704093fb3d36ad12d970386311c3473ba65d0ca5)
Co-authored-by: Anton Shapkin <jdev8@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -10,6 +10,14 @@ This is CodeLlama model fine-tuned on Kotlin Exercices dataset.
|
|
| 10 |
|
| 11 |
The model was trained on one A100 GPU with following hyperparameters:
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Fine-tuning data
|
| 14 |
|
| 15 |
For this model we used 15K exmaples of Kotlin Exercices dataset. For more information about the dataset follow th link.
|
|
|
|
| 10 |
|
| 11 |
The model was trained on one A100 GPU with following hyperparameters:
|
| 12 |
|
| 13 |
+
| **Hyperparameter** | **Value** |
|
| 14 |
+
|:---------------------------:|:----------------------------------------:|
|
| 15 |
+
| `warmup` | 10% |
|
| 16 |
+
| `max_lr` | 1e-4 |
|
| 17 |
+
| `scheduler` | linear |
|
| 18 |
+
| `total_batch_size` | 256 (~130K tokens per step) |
|
| 19 |
+
|
| 20 |
+
|
| 21 |
# Fine-tuning data
|
| 22 |
|
| 23 |
For this model we used 15K exmaples of Kotlin Exercices dataset. For more information about the dataset follow th link.
|