Answers for LLM inference engineers

"__init__() got an unexpected keyword argument": the PEFT, TRL or Transformers release each argument needs

"X.__init__() got an unexpected keyword argument 'y'" means the installed library does not have y on that class: it is older than the release that added it, or newer than the release that removed it. For a LoRA adapter the cause is almost always an older PEFT: use_rslora needs PEFT 0.8.0, use_dora 0.9.0, layer_replication 0.10.0, lora_bias 0.14.0. For training scripts it is usually a removed name: evaluation_strategy is gone after Transformers 4.50.3 (write eval_strategy), and TRL's SFTTrainer stopped taking dataset_text_field and max_seq_length after TRL 0.12.2. Paste the error or the adapter's config below.

Published 2026-11-17 · PEFT 0.0.1 to 0.21.3 (39 releases) · TRL 0.2.0 to 1.18.0 (103) · Transformers 4.0.0 to 5.23.0 (215) · read from each release's source, nothing was run · dates are tag dates

Which release has this argument?

Paste a TypeError line, the contents of adapter_config.json, or a call such as SFTConfig(max_seq_length=512). Versions are optional; with them you get a yes or no for your install.

Runs in your browser; nothing is sent anywhere. Versions: pip show peft transformers trl. The lookup knows 59 PEFT config classes, 85 TRL config and trainer classes, and Transformers TrainingArguments, Seq2SeqTrainingArguments, Trainer and Seq2SeqTrainer.

What do the most common of these errors mean?

Error namesCauseFix
LoraConfig 'use_dora'The installed PEFT is older than 0.9.0. Usually the adapter was saved with a newer PEFT; the same error appears when your own code passes the option.pip install -U "peft>=0.9.0"
LoraConfig 'use_rslora'The installed PEFT is older than 0.8.0. Usually the adapter was saved with a newer PEFT; the same error appears when your own code passes the option.pip install -U "peft>=0.8.0"
LoraConfig 'layer_replication'The installed PEFT is older than 0.10.0. Usually the adapter was saved with a newer PEFT; the same error appears when your own code passes the option.pip install -U "peft>=0.10.0"
LoraConfig 'loftq_config'The installed PEFT is older than 0.7.0. Usually the adapter was saved with a newer PEFT; the same error appears when your own code passes the option.pip install -U "peft>=0.7.0"
LoraConfig 'lora_bias', 'eva_config', 'exclude_modules'The installed PEFT is older than 0.14.0. Usually the adapter was saved with a newer PEFT; the same error appears when your own code passes the option.pip install -U "peft>=0.14.0"
LoraConfig 'corda_config', 'trainable_token_indices'The installed PEFT is older than 0.15.0. Usually the adapter was saved with a newer PEFT; the same error appears when your own code passes the option.pip install -U "peft>=0.15.0"
LoraConfig 'alora_invocation_tokens', 'arrow_config', 'ensure_weight_tying'The installed PEFT is older than 0.18.0. Usually the adapter was saved with a newer PEFT; the same error appears when your own code passes the option.pip install -U "peft>=0.18.0"
TrainingArguments 'evaluation_strategy'Removed from Transformers in 4.51.0 (last accepted in 4.50.3).Write eval_strategy (from 4.41.0).
TrainingArguments 'eval_strategy'The installed Transformers is older than 4.41.0.Upgrade Transformers, or write evaluation_strategy on that old release.
SFTTrainer 'tokenizer'Renamed in TRL 0.12.0; the old name was a warned alias until 0.15.2 and is rejected from 0.16.0.Write processing_class.
SFTTrainer 'dataset_text_field', 'max_seq_length', 'packing'No longer trainer arguments from TRL 0.13.0 (last accepted in 0.12.2).Set them on SFTConfig and pass it as args.
SFTConfig 'max_seq_length'Removed from TRL in 0.20.0 (last accepted in 0.19.1).Write max_length (from 0.16.0).
Trainer 'tokenizer'Renamed in Transformers 4.46.0; a warned alias until 4.57.6, rejected from 5.0.0.Write processing_class.

Which PEFT release does each adapter_config.json key need?

A LoRA adapter loads without loss on any PEFT at or above the first release of its newest key. The table has every key LoraConfig has accepted (its own fields and those of its base classes), newest first; 42 are current in 0.21.3.

