Update README.md
Browse files
README.md
CHANGED
@@ -1,36 +1,37 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
π© Contact: [email protected]
|
12 |
-
π GitHub Repository: MK-LLM
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
25 |
pip install transformers torch huggingface_hub
|
26 |
-
|
27 |
-
|
28 |
-
Copy
|
29 |
-
Edit
|
30 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
31 |
import torch
|
32 |
|
33 |
-
# Load
|
34 |
MODEL_NAME = "ainowmk/MK-LLM-Mistral"
|
35 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
36 |
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
|
@@ -39,37 +40,35 @@ model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
|
|
39 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
40 |
model.to(device)
|
41 |
|
42 |
-
#
|
43 |
input_text = "ΠΠ΄ΡΠ°Π²ΠΎ, ΠΊΠ°ΠΊΠΎ ΡΠΈ?"
|
44 |
inputs = tokenizer(input_text, return_tensors="pt").to(device)
|
45 |
outputs = model.generate(**inputs, max_length=100)
|
46 |
|
47 |
# Decode and print the result
|
|
|
48 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
|
49 |
π Model Files
|
50 |
File Name Description
|
51 |
-
pytorch_model.bin The fine-tuned weights
|
52 |
config.json Configuration for the model architecture
|
53 |
tokenizer.json Tokenizer used for the Macedonian language
|
54 |
README.md Documentation for the model
|
55 |
.gitattributes Git LFS tracking for large files
|
|
|
56 |
π Training Details
|
57 |
Dataset: Collected Macedonian texts (Wikipedia, news, government websites)
|
58 |
Training Compute: GPU-based training on NVIDIA A100
|
59 |
Training Time: Estimated XX hours
|
60 |
Fine-tuned using: Hugging Face Transformers & PyTorch
|
|
|
61 |
π Contributing
|
62 |
-
MK-LLM-Mistral is
|
63 |
|
64 |
Open issues on GitHub
|
65 |
Submit pull requests for improvements
|
66 |
Join discussions on Hugging Face Community
|
67 |
-
|
68 |
-
|
69 |
-
π License
|
70 |
-
This model is licensed under Apache 2.0.
|
71 |
-
You are free to use, distribute, and modify it, but attribution is required.
|
72 |
|
73 |
-
π Letβs build the future of Macedonian AI together! π²π°
|
74 |
-
π AI Now - Association for Artificial Intelligence in Macedonia
|
75 |
-
π© [email protected] | π www.ainow.mk
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
**MK-LLM-Mistral: Open Macedonian Language Model**
|
5 |
+
|
6 |
+
π About This Model
|
7 |
+
MK-LLM-Mistral is the **first Macedonian Large Language Model (LLM)**, trained using a fine-tuned version of **Mistral-7B**.
|
8 |
+
This project is developed by **AI Now - Association for Artificial Intelligence in Macedonia**.
|
9 |
+
|
10 |
+
π Website: [www.ainow.mk](https://www.ainow.mk)
|
11 |
+
π© Contact: [[email protected]](mailto:[email protected])
|
12 |
+
π GitHub Repository: [MK-LLM](https://github.com/AI-now-mk/MK-LLM)
|
13 |
+
|
14 |
+
---
|
15 |
+
|
16 |
+
## π Model Details
|
17 |
+
- Model Name: MK-LLM-Mistral
|
18 |
+
- Base Model: [Mistral-7B](https://huggingface.co/mistralai/Mistral-7B)
|
19 |
+
- Language: Macedonian π²π°
|
20 |
+
- Fine-tuned on: Wikipedia, news articles, government websites, Macedonian books
|
21 |
+
- Tasks: Chatbot, Text Completion, Q&A, Macedonian NLP
|
22 |
+
|
23 |
+
---
|
24 |
+
|
25 |
+
π How to Use This Model
|
26 |
+
### 1οΈβ£ Install Dependencies
|
27 |
+
```bash
|
28 |
pip install transformers torch huggingface_hub
|
29 |
+
|
30 |
+
2οΈβ£ Load the Model for Inference
|
|
|
|
|
31 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
32 |
import torch
|
33 |
|
34 |
+
# Load the fine-tuned model
|
35 |
MODEL_NAME = "ainowmk/MK-LLM-Mistral"
|
36 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
37 |
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
|
|
|
40 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
41 |
model.to(device)
|
42 |
|
43 |
+
# Example prompt in Macedonian
|
44 |
input_text = "ΠΠ΄ΡΠ°Π²ΠΎ, ΠΊΠ°ΠΊΠΎ ΡΠΈ?"
|
45 |
inputs = tokenizer(input_text, return_tensors="pt").to(device)
|
46 |
outputs = model.generate(**inputs, max_length=100)
|
47 |
|
48 |
# Decode and print the result
|
49 |
+
print("\nπ§ Model Output:")
|
50 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
51 |
+
|
52 |
π Model Files
|
53 |
File Name Description
|
54 |
+
pytorch_model.bin The fine-tuned model weights
|
55 |
config.json Configuration for the model architecture
|
56 |
tokenizer.json Tokenizer used for the Macedonian language
|
57 |
README.md Documentation for the model
|
58 |
.gitattributes Git LFS tracking for large files
|
59 |
+
|
60 |
π Training Details
|
61 |
Dataset: Collected Macedonian texts (Wikipedia, news, government websites)
|
62 |
Training Compute: GPU-based training on NVIDIA A100
|
63 |
Training Time: Estimated XX hours
|
64 |
Fine-tuned using: Hugging Face Transformers & PyTorch
|
65 |
+
|
66 |
π Contributing
|
67 |
+
MK-LLM-Mistral is open-source, and contributions are welcome! π―
|
68 |
|
69 |
Open issues on GitHub
|
70 |
Submit pull requests for improvements
|
71 |
Join discussions on Hugging Face Community
|
72 |
+
π© For collaboration, reach out at: [email protected]
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
π Letβs build the future of Macedonian AI together! π²π°
|
|
|
|