shaltielshmid / dictalm2.0-instruct

  • Public
  • 115 runs
  • License

Input

Output

Run time and cost

This model runs on Nvidia A40 GPU hardware. Predictions typically complete within 134 seconds. The predict time for this model varies significantly based on the inputs.

Readme

The DictaLM-2.0-Instruct Large Language Model (LLM) is an instruct fine-tuned version of the DictaLM-2.0 generative model using a variety of conversation datasets.

For full details of this model please read our release blog post.

This is the instruct-tuned full-precision model designed for chat. You can try the model out on a live demo here.

You can view and access the full collection of base/instruct unquantized/quantized versions of DictaLM-2.0 here.

Instruction format

In order to leverage instruction fine-tuning, your prompt should be surrounded by [INST] and [/INST] tokens, followed by a line break. The very first instruction should begin with a begin of sentence id. The next instructions should not. The assistant generation will be ended by the end-of-sentence token id.

E.g.

text = """<s>[INST] איזה רוטב אהוב עליך? [/INST]
טוב, אני די מחבב כמה טיפות מיץ לימון סחוט טרי. זה מוסיף בדיוק את הכמות הנכונה של טעם חמצמץ לכל מה שאני מבשל במטבח!</s>[INST] האם יש לך מתכונים למיונז? [/INST]"

This format is available as a chat template via the apply_chat_template() method:

Using the API with replicate

from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("dicta-il/dictalm2.0-instruct")

messages = [
    {"role": "user", "content": "איזה רוטב אהוב עליך?"},
    {"role": "assistant", "content": "טוב, אני די מחבב כמה טיפות מיץ לימון סחוט טרי. זה מוסיף בדיוק את הכמות הנכונה של טעם חמצמץ לכל מה שאני מבשל במטבח!"},
    {"role": "user", "content": "האם יש לך מתכונים למיונז?"}
]

text = tokenizer.apply_chat_template(messages, tokenize=False)

# ... the rest of your code calling the API

Model Architecture

DictaLM-2.0-Instruct follows the Zephyr-7B-beta recipe for fine-tuning an instruct model, with an extended instruct dataset for Hebrew.

Limitations

The DictaLM 2.0 Instruct model is a demonstration that the base model can be fine-tuned to achieve compelling performance. It does not have any moderation mechanisms. We’re looking forward to engaging with the community on ways to make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.

Citation

If you use this model, please cite:

[Will be added soon]