Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions calibration/step-1-prepare-calibration-dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def main(args):
padding_side="left",
use_fast=False,
)
# Llama4 models in Text Only mode fail with False if use_fast=False
if isinstance(tokenizer, bool):
raise ValueError("Tokenizer is a boolean")
except (OSError, ValueError, RuntimeError, ImportError):
tokenizer = transformers.AutoTokenizer.from_pretrained(
args.model,
Expand Down