[KongchangAI]
Concept

trust_remote_code

A safety parameter in the Hugging Face Transformers library that permits loading custom modeling code from a model repository, used to support models with non-standard architectures.

Timeline (last 90 days)

Oct 13

When loading the ZY-S1 model, trust_remote_code=True must be set, and token_type_ids must be passed in — 1 for prompt tokens and 0 for generated tokens.

Unverified50%
Oct 13

trust_remote_code=True is a security mechanism in the Hugging Face Transformers library: by default from_pretrained only loads the library's built-in standard model classes; when the model author provides custom modeling code, the user must explicitly pass this parameter to download and execute the .py files in the repository.

Unverified50%
Oct 12

Combining remote package resolution ambiguity with unsafe loading and trust_remote_code allows code from the selected repository to be executed.

Unverified50%
Sep 11

The trust_remote_code mechanism allows custom Python code from remote repositories to be executed when loading processors or tokenizers, which carries a security risk of being exploited by malicious models to execute arbitrary code.

Unverified50%

All Facts (4)

Source Articles