Views
No views yet
DictaLM-2.0 here.1from transformers import pipeline
2
3# This loads the model onto the GPU in bfloat16 precision
4model = pipeline('text-generation', 'dicta-il/dictalm2.0-AWQ', device_map='cuda')
5
6# Sample few shot examples
7prompt = """
8עבר: הלכתי
9עתיד: אלך
10
11עבר: שמרתי
12עתיד: אשמור
13
14עבר: שמעתי
15עתיד: אשמע
16
17עבר: הבנתי
18עתיד:
19"""
20
21print(model(prompt.strip(), do_sample=False, max_new_tokens=4, stop_sequence='\n'))
22# [{'generated_text': 'עבר: הלכתי\nעתיד: אלך\n\nעבר: שמרתי\nעתיד: אשמור\n\nעבר: שמעתי\nעתיד: אשמע\n\nעבר: הבנתי\nעתיד: אבין\n\n'}]1@misc{shmidman2024adaptingllmshebrewunveiling,
2 title={Adapting LLMs to Hebrew: Unveiling DictaLM 2.0 with Enhanced Vocabulary and Instruction Capabilities},
3 author={Shaltiel Shmidman and Avi Shmidman and Amir DN Cohen and Moshe Koppel},
4 year={2024},
5 eprint={2407.07080},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2407.07080},
9}