Instructions to use JetBrains/CodeLlama-7B-KStack with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JetBrains/CodeLlama-7B-KStack with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JetBrains/CodeLlama-7B-KStack")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JetBrains/CodeLlama-7B-KStack") model = AutoModelForCausalLM.from_pretrained("JetBrains/CodeLlama-7B-KStack") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use JetBrains/CodeLlama-7B-KStack with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JetBrains/CodeLlama-7B-KStack" # 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-KStack", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JetBrains/CodeLlama-7B-KStack
- SGLang
How to use JetBrains/CodeLlama-7B-KStack 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-KStack" \ --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-KStack", "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-KStack" \ --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-KStack", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JetBrains/CodeLlama-7B-KStack with Docker Model Runner:
docker model run hf.co/JetBrains/CodeLlama-7B-KStack
Update README.md (#3)
Browse files- Update README.md (4cb75db75e271b9bd2dea8da324f4293687bf169)
Co-authored-by: Mikhail Evtikhiev <Aspr@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -86,15 +86,15 @@ We clean the content of the remaining dataset entries according to the following
|
|
| 86 |
|
| 87 |
# Evaluation
|
| 88 |
|
| 89 |
-
To evaluate we used Kotlin Humaneval
|
| 90 |
|
| 91 |
Fine-tuned model:
|
| 92 |
|
| 93 |
| **Model name** | **Kotlin HumanEval Pass Rate** |
|
| 94 |
|:---------------------------:|:----------------------------------------:|
|
| 95 |
| `base model` | 26.09 |
|
| 96 |
-
| `fine-tuned model` | 29.19 |
|
| 97 |
|
| 98 |
# Ethical Considerations and Limitations
|
| 99 |
|
| 100 |
-
|
|
|
|
| 86 |
|
| 87 |
# Evaluation
|
| 88 |
|
| 89 |
+
To evaluate we used [Kotlin Humaneval](https://huggingface.co/datasets/JetBrains/Kotlin_HumanEval)
|
| 90 |
|
| 91 |
Fine-tuned model:
|
| 92 |
|
| 93 |
| **Model name** | **Kotlin HumanEval Pass Rate** |
|
| 94 |
|:---------------------------:|:----------------------------------------:|
|
| 95 |
| `base model` | 26.09 |
|
| 96 |
+
| `fine-tuned model` | **29.19** |
|
| 97 |
|
| 98 |
# Ethical Considerations and Limitations
|
| 99 |
|
| 100 |
+
CodeLlama-7B-KStack-full and its variants are a new technology that carries risks with use. The testing conducted to date could not cover all scenarios. For these reasons, as with all LLMs, CodeLlama-7B-KStack-full's potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. The model was fine-tuned on a specific data format (Kotlin tasks), and deviation from this format can also lead to inaccurate or undesirable responses to user queries. Therefore, before deploying any applications of CodeLlama-7B-KStack-full, developers should perform safety testing and tuning tailored to their specific applications of the model.
|