KeyFirst PEFT releaseStatus in 0.21.3
kasa_config0.21.0 2026-09-15current
monteclora_config0.20.0 2026-07-28current
velora_config0.20.0 2026-07-28current
lora_ga_config0.19.0 2026-04-14current
use_bdlora0.19.0 2026-04-14current
alora_invocation_tokens0.18.0 2025-11-13current
arrow_config0.18.0 2025-11-13current
ensure_weight_tying0.18.0 2025-11-13current
peft_version0.18.0 2025-11-13current
target_parameters0.17.0 2025-08-01current
qalora_group_size0.16.0 2025-07-03current
use_qalora0.16.0 2025-07-03current
corda_config0.15.0 2025-03-19current
trainable_token_indices0.15.0 2025-03-19current
eva_config0.14.0 2024-12-06current
exclude_modules0.14.0 2024-12-06current
lora_bias0.14.0 2024-12-06current
runtime_config0.12.0 2024-07-24current
layer_replication0.10.0 2024-03-21current
use_dora0.9.0 2024-02-28current
use_rslora0.8.0 2024-01-30current
loftq_config0.7.0 2023-12-06current
megatron_config0.7.0 2023-12-06current
megatron_core0.7.0 2023-12-06current
alpha_pattern0.6.0 2023-11-02current
rank_pattern0.6.0 2023-11-02current
auto_mapping0.4.0 2023-07-17current
layers_pattern0.4.0 2023-07-17current
layers_to_transform0.4.0 2023-07-17current
revision0.4.0 2023-07-17current
init_lora_weights0.3.0 2023-05-04current
base_model_name_or_path0.1.0 2023-02-10current
modules_to_save0.1.0 2023-02-10current
bias0.0.1 or earlier 2023-01-19current
enable_lora0.0.1 or earlier 2023-01-19removed after 0.2.0
fan_in_fan_out0.0.1 or earlier 2023-01-19current
inference_mode0.0.1 or earlier 2023-01-19current
lora_alpha0.0.1 or earlier 2023-01-19current
lora_dropout0.0.1 or earlier 2023-01-19current
merge_weights0.0.1 or earlier 2023-01-19removed after 0.2.0
peft_type0.0.1 or earlier 2023-01-19current
r0.0.1 or earlier 2023-01-19current
target_modules0.0.1 or earlier 2023-01-19current
task_type0.0.1 or earlier 2023-01-19current

From PEFT 0.18.0 the file also records the saving version in peft_version. The other 58 config classes (AdaLoRA, IA3, LoHa, LoKr, VeRA, OFT, prompt tuning and the rest) are in the lookup above but not in this table.

Why does the same adapter raise TypeError on one machine and only a warning on another?

PEFT changed what it does with unknown keys in 0.14.0. Up to 0.13.2, loading a config with a key the installed PEFT does not know fails with TypeError: LoraConfig.__init__() got an unexpected keyword argument. From 0.14.0 the loader catches that error, removes the unknown keys and continues with a warning. PEFT 0.14.0 loading an adapter saved with 0.15.0 prints:

UserWarning: Unexpected keyword arguments ['corda_config', 'trainable_token_indices'] for class LoraConfig, these are ignored. This probably means that you're loading a configuration file that was saved using a higher version of the library and additional parameters have been introduced since. It is highly recommended to upgrade the PEFT version before continuing (e.g. by running `pip install -U peft`).

The warning is easy to miss, and the adapter then runs without the dropped settings. That is harmless when every dropped key held its default and wrong when one did not, for example a config saved with a newer variant switched on. Constructing a config in your own code, LoraConfig(use_dora=True), still raises TypeError on every release that lacks the argument; only loading from a file is lenient.

Which TrainingArguments and Trainer arguments were removed from Transformers?

Transformers 5.0.0 removed most long-deprecated TrainingArguments names at once; a few went earlier or later. evaluation_strategy was last accepted in 4.50.3. Trainer(tokenizer=...) became processing_class in 4.46.0, stayed as a warned alias until 4.57.6 and is rejected from 5.0.0.

