Files
LEANN/packages
aakash 9a9dc40f8f security: Enhance Hugging Face model loading security - resolves #136
BREAKING CHANGE: trust_remote_code now defaults to False for security

- Set trust_remote_code=False by default in HFChat class
- Add explicit trust_remote_code parameter to HFChat.__init__()
- Add security warning when trust_remote_code=True is used
- Update get_llm() function to support trust_remote_code parameter
- Update benchmark utilities (load_hf_model, load_vllm_model, load_qwen_vl_model)
- Add comprehensive documentation for security implications

Security Benefits:
- Prevents arbitrary code execution from compromised model repositories
- Requires explicit opt-in for models that need remote code execution
- Shows clear warnings when security is reduced
- Follows security-by-default principle

Migration Guide:
- Most users: No changes needed (more secure by default)
- Users with models requiring remote code: Add trust_remote_code=True explicitly
- Config users: Add 'trust_remote_code': true to LLM config if needed

Fixes #136
2025-10-07 01:24:44 -07:00
..
2025-09-19 17:03:55 -07:00
2025-09-16 20:45:22 +00:00
2025-09-24 11:19:04 -07:00
2025-08-14 14:39:45 -07:00
2025-07-27 02:22:54 -07:00