Downloads · 30 days
17
4% of all-time downloads
ethzanalytics/open_llama_13b-sharded-8bit
open_llama_13b-sharded-8bit 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 apache-2.0.
<a href="https://colab.research.google.com/gist/pszemraj/166ad661c6af1e024d4e2897621fc886/openllama13b-sharded-8bit-example.ipynb" <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab…
Downloads · 30 days
17
4% of all-time downloads
All-time downloads
408
Public
Repo size
13.4 GB
Likes
0
Public
Click a slice to open those files.
.bin13.4 GB · 100%
From the Hugging Face model README
This is open_llama_13b sharded into 2 GB shards, and in 8-bit precision using bitsandbytes==0.38.0. Please refer to the original model card for details.
pip install -U -q sentencepiece transformers accelerate bitsandbytes
load the model and tokenizer:
import torch
from transformers import LlamaTokenizer, LlamaForCausalLM
model_name = "ethzanalytics/open_llama_13b-sharded-8bit"
tokenizer = LlamaTokenizer.from_pretrained(model_name, use_fast=False)
model = LlamaForCausalLM.from_pretrained(
model_name,
load_in_8bit=True,
device_map="auto",
)