TrainingArguments argumentFromLast releaseGone inWhat to use
model_parallelv4.1.0v4.1.1v4.2.0–
xpu_backendv4.11.0v4.31.0v4.32.0–
sharded_ddpv4.1.0v4.34.1v4.35.0–
dispatch_batchesv4.32.0v4.50.3v4.51.0Pass it inside accelerator_config, e.g. accelerator_config={"split_batches": True} (from v4.38.0).
evaluation_strategyv4.0.0v4.50.3v4.51.0Rename it to eval_strategy (from v4.41.0).
split_batchesv4.35.0v4.50.3v4.51.0Pass it inside accelerator_config, e.g. accelerator_config={"split_batches": True} (from v4.38.0).
tp_sizev4.50.0v4.51.3v4.52.0–
use_ipexv4.20.0v4.56.2v4.57.0–
adafactorv4.2.0v4.57.6v5.0.0Use optim="adafactor" (optim from v4.16.0).
fp16_backendv4.1.0v4.57.6v5.0.0fp16_backend was first renamed to half_precision_backend (v4.13.0); v5.0.0 removed both. Delete it.
fp16_opt_levelv4.0.0v4.57.6v5.0.0–
fsdp_min_num_paramsv4.19.0v4.57.6v5.0.0Put it in fsdp_config (from v4.27.0).
fsdp_transformer_layer_cls_to_wrapv4.21.0v4.57.6v5.0.0Put it in fsdp_config (from v4.27.0).
half_precision_backendv4.13.0v4.57.6v5.0.0fp16_backend was first renamed to half_precision_backend (v4.13.0); v5.0.0 removed both. Delete it.
include_inputs_for_metricsv4.19.0v4.57.6v5.0.0Use include_for_metrics=["inputs"] (from v4.46.0).
include_tokens_per_secondv4.34.0v4.57.6v5.0.0–
jit_mode_evalv4.20.0v4.57.6v5.0.0–
mp_parametersv4.5.0v4.57.6v5.0.0–
no_cudav4.0.0v4.57.6v5.0.0Use use_cpu (from v4.32.0).
overwrite_output_dirv4.0.0v4.57.6v5.0.0–
past_indexv4.0.0v4.57.6v5.0.0–
per_gpu_eval_batch_sizev4.0.0v4.57.6v5.0.0Use per_device_train_batch_size / per_device_eval_batch_size.
per_gpu_train_batch_sizev4.0.0v4.57.6v5.0.0Use per_device_train_batch_size / per_device_eval_batch_size.
push_to_hub_model_idv4.8.0v4.57.6v5.0.0Use hub_model_id with the full repository name (from v4.11.0).
push_to_hub_organizationv4.8.0v4.57.6v5.0.0Use hub_model_id with the full repository name (from v4.11.0).
push_to_hub_tokenv4.8.0v4.57.6v5.0.0Use hub_token (from v4.11.0).
ray_scopev4.20.0v4.57.6v5.0.0–
save_safetensorsv4.28.0v4.57.6v5.0.0–
torchdynamov4.20.0v4.57.6v5.0.0Use torch_compile_backend (from v4.26.0).
tpu_metrics_debugv4.0.0v4.57.6v5.0.0–
tpu_num_coresv4.0.0v4.57.6v5.0.0–
use_legacy_prediction_loopv4.6.0v4.57.6v5.0.0–
use_mps_devicev4.22.0v4.57.6v5.0.0Delete it; the mps device is used automatically when available.
group_by_lengthv4.3.0v5.1.0v5.2.0Use train_sampling_strategy="group_by_length" (from v5.2.0).
logging_dirv4.0.0v5.14.1v5.15.0Set the environment variable TENSORBOARD_LOGGING_DIR instead.
warmup_ratiov4.4.0v5.14.1v5.15.0Use warmup_steps with a float below 1, which is read as a ratio of the total steps.
Trainer tokenizerv4.0.0v4.45.2 (alias until v4.57.6)v5.0.0Use processing_class (from v4.46.0).

"From" v4.0.0 means v4.0.0 or earlier; older releases were not read. Seq2SeqTrainingArguments inherits all of these.

Which SFTTrainer, SFTConfig and DPOConfig arguments did TRL remove?

TRL 0.13.0 removed the dataset and length arguments from the trainers; they are set on the config classes (which exist from 0.9.3), and several were renamed there later. An old fine-tuning script can therefore fail three times in a row on a current release: on tokenizer, then dataset_text_field, then max_seq_length.

