How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="kiri-ai/gpt2-large-quantized")
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("kiri-ai/gpt2-large-quantized")
model = AutoModelForCausalLM.from_pretrained("kiri-ai/gpt2-large-quantized", device_map="auto")
Quick Links

Pytorch int8 quantized version of gpt2-large

Usage

Download the .bin file locally. Load with:

Rest of the usage according to original instructions.

import torch

model = torch.load("path/to/pytorch_model_quantized.bin")
Downloads last month
13
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support