Fix Duplicate trust_remote_code in pipeline (#4369)

### Fix issue with duplicate specification of `trust_remote_code` in
HuggingFacePipeline

Fixes # 4351
parallel_dir_loader
Zander Chase 1 year ago committed by GitHub
parent 6fbdb9ce51
commit 9231143f91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -115,7 +115,10 @@ class HuggingFacePipeline(LLM):
"can be a positive integer associated with CUDA device id.",
cuda_device_count,
)
if "trust_remote_code" in _model_kwargs:
_model_kwargs = {
k: v for k, v in _model_kwargs.items() if k != "trust_remote_code"
}
pipeline = hf_pipeline(
task=task,
model=model,

Loading…
Cancel
Save