README and LICENSE
Browse files- LICENSE.md +21 -0
- README.md +98 -0
LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Tarik Dedić
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- llm
|
| 4 |
+
- language-model
|
| 5 |
+
- causal-lm
|
| 6 |
+
- bosnian
|
| 7 |
+
- croatian
|
| 8 |
+
- serbian
|
| 9 |
+
- bcs
|
| 10 |
+
- balkan-languages
|
| 11 |
+
- llama
|
| 12 |
+
- 779m
|
| 13 |
+
- base-model
|
| 14 |
+
- undertrained
|
| 15 |
+
- multilingual
|
| 16 |
+
language:
|
| 17 |
+
- bs
|
| 18 |
+
- hr
|
| 19 |
+
- sr
|
| 20 |
+
- en
|
| 21 |
+
license: mit
|
| 22 |
+
base_model: none
|
| 23 |
+
pipeline_tag: text-generation
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## predBor-v0.5
|
| 27 |
+
|
| 28 |
+
A preview of predBor, a small language model built from the ground up to natively understand Bosnian/Croatian/Serbian while supporting English.
|
| 29 |
+
|
| 30 |
+
**NOTE THAT THIS IS A BASE LANGUAGE MODEL. IT DOES NOT POSSESS THE ABILITY TO CHAT OR ANSWER QUESTIONS, ONLY CONTINUE TEXT.**
|
| 31 |
+
|
| 32 |
+
### Architecture Details
|
| 33 |
+
- **Type:** Causal Language Model
|
| 34 |
+
- **Parameters:** 779M
|
| 35 |
+
- **Architecture:** LLaMA
|
| 36 |
+
- **Context window:** 4096 tokens
|
| 37 |
+
- **Tokenizer:** Bor-v2
|
| 38 |
+
- **Dataset:** Bor-CORPUS-22B
|
| 39 |
+
|
| 40 |
+
This repo contains an undertrained checkpoint of the predBor language model which has only seen 11B tokens of data, yet still shows promising performance on all four supported languages.
|
| 41 |
+
|
| 42 |
+
### Emerging Capabilities
|
| 43 |
+
Even undertrained, predBor is starting to display some emerging skills in different fields, only serving to show the quality of its data and architecture. Notable achievements:
|
| 44 |
+
|
| 45 |
+
- **Translation:** The model has developed semantic mapping between BCS and English, being able to translate words (and sometimes phrases) with the right prompt.
|
| 46 |
+
- **Fact memorization:** The model has seen enough data to show surprising amounts of general world knowledge, such as viable medical advice, historical facts, recipes with logically correct steps and ingredients, and the capital city to every country there is... for some reason.
|
| 47 |
+
- **Question answering:** When prompted with a question and the beginning of an answer (e.g., "The meaning of life is"), it delivers a somewhat viable answer depending on the topic. The model's current state impacts its overall intelligence, meaning some answers will be hallucinated. This does not represent the final state of the project.
|
| 48 |
+
- **And more.** Feel free to download and test the model yourself.
|
| 49 |
+
|
| 50 |
+
### How to run
|
| 51 |
+
|
| 52 |
+
#### Hugging Face Transformers (for quick testing)
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
pip install transformers torch accelerate
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
Then,
|
| 59 |
+
|
| 60 |
+
```python
|
| 61 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 62 |
+
import torch
|
| 63 |
+
|
| 64 |
+
model_name = "absltnull/predBor-v0.5"
|
| 65 |
+
|
| 66 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 67 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 68 |
+
model_name,
|
| 69 |
+
torch_dtype=torch.bfloat16,
|
| 70 |
+
device_map="auto",
|
| 71 |
+
trust_remote_code=True
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
prompt = "Glavni grad Bosne i Hercegovine je"
|
| 75 |
+
|
| 76 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 77 |
+
|
| 78 |
+
output = model.generate(
|
| 79 |
+
**inputs,
|
| 80 |
+
max_new_tokens=256,
|
| 81 |
+
temperature=0.7,
|
| 82 |
+
top_p=0.9,
|
| 83 |
+
repetition_penalty=1.1,
|
| 84 |
+
do_sample=True
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
**System requirements**
|
| 91 |
+
- 3.2 GB storage (full model)
|
| 92 |
+
- 2+ GB VRAM/RAM for full bf16/fp16
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
The model is deliberately released in this raw base state so the community can see the real quality of the training data before any continued pretraining, post-training or alignment is applied.
|
| 97 |
+
|
| 98 |
+
Feel free to fine-tune. The finished version of predBor will be out soon.
|