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.
|