Downloads · 30 days
40
5% of all-time downloads
ethzanalytics/dolly-v2-7b-sharded
dolly-v2-7b-sharded is a text generation model from ethzanalytics. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
<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 Co…
Downloads · 30 days
40
5% of all-time downloads
All-time downloads
754
Public
Repo size
55.1 GB
Likes
1
Public
Click a slice to open those files.
.bin27.6 GB · 100%
From the Hugging Face model README
This is a sharded checkpoint (with ~4GB shards) of the databricks/dolly-v2-7b model. Refer to the original model for all details.
install transformers, accelerate, and bitsandbytes.
pip install -U -q transformers bitsandbytes accelerate
Load the model in 8bit, then run inference:
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",
)