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
Browse files
README.md
CHANGED
|
@@ -2,16 +2,17 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- JetBrains/KExercises
|
|
|
|
| 5 |
results:
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
tags:
|
| 16 |
- code
|
| 17 |
---
|
|
@@ -72,12 +73,12 @@ More details about finetuning can be found in the technical report
|
|
| 72 |
|
| 73 |
# Fine-tuning data
|
| 74 |
|
| 75 |
-
For this model we used 15K exmaples of Kotlin Exercices dataset
|
| 76 |
For more information about the dataset follow the link.
|
| 77 |
|
| 78 |
# Evaluation
|
| 79 |
|
| 80 |
-
To evaluate we used Kotlin Humaneval (more infromation here)
|
| 81 |
|
| 82 |
Fine-tuned model:
|
| 83 |
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- JetBrains/KExercises
|
| 5 |
+
base_model: meta-llama/CodeLlama-7b-hf
|
| 6 |
results:
|
| 7 |
+
- task:
|
| 8 |
+
type: text-generation
|
| 9 |
+
dataset:
|
| 10 |
+
name: MultiPL-HumanEval (Kotlin)
|
| 11 |
+
type: openai_humaneval
|
| 12 |
+
metrics:
|
| 13 |
+
- name: pass@1
|
| 14 |
+
type: pass@1
|
| 15 |
+
value: 42.24
|
| 16 |
tags:
|
| 17 |
- code
|
| 18 |
---
|
|
|
|
| 73 |
|
| 74 |
# Fine-tuning data
|
| 75 |
|
| 76 |
+
For this model we used 15K exmaples of [Kotlin Exercices dataset](https://huggingface.co/datasets/JetBrains/KExercises). Every example follows HumanEval like format. In total dataset contains about 3.5M tokens.
|
| 77 |
For more information about the dataset follow the link.
|
| 78 |
|
| 79 |
# Evaluation
|
| 80 |
|
| 81 |
+
To evaluate we used Kotlin Humaneval ([more infromation here](https://huggingface.co/datasets/JetBrains/Kotlin_HumanEval))
|
| 82 |
|
| 83 |
Fine-tuned model:
|
| 84 |
|