Instructions to use QuantFactory/deepseek-coder-1.3B-kexer-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/deepseek-coder-1.3B-kexer-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/deepseek-coder-1.3B-kexer-GGUF", filename="deepseek-coder-1.3B-kexer.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/deepseek-coder-1.3B-kexer-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/deepseek-coder-1.3B-kexer-GGUF with Ollama:
ollama run hf.co/QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/deepseek-coder-1.3B-kexer-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/deepseek-coder-1.3B-kexer-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/deepseek-coder-1.3B-kexer-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/deepseek-coder-1.3B-kexer-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/deepseek-coder-1.3B-kexer-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/deepseek-coder-1.3B-kexer-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/deepseek-coder-1.3B-kexer-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.deepseek-coder-1.3B-kexer-GGUF-Q4_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- JetBrains/KExercises
|
| 5 |
-
base_model:
|
| 6 |
results:
|
| 7 |
- task:
|
| 8 |
type: text-generation
|
|
@@ -15,12 +17,18 @@ results:
|
|
| 15 |
value: 36.65
|
| 16 |
tags:
|
| 17 |
- code
|
| 18 |
-
|
| 19 |
---
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
| 22 |
This is quantized version of [JetBrains/deepseek-coder-1.3B-kexer](https://huggingface.co/JetBrains/deepseek-coder-1.3B-kexer) created using llama.cpp
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
# Kexer models
|
| 25 |
|
| 26 |
Kexer models are a collection of open-source generative text models fine-tuned on the [Kotlin Exercices](https://huggingface.co/datasets/JetBrains/KExercises) dataset.
|
|
@@ -28,6 +36,34 @@ This is a repository for the fine-tuned **Deepseek-coder-1.3b** model in the *Hu
|
|
| 28 |
|
| 29 |
# How to use
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
As with the base model, we can use FIM. To do this, the following format must be used:
|
| 32 |
```
|
| 33 |
'<|fim▁begin|>' + prefix + '<|fim▁hole|>' + suffix + '<|fim▁end|>'
|
|
@@ -64,4 +100,4 @@ Here are the results of our evaluation:
|
|
| 64 |
|
| 65 |
# Ethical considerations and limitations
|
| 66 |
|
| 67 |
-
Deepseek-coder-1.3B-Kexer is a new technology that carries risks with use. The testing conducted to date has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Deepseek-coder-1.3B-Kexer'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 Deepseek-coder-1.3B-Kexer, developers should perform safety testing and tuning tailored to their specific applications of the model.
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
+
|
| 4 |
license: apache-2.0
|
| 5 |
datasets:
|
| 6 |
- JetBrains/KExercises
|
| 7 |
+
base_model: deepseek-ai/deepseek-coder-1.3b-base
|
| 8 |
results:
|
| 9 |
- task:
|
| 10 |
type: text-generation
|
|
|
|
| 17 |
value: 36.65
|
| 18 |
tags:
|
| 19 |
- code
|
| 20 |
+
|
| 21 |
---
|
| 22 |
|
| 23 |
+
[](https://hf.co/QuantFactory)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
# QuantFactory/deepseek-coder-1.3B-kexer-GGUF
|
| 27 |
This is quantized version of [JetBrains/deepseek-coder-1.3B-kexer](https://huggingface.co/JetBrains/deepseek-coder-1.3B-kexer) created using llama.cpp
|
| 28 |
|
| 29 |
+
# Original Model Card
|
| 30 |
+
|
| 31 |
+
|
| 32 |
# Kexer models
|
| 33 |
|
| 34 |
Kexer models are a collection of open-source generative text models fine-tuned on the [Kotlin Exercices](https://huggingface.co/datasets/JetBrains/KExercises) dataset.
|
|
|
|
| 36 |
|
| 37 |
# How to use
|
| 38 |
|
| 39 |
+
```python
|
| 40 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 41 |
+
|
| 42 |
+
# Load pre-trained model and tokenizer
|
| 43 |
+
model_name = 'JetBrains/deepseek-coder-1.3B-kexer'
|
| 44 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 45 |
+
model = AutoModelForCausalLM.from_pretrained(model_name).to('cuda')
|
| 46 |
+
|
| 47 |
+
# Create and encode input
|
| 48 |
+
input_text = """\
|
| 49 |
+
This function takes an integer n and returns factorial of a number:
|
| 50 |
+
fun factorial(n: Int): Int {\
|
| 51 |
+
"""
|
| 52 |
+
input_ids = tokenizer.encode(
|
| 53 |
+
input_text, return_tensors='pt'
|
| 54 |
+
).to('cuda')
|
| 55 |
+
|
| 56 |
+
# Generate
|
| 57 |
+
output = model.generate(
|
| 58 |
+
input_ids, max_length=60, num_return_sequences=1,
|
| 59 |
+
early_stopping=True, pad_token_id=tokenizer.eos_token_id,
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
+
# Decode output
|
| 63 |
+
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
| 64 |
+
print(generated_text)
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
As with the base model, we can use FIM. To do this, the following format must be used:
|
| 68 |
```
|
| 69 |
'<|fim▁begin|>' + prefix + '<|fim▁hole|>' + suffix + '<|fim▁end|>'
|
|
|
|
| 100 |
|
| 101 |
# Ethical considerations and limitations
|
| 102 |
|
| 103 |
+
Deepseek-coder-1.3B-Kexer is a new technology that carries risks with use. The testing conducted to date has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Deepseek-coder-1.3B-Kexer'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 Deepseek-coder-1.3B-Kexer, developers should perform safety testing and tuning tailored to their specific applications of the model.
|