Upload folder using huggingface_hub
Browse files- .gitattributes +3 -0
- Kodify_Nano.gguf +3 -0
- Kodify_Nano_q4_k_s.gguf +3 -0
- Kodify_Nano_q8_0.gguf +3 -0
- README.md +106 -0
.gitattributes
CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
Kodify_Nano.gguf filter=lfs diff=lfs merge=lfs -text
|
37 |
+
Kodify_Nano_q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
38 |
+
Kodify_Nano_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
Kodify_Nano.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8b24bfe506b639b3d344e0a0397abee0e271ec606cb4402698fed53db30169f8
|
3 |
+
size 3093669120
|
Kodify_Nano_q4_k_s.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea4fd817a09aa78db97429688f092ee0af2d03655ae4207649ce820243aceed1
|
3 |
+
size 940312320
|
Kodify_Nano_q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d258ab956fc7ed8da7600ee16da820b16d799c4ac173b3d70abe20b440a635d
|
3 |
+
size 1646572800
|
README.md
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: ggml
|
3 |
+
language:
|
4 |
+
- ru
|
5 |
+
- en
|
6 |
+
pipeline_tag: text-generation
|
7 |
+
license: apache-2.0
|
8 |
+
license_name: apache-2.0
|
9 |
+
license_link: https://huggingface.co/MTSAIR/Kodify-Nano-GGUF/blob/main/Apache%20License%20MTS%20AI.docx
|
10 |
+
---
|
11 |
+
|
12 |
+
# Kodify-Nano-GGUF 🤖
|
13 |
+
|
14 |
+
Kodify-Nano-GGUF - 4-битная квантизированная GGUF версия модели [MTSAIR/Kodify-Nano](https://huggingface.co/MTSAIR/Kodify-Nano), оптимизированная для CPU-инференса. Легковесная LLM для задач разработки кода с минимальными ресурсами.
|
15 |
+
|
16 |
+
Kodify-Nano-GGUF - 4-bit quantized GGUF version of [MTSAIR/Kodify-Nano](https://huggingface.co/MTSAIR/Kodify-Nano), optimized for CPU inference. Lightweight LLM for code development tasks with minimal resource requirements.
|
17 |
+
|
18 |
+
## Download Models
|
19 |
+
|
20 |
+
Available quantization variants:
|
21 |
+
- Kodify_Nano_q4_k_s.gguf (balanced)
|
22 |
+
- Kodify_Nano_q8_0.gguf (high quality)
|
23 |
+
- Kodify_Nano.gguf (best quality, unquantized)
|
24 |
+
|
25 |
+
Download using huggingface_hub:
|
26 |
+
|
27 |
+
```bash
|
28 |
+
pip install huggingface-hub
|
29 |
+
python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='MTSAIR/Kodify-Nano-GGUF', filename='Kodify_Nano_q4_k_s.gguf', local_dir='./models')"
|
30 |
+
```
|
31 |
+
|
32 |
+
## Using with Ollama
|
33 |
+
|
34 |
+
1. Install Ollama:
|
35 |
+
https://ollama.com/download
|
36 |
+
|
37 |
+
2. Create Modelfile:
|
38 |
+
|
39 |
+
```
|
40 |
+
FROM ./models/Kodify_Nano_q4_k_s.gguf
|
41 |
+
PARAMETER temperature 0.4
|
42 |
+
PARAMETER top_p 0.8
|
43 |
+
PARAMETER num_ctx 8192
|
44 |
+
TEMPLATE """<s>[INST] {{ .System }} {{ .Prompt }} [/INST]"""
|
45 |
+
```
|
46 |
+
|
47 |
+
3. Create and run model:
|
48 |
+
ollama create kodify-nano -f Modelfile
|
49 |
+
ollama run kodify-nano "Write a Python function to check prime numbers"
|
50 |
+
|
51 |
+
## Python Integration
|
52 |
+
|
53 |
+
Install Ollama Python library:
|
54 |
+
|
55 |
+
```bash
|
56 |
+
pip install ollama
|
57 |
+
```
|
58 |
+
|
59 |
+
Example code:
|
60 |
+
|
61 |
+
```python
|
62 |
+
import ollama
|
63 |
+
|
64 |
+
response = ollama.generate(
|
65 |
+
model="kodify-nano",
|
66 |
+
prompt="Write a Python function to calculate factorial",
|
67 |
+
options={
|
68 |
+
"temperature": 0.4,
|
69 |
+
"top_p": 0.8,
|
70 |
+
"num_ctx": 8192
|
71 |
+
}
|
72 |
+
)
|
73 |
+
|
74 |
+
print(response['response'])
|
75 |
+
```
|
76 |
+
|
77 |
+
## Usage Examples
|
78 |
+
|
79 |
+
### Code Generation
|
80 |
+
|
81 |
+
```python
|
82 |
+
response = ollama.generate(
|
83 |
+
model="kodify-nano",
|
84 |
+
prompt="""<s>[INST]
|
85 |
+
Write a Python function that:
|
86 |
+
1. Accepts a list of numbers
|
87 |
+
2. Returns the median value
|
88 |
+
[/INST]""",
|
89 |
+
options={"max_tokens": 512}
|
90 |
+
)
|
91 |
+
|
92 |
+
### Code Refactoring
|
93 |
+
response = ollama.generate(
|
94 |
+
model="kodify-nano",
|
95 |
+
prompt="""<s>[INST]
|
96 |
+
Refactor this Python code:
|
97 |
+
|
98 |
+
def calc(a,b):
|
99 |
+
s = a + b
|
100 |
+
d = a - b
|
101 |
+
p = a * b
|
102 |
+
return s, d, p
|
103 |
+
[/INST]""",
|
104 |
+
options={"temperature": 0.3}
|
105 |
+
)
|
106 |
+
```
|