huawei-cloud-msmodelslim-model-adapt

Pass

Audited by Gen Agent Trust Hub on Nov 18, 2026

Risk Level: SAFE
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/step2_run_quantization.py utilizes subprocess.run to call the msmodelslim command-line interface. This is a core functional requirement for performing model quantization. The command is constructed using a list of arguments, which is a secure practice that prevents shell injection vulnerabilities.
  • [DYNAMIC_EXECUTION]: Several scripts (scripts/step1_generate_test_model.py and scripts/step2_run_quantization.py) use the trust_remote_code=True parameter when interacting with the Hugging Face transformers library. This is a standard requirement in the AI ecosystem for loading custom model architectures that are not part of the core library. The documentation clearly outlines the workflow for adapting the user's own models.
  • [SAFE]: The skill follows security best practices, such as using weights_only=True in scripts/step3_verify_weights.py when loading PyTorch models to prevent arbitrary code execution during tensor deserialization.
  • [SAFE]: All external resource references (msModelSlim, Ascend NPU, ModelScope) are consistent with the vendor's (Huawei Cloud) ecosystem and intended use case. No suspicious external connections or data exfiltration patterns were detected.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 18, 2026, 04:03 AM