CoolFace
Modelpublic

ethzanalytics/dolly-v2-7b-sharded

sourceHugging Facemitupdated 3y agoView on Hugging Face
1likes47downloads
Model Card

dolly-v2-7b: sharded checkpoint

<a href="https://colab.research.google.com/gist/pszemraj/6eb7ccce28ea6aa07b8ec86388ac010e/sharded-instruction-model-playground.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>

This is a sharded checkpoint (with ~4GB shards) of the databricks/dolly-v2-7b model. Refer to the original model for all details.

  • —this enables low-RAM loading, i.e. Colab :)

Basic Usage

install transformers, accelerate, and bitsandbytes.

bash
pip install -U -q transformers bitsandbytes accelerate

Load the model in 8bit, then run inference:

python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_name = "ethzanalytics/dolly-v2-7b-sharded"
tokenizer = AutoTokenizer.from_pretrained(model_name)

model = AutoModelForCausalLM.from_pretrained(
          model_name, load_in_8bit=True, device_map="auto",
        )