Skip to content

Instantly share code, notes, and snippets.

View maxmatical's full-sized avatar

Max Tian maxmatical

View GitHub Profile
import torch
import pandas as pd
from tqdm import tqdm
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "bigcode/starcoder2-7b_16k"
tokenizer = AutoTokenizer.from_pretrained(model_name, left_padding=True)
tokenizer.pad_token = tokenizer.eos_token