ArgumentFromLast releaseGone inWhat to use
SFTTrainer chars_per_tokenv0.4.2v0.12.2v0.13.0–
SFTTrainer dataset_batch_sizev0.5.0v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer dataset_kwargsv0.7.5v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer dataset_num_procv0.5.0v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer dataset_text_fieldv0.4.2v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer eval_packingv0.8.0v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer infinitev0.4.2v0.12.2v0.13.0–
SFTTrainer max_seq_lengthv0.4.2v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer model_init_kwargsv0.7.3v0.12.2v0.13.0–
SFTTrainer neftune_noise_alphav0.7.3v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer num_of_sequencesv0.4.2v0.12.2v0.13.0–
SFTTrainer packingv0.4.2v0.12.2v0.13.0It is no longer a trainer argument. Set it on SFTConfig and pass that as args (SFTConfig exists from v0.9.3).
SFTTrainer model_initv0.4.2v0.14.0v0.15.0–
SFTTrainer tokenizerv0.4.2v0.11.4 (alias until v0.15.2)v0.16.0Use processing_class (from v0.12.0).
SFTConfig chars_per_tokenv0.9.3v0.17.0v0.18.0–
SFTConfig dataset_batch_sizev0.9.3v0.17.0v0.18.0–
SFTConfig num_of_sequencesv0.9.3v0.17.0v0.18.0–
SFTConfig use_ligerv0.10.1v0.17.0v0.18.0–
SFTConfig max_seq_lengthv0.9.3v0.19.1v0.20.0Rename it to max_length (from v0.16.0).
DPOConfig max_target_lengthv0.9.3v0.13.0v0.14.0It became max_completion_length (v0.11.0), which was removed after v0.28.0.
DPOConfig is_encoder_decoderv0.9.3v0.14.0v0.15.0–
DPOConfig use_num_logits_to_keepv0.13.0v0.16.1v0.17.0–
DPOConfig padding_valuev0.9.3v0.25.1v0.26.0–
DPOConfig use_liger_lossv0.19.0v0.27.2v0.28.0–
DPOConfig base_model_attribute_namev0.19.0v0.28.0v0.29.0–
DPOConfig force_use_ref_modelv0.9.3v0.28.0v0.29.0–
DPOConfig generate_during_evalv0.9.3v0.28.0v0.29.0–
DPOConfig label_pad_token_idv0.9.3v0.28.0v0.29.0–
DPOConfig max_completion_lengthv0.11.0v0.28.0v0.29.0Removed in v0.29.0. max_length still limits the whole tokenized sequence; filter or shorten long prompts in the dataset.
DPOConfig max_prompt_lengthv0.9.3v0.28.0v0.29.0Removed in v0.29.0. max_length still limits the whole tokenized sequence; filter or shorten long prompts in the dataset.
DPOConfig model_adapter_namev0.9.3v0.28.0v0.29.0–
DPOConfig ref_adapter_namev0.9.3v0.28.0v0.29.0–
DPOConfig ref_model_init_kwargsv0.9.3v0.28.0v0.29.0–
DPOConfig reference_freev0.9.3v0.28.0v0.29.0–
DPOConfig rpo_alphav0.9.3v0.28.0v0.29.0–
DPOConfig toolsv0.14.0v0.28.0v0.29.0–
DPOConfig use_logits_to_keepv0.15.0v0.28.0v0.29.0–

TRL configs extend TrainingArguments, so SFTConfig(evaluation_strategy=...) fails or works according to the installed Transformers, not TRL. Names that only moved to TRL's shared base config in v0.29.0 (bf16, logging_steps, gradient_checkpointing, lr_scheduler_kwargs) are still accepted and are not listed. GRPOConfig, DPOTrainer and the other 82 TRL classes are in the lookup.

How was this built?

What this page does not cover

Questions

What does "LoraConfig.__init__() got an unexpected keyword argument" mean?
The adapter was saved with a newer PEFT than the one loading it: its adapter_config.json has a key your PEFT does not know. Each key has a first release, for example use_rslora 0.8.0, use_dora 0.9.0, layer_replication 0.10.0, lora_bias 0.14.0 and alora_invocation_tokens 0.18.0. Install at least the release of the newest key in the file. PEFT 0.14.0 and later no longer raise this error on load; they warn and ignore the unknown keys.
Is it safe to delete the unknown key from adapter_config.json?
Only if the key holds its default value, so that removing it changes nothing. A key such as use_dora set to true describes how the weights were trained; deleting it, or loading with PEFT 0.14.0 or later where it is ignored with a warning, loads a different model than the one that was saved. Upgrading PEFT is the safe fix.
Why does TrainingArguments reject evaluation_strategy?
evaluation_strategy was renamed to eval_strategy in Transformers 4.41.0. The old name kept working with a warning until 4.50.3 and is gone from 4.51.0. Write eval_strategy.
Why does SFTTrainer reject tokenizer, dataset_text_field or max_seq_length?
TRL moved them. tokenizer became processing_class in TRL 0.12.0; the old name was accepted with a warning until 0.15.2. dataset_text_field, max_seq_length and packing stopped being SFTTrainer arguments after 0.12.2 and belong on SFTConfig. On SFTConfig, max_seq_length was renamed to max_length in 0.16.0 and removed after 0.19.1.
Why does Trainer reject tokenizer?
Transformers 4.46.0 renamed the Trainer argument tokenizer to processing_class. The old name was accepted with a deprecation warning through 4.57.6 and removed in 5.0.0.
How do I find which PEFT version saved an adapter?
From PEFT 0.18.0 the file adapter_config.json records it in the key peft_version. Older files do not say; the newest key in the file gives a lower bound, which the lookup on this page computes.

Related: minimum Transformers and vLLM version for a model architecture · removed vLLM arguments, environment variables and request fields · GGUF architecture lookup · "cannot import name ... from 'transformers'": the releases that have each name.

Sources