Update README.md
Browse files
README.md
CHANGED
@@ -23,3 +23,61 @@ The training process was managed using the robust framework provided by MosaicML
|
|
23 |
- attn_impl: flash
|
24 |
- Trained on 8 H100 GPU on GCP
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
- attn_impl: flash
|
24 |
- Trained on 8 H100 GPU on GCP
|
25 |
|
26 |
+
## Datasets
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
## How to Use
|
31 |
+
The basic use cases to generate text using this model are simple. Follow the below code to generate text using this model.
|
32 |
+
|
33 |
+
Install the following library before running the code:
|
34 |
+
|
35 |
+
```sh
|
36 |
+
pip install transformers
|
37 |
+
pip install einops
|
38 |
+
pip install accelerate
|
39 |
+
```
|
40 |
+
|
41 |
+
```py
|
42 |
+
import transformers
|
43 |
+
from transformers import pipeline
|
44 |
+
|
45 |
+
model_name = 'hishab/titulm-1b-enbn-v1'
|
46 |
+
|
47 |
+
config = transformers.AutoConfig.from_pretrained(model_name, trust_remote_code=True)
|
48 |
+
config.max_seq_len = 2048
|
49 |
+
|
50 |
+
model = transformers.AutoModelForCausalLM.from_pretrained(
|
51 |
+
model_name,
|
52 |
+
config=config,
|
53 |
+
trust_remote_code=True
|
54 |
+
)
|
55 |
+
|
56 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
|
57 |
+
|
58 |
+
pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='cuda:0')
|
59 |
+
# for Bangla
|
60 |
+
bn_output = pipe('আমি বাংলায় গান',
|
61 |
+
max_new_tokens=100,
|
62 |
+
do_sample=True,
|
63 |
+
use_cache=True)
|
64 |
+
|
65 |
+
print(bn_output)
|
66 |
+
# for English
|
67 |
+
en_output = pipe('Bangla language plays',
|
68 |
+
max_new_tokens=100,
|
69 |
+
do_sample=True,
|
70 |
+
use_cache=True)
|
71 |
+
|
72 |
+
print(en_output)
|
73 |
+
```
|
74 |
+
|
75 |
+
## Citation
|
76 |
+
```bash
|
77 |
+
@misc{hishab_2024_titulm_1b_enbn_v1,
|
78 |
+
author = {Hishab Technologies Ltd.},
|
79 |
+
title = {TituLM-1B-ENBN-V1},
|
80 |
+
year = {2024},
|
81 |
+
publisher = {HuggingFace Models},
|
82 |
+
howpublished = {https://huggingface.co/hishab/titulm-1b-enbn-v1},
|
83 |
+
}
|