Kmer Tokenization Strategy
Collection
7 items • Updated
How to use suzuki-2001/BERT-K4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("fill-mask", model="suzuki-2001/BERT-K4") # Load model directly
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("suzuki-2001/BERT-K4")
model = AutoModelForMaskedLM.from_pretrained("suzuki-2001/BERT-K4", device_map="auto")