diff --git a/ML-BOM/2.0/en/0x01-Frontispiece.md b/ML-BOM/2.0/en/0x01-Frontispiece.md new file mode 100644 index 00000000..91170a5e --- /dev/null +++ b/ML-BOM/2.0/en/0x01-Frontispiece.md @@ -0,0 +1,36 @@ +
+# Frontispiece + +## About the Guide +CycloneDX is a modern standard for the software supply chain. It has been ratified as [ECMA-424](https://ecma-international.org/publications-and-standards/standards/ecma-424/) by Ecma International. + +The content in this guide results from the work of the CycloneDX AI/ML (Artificial Intelligence/Machine Learning) Working Group with continuous community feedback and input from leading experts in the field. This guide would not be possible without valuable feedback from peers at the CycloneDX Industry Working Group (IWG), the CycloneDX Core Working Group (CWG), the many CycloneDX Feature Working Groups (FWG), Ecma International Technical Committee 54, and a global network of contributors and supporters. + +## Copyright and License + + + +Copyright © 2026 The OWASP Foundation. + +This document is released under the [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). For any reuse or distribution, you must make clear to others the license terms of this work. + + + +First Edition (Revision 1), 10 June 2026 + + + +| Version | Changes | Updated On | Updated By | +|---------------|-----------------|------------|-------------------------------| +| First Edition, r1 | Updates to appendices and examples| 2026-06-10 | CycloneDX AI/ML Working Group | +| First Edition | Initial Release | 2026-03-03 | CycloneDX AI/ML Working Group | + + diff --git a/ML-BOM/2.0/en/0x02-Preface.md b/ML-BOM/2.0/en/0x02-Preface.md new file mode 100644 index 00000000..db4c794f --- /dev/null +++ b/ML-BOM/2.0/en/0x02-Preface.md @@ -0,0 +1,20 @@ +# Preface + +Welcome to the Authoritative Guide series by the OWASP Foundation and OWASP CycloneDX. In this series, we aim to provide comprehensive insights and practical guidance, ensuring that security professionals, developers, and organizations alike have access to the latest best practices and methodologies. + +At the heart of the OWASP Foundation lies a commitment to inclusivity and openness. We firmly believe that everyone deserves a seat at the table when shaping the future of cybersecurity standards. Our collaborative model fosters an environment where diverse perspectives converge to drive innovation and excellence. + +In line with this ethos, the OWASP Foundation has partnered with Ecma International to create an inclusive, community-driven ecosystem for the development of security standards. This collaboration empowers individuals to contribute their expertise and insights, ensuring that standards like CycloneDX reflect the collective wisdom of the global cybersecurity community. + +One standout example of this model is OWASP CycloneDX, which has been ratified as an Ecma International standard and is now known as ECMA-424. By leveraging the strengths of both organizations, CycloneDX serves as a cornerstone of security best practices, providing organizations with a universal standard for software and system transparency. + +As you embark on your journey through this Authoritative Guide, we encourage you to engage actively with the content and join us in shaping the future of cybersecurity standards. Together, we can build a safer and more resilient digital world for all. + +--- + +Andrew van der Stock +Executive Director, OWASP Foundation + + diff --git a/ML-BOM/2.0/en/0x03-History.md b/ML-BOM/2.0/en/0x03-History.md new file mode 100644 index 00000000..df3bb9b3 --- /dev/null +++ b/ML-BOM/2.0/en/0x03-History.md @@ -0,0 +1,7 @@ +# The Innovative History of OWASP CycloneDX + +OWASP CycloneDX has carved a legacy steeped in innovation, collaboration, and a commitment to openness. OWASP +continues to advance software and system transparency standards, prioritizing capabilities that facilitate risk reduction. + + +_Source: [https://tc54.org/history](https://tc54.org/history)_ diff --git a/ML-BOM/2.0/en/0x04-Acknowledgements.md b/ML-BOM/2.0/en/0x04-Acknowledgements.md new file mode 100644 index 00000000..54b1f90f --- /dev/null +++ b/ML-BOM/2.0/en/0x04-Acknowledgements.md @@ -0,0 +1,42 @@ +# Acknowledgements + +The CycloneDX Authoritative Guide to AI/ML-BOM represents the collective effort and expertise of many individuals and organizations committed to advancing transparency and security in artificial intelligence and machine learning systems. + +## Primary Contributors + +This guide was developed by the **CycloneDX AI/ML Working Group**, whose members dedicated countless hours to research, discussion, writing, reviewing and refining the content to ensure it meets the highest standards of technical accuracy and practical applicability. + +We would like to specifically acknowledge the following individuals for their much appreciated contributions: + +- Matt Rutkowski, IBM, CycloneDX Project Maintainer, Chair AI/ML Work Group +- Steve Springett, Chair of CycloneDX Standard, Founder of Ecma TC54, Chair of OWASP Global Board of Directors +- Jan Kowalleck, CycloneDX Project Co-Lead +- Michael Boone, NVIDIA +- Jessica Butler, NVIDIA +- Pratyusha Maiti, NVIDIA +- Saquib Saifee, IBM +- Colin Gigool, IBM +- Aliza Heching, IBM +- Nagalakshmi Satyanarayanan, IBM +- Pavel Shukhman, Reliza + + +## Community Support + +We extend our gratitude to the broader CycloneDX community for their invaluable feedback and contributions: + +- **CycloneDX Core Working Group (CWG)** - for technical guidance and specification alignment +- **Ecma International Technical Committee 54 (TC54)** - for standardization support and governance + + +## Open Source Spirit + +This guide embodies the open-source ethos of the OWASP Foundation and CycloneDX project. We thank all contributors, reviewers, and users who continue to improve and evolve this resource through their feedback and participation. + +--- + +*The development of this guide would not have been possible without the collaborative spirit and dedication of the global CycloneDX community.* + + \ No newline at end of file diff --git a/ML-BOM/2.0/en/0x10-Introduction.md b/ML-BOM/2.0/en/0x10-Introduction.md new file mode 100644 index 00000000..e3dc21d3 --- /dev/null +++ b/ML-BOM/2.0/en/0x10-Introduction.md @@ -0,0 +1,28 @@ +# Introduction + +CycloneDX is a modern standard for the software supply chain. At its core, CycloneDX is a general-purpose Bill-of-Materials (BOM) standard capable of representing software, hardware, services, and other types of inventory. + +CycloneDX is notably an OWASP flagship project, has a formal standardization process and governance model through [Ecma Technical Committee 54](https://tc54.org), and is supported by the global information security community. + +## What is an AI/ML-BOM? + +An AI/ML-BOM (Artificial Intelligence/Machine Learning Bill of Materials) is a CycloneDX BOM document designed to address the unique complexities and risks of AI/ML systems. It provides a detailed inventory of all components, configurations, and processes involved in the development, training, deployment, and hosting (i.e., via hardware/software stacks and frameworks) of a machine learning model. + +The primary purpose of an AI/ML-BOM is to ensure transparency, traceability, security, and compliance throughout an ML model's lifecycle. + + +### Why AI/ML-BOMs are Important + +AI/ML-BOMs address critical challenges in the machine learning supply chain: + +- **Security & Vulnerability Management**: Help identify security risks, such as malicious (open-source) models or vulnerable dependencies, before they are integrated into production applications. + +- **Governance & Compliance**: Provide documentation for audits or formal informational requests based upon requirements from emerging global AI regulations such as the [European Union's Cyber Resilience Act (EU CRA)](https://www.european-cyber-resilience-act.com/), including specifics for AI models and systems from the complementary [EU AI Act](https://artificialintelligenceact.eu/), as well as for voluntary, guidance-focused frameworks such as the [NIST AI Risk Management Framework](https://www.nist.gov/itl/ai-risk-management-framework). + +- **Risk Mitigation**: Enable teams to track data lineage, helping to identify and eliminate potential data quality issues, privacy risks, or unwanted biases that could affect the model's performance and fairness. + +- **Reproducibility & Explainability**: Show adherence to software development lifecycle best practices by providing a detailed record of components and training processes such that developers are able to reproduce models (via training from datasets) and their benchmarks in order to validate claims of model accuracy and adherence to ethical considerations. + + diff --git a/ML-BOM/2.0/en/0x15-Core-Concepts.md b/ML-BOM/2.0/en/0x15-Core-Concepts.md new file mode 100644 index 00000000..1622dc04 --- /dev/null +++ b/ML-BOM/2.0/en/0x15-Core-Concepts.md @@ -0,0 +1,31 @@ +# Core Concepts and Considerations + +## Key Components of an AI/ML-BOM + +An AI/ML-BOM typically documents the identifying elements, architecture, components, and its supply chain along with any configurations and developmental or executional considerations, inclusive of the following areas: + +- **Model identifiers**: Identifying information such as the model's [Package URL (PURL)](https://tc54.org/purl/) (e.g., from Huggingface `pkg:huggingface/distilbert-base-uncased@043235d6088ecd3dd5fb5ca3592b6913fd51602`) or other domain-specific identifiers within other registries. In CycloneDX 2.0, identifiers are asserted by a named party using the component's `identifiers` array. + +- **Model metadata**: Descriptive details such as the model's name, version, license, developer, purpose, use cases, architecture, (hyper)parameters and any additional identifying elements. + +- **Parties**: The organizations, people, systems (e.g., AI agents), and personas involved with the model, each with one or more explicit roles (e.g., `manufacturer`, `supplier`, `publisher`, `end-user`). These include the model's developers and distributors as well as its intended users and any groups that may be affected by it. + +- **Model architecture**: Description of the composition of the model's neural network including configurations, layers, input/output parameters, attention mechanisms, etc. used at network processing stages. CycloneDX 2.0 describes architecture using a controlled vocabulary of architecture families, structural features, and runtime topologies. + +- **Datasets**: Description of datasets, as CycloneDX data components, used for training and testing of the associated model. This includes data sources, selection criteria, acquisition methods, preprocessing steps, and more. + +- **Tokenizers and prompt templates**: Descriptive details of specific tokenizers (e.g., libraries, files, configurations) and prompt templates used to train and/or interact with the model during runtime. + +- **Hardware, software & frameworks**: A list of all hardware and software components including libraries, packages, frameworks (e.g., TensorFlow, PyTorch, Huggingface), along with specific versions and associated licenses used in aspects of the model's lifecycle. This informational category may also include operational and application aspects of models (perhaps as agents) used within compositional frameworks and workflows, along with the protocols used for communication. + +- **Training & testing details**: Information about the computational environment and systems (software, hardware, operating system, and GPUs) used for training or evaluation along with necessary configurations, hyperparameters, and evaluation metrics. + +- **Intended use, limitations & risks**: Documentation of the model's intended use cases and users, known technical limitations, safety guardrails, and the ethical, fairness, and other risks (including their harms, benefits, and mitigations) associated with the model. + +- **Environmental impacts**: Documentation of the resource needed to train or execute the model which have an environmental impact or cost (e.g., data center energy and water cooling cost details). + +> **Note**: This guide describes CycloneDX 2.0. Readers familiar with the CycloneDX 1.x `modelCard` object will find that its information is distributed in 2.0 across the model component's `modelProperties` and `measurements`, its `parties`, and the BOM-level `definitions` (use cases), `risks`, and `perspectives`. Where helpful, sections of this guide note the corresponding CycloneDX 1.7 fields. + + diff --git a/ML-BOM/2.0/en/0x20-Design-Model-Component-Metadata.md b/ML-BOM/2.0/en/0x20-Design-Model-Component-Metadata.md new file mode 100644 index 00000000..e754ca5e --- /dev/null +++ b/ML-BOM/2.0/en/0x20-Design-Model-Component-Metadata.md @@ -0,0 +1,672 @@ +# AI/ML-BOM Design and Best Practices + +## Overview + +An AI/ML Bill-of-Materials (AI/ML-BOM) is an object model to describe a machine learning model, its compositional assets, and other descriptive information often used to assess risk and compliance. Support for AI/ML-BOM was introduced in CycloneDX v1.5; this guide describes AI/ML-BOMs using CycloneDX v2.0. + +An AI/ML-BOM relies on many of the common, core elements of the CycloneDX schema, as well as unique aspects specific to ML components, their architectures, metadata, training, and other information used to gauge regulatory compliance. + +This guide will provide specifics and best practices for conveying ML-related information using the CycloneDX schema. + +The [Core Concepts](0x15-Core-Concepts.md#key-components-of-an-aiml-bom) listed in the previous section will be used to provide details, best practices, and examples for providing the corresponding information using CycloneDX schema objects. + +For convenience, here are links to the specific sections for each of those informational areas: + +* [Anatomy of an AI/ML-BOM](#anatomy-of-an-aiml-bom) +* [Declaring ML Models](#declaring-ml-models) + * [Describing models as components](#describing-models-as-components) + * [Model repositories as components](#model-repositories-as-components) + * [Model identifiers](#model-identifiers) + * [Providing model release notes](#providing-model-release-notes) + * [Describing a model repository as a CycloneDX assembly](#describing-a-model-repository-as-a-cyclonedx-assembly) + * [Declaring a model's pedigree](#declaring-a-models-pedigree) + + + +## Anatomy of an AI/ML-BOM + +In CycloneDX, a model is considered a `component` where general best practices for providing information such as component identification, metadata, provenance, pedigree, etc. should be followed as documented in the [CycloneDX Authoritative Guide to SBOM](https://cyclonedx.org/guides/OWASP_CycloneDX-Authoritative-Guide-to-SBOM-en.pdf). + + + + + +The CycloneDX 2.0 schema is modular. The objects most relevant to an AI/ML-BOM are: + +| CycloneDX 2.0 object | Purpose in an AI/ML-BOM | +|---|---| +| `inventories[].subject` | The model being described by the AI/ML-BOM (the BOM's "subject" component) | +| `inventories[].components` | The constituent components of the model (e.g., files in the model repository, tokenizers, datasets) | +| `component.parties` | The organizations, people, systems, and personas related to the model, each with one or more `roles` | +| `component.identifiers` | Identities (e.g., `purl`) for the model, each asserted by a referenced party | +| `component.modelProperties` | AI/ML-specific properties: tasks, learning types, architecture, parameter count, quantization, inputs, outputs, training, and limitations | +| `component.measurements` | Performance metrics (quantitative analysis) and energy consumption (environmental considerations) | +| `definitions` | Shared, referenceable objects such as `components`, `parties`, and `useCases` | +| `risks` | Ethical, fairness, and other risks attributed to the model, including their impacts and responses | +| `perspectives` | Views that map AI/ML-BOM data into the terms of a particular audience, such as a "Model Card" | + +> **CycloneDX 1.7 → 2.0**: The 1.7 `metadata.component` is replaced by `inventories[].subject`, `bom-ref` is replaced by `refId`, and the 1.7 `modelCard` object is replaced by `modelProperties`, `measurements`, `parties`, `definitions.useCases`, and `risks`. + +## Declaring ML models + +### Describing models as components + +A model should always be declared as a CycloneDX `component`. If the model itself is the subject of the BOM, then the BOM is considered an AI/ML-BOM, and the `component` representing it would be declared as the `subject` of an entry in the top-level BOM `inventories` array. + +The object model's pseudo-schema would look something like this: + + + + +> **Note** In all example JSON pseudo-code, lines with: "// ..." indicate that additional fields or elements may be added at this position. This is a documentation placeholder and is not valid JSON; it would not appear in actual implementations. + +###### Example: Declaring an ML model in an AI/ML-BOM + +The CycloneDX JSON pseudocode below shows how an ML model would be declared as the "subject" `component` of an AI/ML-BOM within the top-level `inventories` array: + +```json +{ + "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json", + "specFormat": "CycloneDX", + "specVersion": "2.0", + "serialNumber": "urn:uuid:ec45525e-516c-4405-9de3-4fbdaef7f09a", + "version": 1, + "inventories": [ + { + "subject": { + "type": "machine-learning-model", + "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9", + "name": "Qwen/Qwen-7B", + "version": "ef3c5c9c57b252f3149c1408daf4d649ec8b6c85", + "licenses": [ + { + "license": { + "name": "Tongyi Qianwen LICENSE AGREEMENT", + "text": { + "content": "By clicking to agree or by using or distributing any portion or element of the Tongyi Qianwen Materials, ..." + } + } + } + ] + // ... + }, + "components": [ + // ... + ] + } + ] + // ... +} +``` + +###### Field discussion + +* **inventories** - Each inventory declares one `subject` and the `components` that it includes. An AI/ML-BOM describing a single model has a single inventory whose `subject` is the model. +* **refId** - The `refId` uniquely identifies the component within the BOM so it may be referenced elsewhere (e.g., from `dependencies`, `compositions`, or `risks`). Please note the `refId` value includes the first seven characters of the larger commit hash, which is sufficient for local identification within the BOM itself. +* **license** - The `licenses` object shown in the example is a "custom" license which, in this case, we chose to provide the unencoded license text. It is preferable, when possible to use an [SPDX license identifier](https://spdx.org/licenses/) and supply it in the `id` field of the `license` (e.g., `"license": { "id": "Apache-2.0" }` ). + +#### Model repositories as components + +When referencing an ML model as a component, it typically means you are referencing a **model repository** comprised of metadata and a set of files (e.g., pre-trained tensor data in various formats, model configurations, tokenizers, tokenizer configurations, prompt templates, Python code, etc.) which would be selectively used with various, compatible AI or ML applications and frameworks. + +If possible, these model repositories should be treated as a software "package" in a Software Bill of Materials (SBOM) when declaring them as `machine-learning-model` type CycloneDX components. + +###### Example: CycloneDX for the Qwen-7B model repository + +The following example shows how the Hugging Face [Qwen/Qwen-7B](https://huggingface.co/Qwen/Qwen-7B) model repository would be declared as a CycloneDX `component` of type `machine-learning-model` in a CycloneDX AI/ML-BOM as its subject component. + +Since the model repository is hosted on Hugging Face, the [Huggingface package type](https://github.com/package-url/purl-spec/blob/main/types/huggingface-definition.json) of the [Package URL specification](https://github.com/package-url/purl-spec) may be used to identify the model. + +```json +{ + "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json", + // ... + "inventories": [ + { + "subject": { + "type": "machine-learning-model", + "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9", + "group": "Qwen", + "name": "Qwen/Qwen-7B", + "version": "ef3c5c9c57b252f3149c1408daf4d649ec8b6c85", + "description": "Qwen-7B is a Transformer-based large language model, which is pretrained on a large volume of data, including web texts, books, codes, etc.", + "parties": [ + { + "refId": "party-alibaba-cloud", + "roles": [ { "role": "manufacturer" } ], + "organization": { + "name": "Alibaba Cloud", + "url": [ { "url": "https://www.alibabacloud.com" } ] + } + }, + { + "refId": "party-hugging-face", + "roles": [ { "role": "supplier" } ], + "organization": { + "name": "Hugging Face", + "url": [ { "url": "https://huggingface.co" } ] + } + } + ], + "identifiers": [ + { + "party": "party-hugging-face", + "identities": [ + { + "scheme": "purl", + "value": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9c57b252f3149c1408daf4d649ec8b6c85" + } + ] + } + ], + "externalReferences": [ + { + "type": "vcs", + "url": "https://huggingface.co/Qwen/Qwen-7B" + }, + { + "type": "model-card", + "url": "https://huggingface.co/Qwen/Qwen-7B" + } + ], + "modelProperties": { + // ... + } + }, + "components": [ + // ... + ] + } + ] +} +``` + +###### Field discussion + +This section provides best practice guidance on how the component fields were filled out for this example. + +- **refId** - Since a PURL is available, it can also be used as the `refId`. +- **group** - In this example, we chose to include the optional group field to acknowledge the specific model repository is part of the Qwen family of models. +- **name** - The model name reflects how the model is identified under Hugging Face using the `
+
+###### CycloneDX for the Qwen/Qwen-7B assembly
+
+The simplified JSON below shows how to declare a few files from the model repository's complete file list as the `components` of the inventory whose `subject` is the model.
+
+> **Note**: In the JSON below, we use the Package URL (PURL) syntax to provide the additional path (with the model repository or "package") to each individual file by appending it using the `#` hash symbol as a separator. Also, notice that the commit hash (identifier) varies per file.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B"
+ // ...
+ },
+ "components": [
+ {
+ "type": "file",
+ "name": "config.json",
+ "description": "Model configuration file using the 'QWenLMHeadModel' model class in Hugging Face Transformers",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@e7a368b#config.json",
+ "identifiers": [
+ {
+ "party": "party-hugging-face",
+ "identities": [
+ {
+ "scheme": "purl",
+ "value": "pkg:huggingface/Qwen/Qwen-7B@e7a368b0774370edec29674e7c51f52fc7663f59#config.json"
+ }
+ ]
+ }
+ ]
+ // ...
+ },
+ {
+ "type": "file",
+ "name": "configuration_qwen.py",
+ "description": "Python 'QWenConfig' class implementation for the Qwen-7B model using Hugging Face Transformers",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@a6ca629#configuration_qwen.py",
+ "identifiers": [
+ {
+ "party": "party-hugging-face",
+ "identities": [
+ {
+ "scheme": "purl",
+ "value": "pkg:huggingface/Qwen/Qwen-7B@a6ca629d063f56f34d184852301e8852a7afbd58#configuration_qwen.py"
+ }
+ ]
+ }
+ ]
+ // ...
+ },
+ {
+ "type": "data",
+ "name": "model-00001-of-00008.safetensors",
+ "description": "Model tensor data (01 of 08)",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@abcb6d6#model-00001-of-00008.safetensors",
+ "identifiers": [
+ {
+ "party": "party-hugging-face",
+ "identities": [
+ {
+ "scheme": "purl",
+ "value": "pkg:huggingface/Qwen/Qwen-7B@abcb6d6d8ec63ce606f816e2d08072da6309f965#model-00001-of-00008.safetensors"
+ }
+ ]
+ }
+ ],
+ "data": [
+ {
+ "type": "dataset",
+ "contents": {
+ "url": "https://huggingface.co/Qwen/Qwen-7B/blob/main/model-00001-of-00008.safetensors"
+ }
+ }
+ ]
+ // ...
+ },
+ {
+ "type": "data",
+ "name": "model-00002-of-00008.safetensors",
+ "description": "Model tensor data (02 of 08)",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@abcb6d6#model-00002-of-00008.safetensors",
+ "identifiers": [
+ {
+ "party": "party-hugging-face",
+ "identities": [
+ {
+ "scheme": "purl",
+ "value": "pkg:huggingface/Qwen/Qwen-7B@abcb6d6d8ec63ce606f816e2d08072da6309f965#model-00002-of-00008.safetensors"
+ }
+ ]
+ }
+ ],
+ "data": [
+ {
+ "type": "dataset",
+ "contents": {
+ "url": "https://huggingface.co/Qwen/Qwen-7B/blob/main/model-00002-of-00008.safetensors"
+ }
+ }
+ ]
+ // ...
+ }
+ // ...
+ ]
+ }
+ ],
+ "definitions": {
+ "parties": [
+ {
+ "refId": "party-hugging-face",
+ "roles": [ { "role": "supplier" } ],
+ "organization": { "name": "Hugging Face" }
+ }
+ ]
+ }
+ // ...
+}
+```
+
+Then the completeness of the model component's composing files would be asserted as a composition as follows:
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "compositions": [
+ {
+ "kind": "components",
+ "aggregate": "complete",
+ "targets": [
+ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9"
+ ]
+ }
+ ]
+ // ...
+}
+```
+
+###### Discussion of composition fields
+
+- **kind** - The `components` kind asserts the completeness of the components included in each target (here, the inventory of the model component).
+- **aggregate** - Note the composition `aggregate` value is assigned to be "complete" since all constituent files are known and declared in the AI/ML-BOM as part of the model component's inventory.
+- **targets** - References the `refId` of the model component whose inventory is being asserted.
+
+> **CycloneDX 1.7 → 2.0**: The 1.7 composition `assemblies` array is replaced by `targets` together with a required `kind`.
+
+### Declaring a model's pedigree
+
+ML models are often derived from existing, pre-trained models to optimize performance, reduce resource consumption, and adapt to specialized tasks without training from scratch. Some reasons for this include:
+
+* **Fine-Tuning**: Specialized adaptation where a general model (e.g., LLM) is retrained on a smaller, targeted dataset to improve performance for specific domains.
+* **Quantization**: Reduces model size and increases inference speed by mapping parameters to lower-precision tensor formats (e.g., from [`FP32`](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) to `int8` or `Q4_K_M` precision), which also lowers energy consumption for edge devices.
+* **Format Conversions**: Transforming models between frameworks (e.g., PyTorch to ONNX) ensures interoperability, allowing deployment on different frameworks and accelerators.
+* **Pruning**: Derives a smaller model by removing redundant or less important parameters (weights) that do not significantly contribute to output accuracy.
+* **Adapters**: Adding small, trainable layers (adapters) to a frozen base model to adapt it to new tasks without changing the original, large model weights, saving on storage for multi-task scenarios.
+
+It is important to capture any of these transformations in the model's lineage ("pedigree") or in an AI/ML-BOM. This should be accomplished via the CycloneDX `pedigree` object and describing a model's `ancestors` as a hierarchical graph.
+
+###### Example: Declaring the finetuning of llama3 model for a coding variant
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "name": "unsloth/Llama-3.2-3B-Instruct",
+ "refId": "pkg:huggingface/unsloth/Llama-3.2-3B-Instruct@1.0.0",
+ "description": "A pre-optimized, specialized versions of the meta-llama/Llama-3.2-3B-Instruct model designed to work seamlessly with Unsloth's training framework",
+ "parties": [
+ {
+ "refId": "party-unsloth",
+ "roles": [ { "role": "publisher" } ],
+ "organization": { "name": "Unsloth" }
+ }
+ ],
+ "identifiers": [
+ {
+ "party": "party-unsloth",
+ "identities": [
+ { "scheme": "purl", "value": "pkg:huggingface/unsloth/Llama-3.2-3B-Instruct@1.0.0" }
+ ]
+ }
+ ],
+ // ...,
+ "pedigree": {
+ "ancestors": [
+ {
+ "type": "machine-learning-model",
+ "name": "meta-llama/Llama-3.2-3B-Instruct",
+ "description": "The original base model from Meta Llama used for fine-tuning.",
+ "parties": [
+ {
+ "refId": "party-meta",
+ "roles": [ { "role": "publisher" } ],
+ "organization": { "name": "Meta" }
+ }
+ ],
+ "identifiers": [
+ {
+ "party": "party-meta",
+ "identities": [
+ { "scheme": "purl", "value": "pkg:huggingface/meta-llama/Llama-3.2-3B-Instruct" }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ]
+}
+```
+
+###### Field discussion
+
+* **ancestors** - `ancestors` entries are themselves CycloneDX `component` objects (or references to components declared elsewhere, such as in `definitions.components`). It should be noted that these models may have their own AI/ML-BOMs, which can be located via their identifiers (e.g., the `purl` identity) or via `externalReferences` for readers to follow.
+
+##### Declaring known descendants
+
+If, at the time an AI/ML-BOM is created for a model, its downstream model variants (e.g., finetunings, quantizations, etc., derived from the model) are known, these can also be recorded within the `pedigree` object as `descendants` in a similar manner.
+
+
diff --git a/ML-BOM/2.0/en/0x21-Design-Model-Card-Overview.md b/ML-BOM/2.0/en/0x21-Design-Model-Card-Overview.md
new file mode 100644
index 00000000..956ca335
--- /dev/null
+++ b/ML-BOM/2.0/en/0x21-Design-Model-Card-Overview.md
@@ -0,0 +1,116 @@
+# Model cards
+
+A model card describes the intended uses of a machine learning model and potential limitations, including biases and ethical considerations. Model cards typically include the training parameters, the datasets used to train the model, performance metrics, and other relevant data useful for ML transparency.
+
+Throughout the model card sections of this guide, we will show how to use the CycloneDX 2.0 schema to encode information from model cards in a more current and robust way.
+
+## Overview
+
+In CycloneDX 2.0, model card information is no longer held in a single, fixed `modelCard` object. Instead, it is provided as structured, machine-readable, and referenceable data across the AI/ML-BOM:
+
+| Model card information | CycloneDX 2.0 location |
+|---|---|
+| Model details, identity, and licensing | The model `component` (`name`, `version`, `description`, `identifiers`, `licenses`, `externalReferences`) |
+| Developers, suppliers, and intended users | The model component's `parties` (and shared `definitions.parties`) |
+| Learning types, tasks, architecture, parameters, inputs & outputs, training data, and limitations | The model component's `modelProperties` |
+| Quantitative analysis (performance metrics) and environmental impact (energy consumption) | The model component's `measurements` |
+| Intended use cases | `definitions.useCases`, asserted by the model component's `useCaseAssertions` |
+| Ethical considerations and fairness assessments | The BOM's top-level `risks` |
+| The "model card" view itself | A model card `perspective` (see [Model card perspectives](#model-card-perspectives)) |
+
+`modelProperties` *SHOULD* be specified for any component of type `machine-learning-model` and must not be specified for other component types.
+
+This section describes the design and best practices when providing this information for a model in an AI/ML-BOM as part of the model's CycloneDX `component` definition and its related objects.
+
+For convenience, here are links to the specific sections for each of those informational areas:
+
+* [Model properties](0x22-Design-Model-Card-Parameters.md#model-properties)
+ * [Model metadata](0x22-Design-Model-Card-Parameters.md#model-metadata)
+ * [Learning types](0x22-Design-Model-Card-Parameters.md#learning-types)
+ * [Tasks](0x22-Design-Model-Card-Parameters.md#tasks)
+ * [Architecture](0x22-Design-Model-Card-Parameters.md#architecture)
+ * [Parameter count & quantization](0x22-Design-Model-Card-Parameters.md#parameter-count--quantization)
+ * [Datasets](0x22-Design-Model-Card-Parameters.md#datasets)
+ * [Inputs & Outputs](0x22-Design-Model-Card-Parameters.md#inputs--outputs)
+ * [Declaring other properties](0x22-Design-Model-Card-Parameters.md#declaring-other-properties)
+ * [Configuration parameters & hyperparameters](0x22-Design-Model-Card-Parameters.md#configuration-parameters--hyperparameters)
+
+* [Quantitative analysis](0x23-Design-Model-Card-Quantitative-Analysis.md#model-quantitative-analysis)
+ * [Benchmarks](0x23-Design-Model-Card-Quantitative-Analysis.md#benchmarks)
+ * [Metrics](0x23-Design-Model-Card-Quantitative-Analysis.md#metrics)
+ * [Performance metrics](0x23-Design-Model-Card-Quantitative-Analysis.md#performance-metrics)
+ * [Graphics](0x23-Design-Model-Card-Quantitative-Analysis.md#graphics)
+
+* [Considerations](0x24-Design-Model-Card-Considerations.md#model-design-considerations)
+ * [Users & use cases](0x24-Design-Model-Card-Considerations.md#users--use-cases)
+ * [Technical limitations](0x24-Design-Model-Card-Considerations.md#technical-limitations)
+ * [Performance tradeoffs](0x24-Design-Model-Card-Considerations.md#performance-tradeoffs)
+ * [Ethical considerations](0x24-Design-Model-Card-Considerations.md#ethical-considerations)
+ * [Fairness assessments](0x24-Design-Model-Card-Considerations.md#fairness-assessments)
+ * [Environmental impact consideration](0x24-Design-Model-Card-Considerations.md#environmental-considerations)
+ * [Energy consumptions](0x24-Design-Model-Card-Considerations.md#energy-consumptions)
+
+* [Additional model-related information](0x40-Design-Additional-Model-Information.md#additional-model-related-information)
+ * [Using CycloneDX AI/ML properties](0x40-Design-Additional-Model-Information.md#using-cyclonedx-aiml-properties)
+ * [Tokenizers and prompt templates](0x40-Design-Additional-Model-Information.md#tokenizers-and-prompt-templates)
+ * [Including manufacturing information for the ML model](0x40-Design-Additional-Model-Information.md#including-manufacturing-information-for-the-ml-model)
+
+## Model card perspectives
+
+Because model card information is spread across the AI/ML-BOM, CycloneDX 2.0 introduces *perspectives*: a perspective is a "lens" that maps AI/ML-BOM data into the terms of a particular audience. A model card perspective maps each model card section (its `nativeName`, such as "Intended Use" or "Ethical Considerations") to the AI/ML-BOM data that supplies it using an [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535) JSONPath `expression`, along with the section's `relevance` (`required`, `recommended`, or `optional`) and an optional `weight` that can drive completeness scoring.
+
+This means the same AI/ML-BOM can be presented as different model cards (e.g., a canonical model card informed by EU AI Act requirements, a model hub's model card, or a corporate model card) without duplicating data, and new model card formats can be supported without changing the schema.
+
+###### Example: A model card perspective (abridged)
+
+```json
+{
+ "perspectives": [
+ {
+ "refId": "perspective-model-card",
+ "name": "Model Card",
+ "domains": [ "machine-learning", "transparency" ],
+ "mappings": [
+ {
+ "expression": "$.inventories[?(@.subject.type=='machine-learning-model')].subject.modelProperties.tasks",
+ "nativeName": "Supported Tasks",
+ "relevance": "required",
+ "weight": 0.9
+ },
+ {
+ "expression": "$.inventories[?(@.subject.type=='machine-learning-model')].subject.modelProperties.limitations",
+ "nativeName": "Technical Limitations",
+ "relevance": "required",
+ "weight": 0.9
+ },
+ {
+ "expression": "$.risks.risks[?(@.domains[?(@.type=='ethical')])]",
+ "nativeName": "Ethical Considerations",
+ "relevance": "required",
+ "weight": 0.9
+ },
+ {
+ "expression": "$.inventories[?(@.subject.type=='machine-learning-model')].subject.measurements[?(@.activity)]",
+ "nativeName": "Environmental Impact",
+ "relevance": "recommended"
+ }
+ // ...
+ ]
+ }
+ ]
+}
+```
+
+> **Note**: Perspectives are under active development in CycloneDX 2.0. A canonical model card perspective, informed by EU AI Act requirements, is planned for a future revision of this guide.
+
+
+
+### Design notes
+
+Please note that at the time of initial development (CycloneDX v1.5), the CycloneDX model card schema was heavily influenced by [Tensorflow ModelCard Toolkit](https://github.com/tensorflow/model-card-toolkit) and specifically its [ModelCard fields](https://www.tensorflow.org/responsible_ai/model_card_toolkit/api_docs/python/model_card_toolkit/ModelCard) since it was one of the few frameworks available for reference.
+
+Since that time, the AI/ML landscape has progressed rapidly, both in the design of model architectures and in the increased emphasis on providing model disclosure to comply with governmental regulations. In order to account for these changes, CycloneDX 2.0 replaces the 1.x `modelCard` object with the structured `modelProperties`, `measurements`, `parties`, use cases, risks, and perspectives described in this guide.
+
+
diff --git a/ML-BOM/2.0/en/0x22-Design-Model-Card-Parameters.md b/ML-BOM/2.0/en/0x22-Design-Model-Card-Parameters.md
new file mode 100644
index 00000000..c2a3939d
--- /dev/null
+++ b/ML-BOM/2.0/en/0x22-Design-Model-Card-Parameters.md
@@ -0,0 +1,555 @@
+# Model properties
+
+
+
+
+
+This section will feature guidance on filling out information in the CycloneDX model component's `modelProperties` object and its subcomponents, including:
+
+* [Model metadata](#model-metadata)
+ * [Learning types](#learning-types) - The learning paradigms used to train the model.
+ * [Tasks](#tasks) - The tasks the model is designed to perform, which directly influence the input and/or output. Examples include classification, regression, text generation, etc.
+ * [Architecture](#architecture) - The model's architecture, described by its family (e.g., Transformer, Convolutional Neural Network (CNN), Recurrent Neural Network (RNN)), its structural features, its runtime topology, and the name of its specific implementation (e.g., `LlamaForCausalLM`, ResNet-50, YOLOv3).
+ * [Parameter count & quantization](#parameter-count--quantization)
+ * [Providing links to papers & articles](#providing-links-to-papers--articles)
+* [Datasets](#datasets) - The datasets used to train and evaluate the model.
+ * [Declaring datasets](#declaring-datasets)
+* [Inputs & Outputs](#inputs--outputs) - Describes the input and output parameters of the model.
+* [Declaring other properties](#declaring-other-properties)
+ * [Configuration parameters & hyperparameters](#configuration-parameters--hyperparameters)
+
+> **CycloneDX 1.7 → 2.0**: The 1.7 `modelCard.modelParameters` object is replaced by `modelProperties` on the model `component`. The 1.7 `approach.type`, `task`, `architectureFamily`, and `modelArchitecture` strings are replaced by the `learningTypes`, `tasks`, and `architecture` fields, which use controlled vocabularies that can be validated and compared across BOMs.
+
+## Model metadata
+
+The `modelProperties` fields, grouped in this section, are intended to describe some of the metadata used to classify the associated ML model.
+
+### Learning types
+
+Describes the learning paradigms used to train the model. Since modern models often combine several paradigms (e.g., self-supervised pre-training followed by supervised fine-tuning and reinforcement-learning-based alignment), `learningTypes` is an array which supports the following predefined values:
+
+| Type | Description |
+|---|---|
+| **supervised** | Supervised machine learning involves training an algorithm on labeled data to predict or classify new data based on the patterns learned from the labeled examples. |
+| **unsupervised** | Unsupervised machine learning involves training algorithms on unlabeled data to discover patterns, structures, or relationships without explicit guidance, allowing the model to identify inherent structures or clusters within the data. |
+| **reinforcement-learning** | Reinforcement learning is a type of machine learning where an agent learns to make decisions by interacting with an environment to maximize cumulative rewards, through trial and error. |
+| **semi-supervised** | Semi-supervised machine learning utilizes a combination of labeled and unlabeled data during training to improve model performance, leveraging the benefits of both supervised and unsupervised learning techniques. |
+| **self-supervised** | Self-supervised machine learning involves training models to predict parts of the input data from other parts of the same data, without requiring external labels, enabling learning from large amounts of unlabeled data. |
+
+A custom learning type may be provided as an object with a `name` and `description` when none of the predefined values apply.
+
+Please note that links to external documentation detailing the model training approach (and other information) can be provided using [external references](#providing-links-to-papers--articles), which are discussed later in this section. Detailed training workflows (e.g., sequenced pre-training, fine-tuning, and alignment phases) can be described using CycloneDX `formulation` and referenced from `modelProperties.training.formula` (see [Including manufacturing information for the ML model](0x40-Design-Additional-Model-Information.md#including-manufacturing-information-for-the-ml-model)).
+
+### Tasks
+
+Describes the tasks (or goals) the machine learning model is designed to perform. A model may support multiple tasks, so `tasks` is an array. CycloneDX 2.0 predefines a vocabulary of tasks aligned with common model hub categories, including:
+
+* **Text**: `text-generation`, `text-classification`, `token-classification`, `question-answering`, `summarization`, `translation`, `text-to-text`, `fill-mask`, `sentence-similarity`, `zero-shot-classification`, `few-shot-learning`
+* **Vision & multimodal**: `image-classification`, `image-segmentation`, `object-detection`, `image-to-image`, `image-to-text`, `text-to-image`, `text-to-video`, `depth-estimation`, `video-classification`
+* **Audio**: `audio-classification`, `automatic-speech-recognition`, `audio-to-audio`, `text-to-audio`, `text-to-speech`, `voice-activity-detection`
+* **Tabular, time-series & other**: `tabular-classification`, `tabular-regression`, `time-series-forecasting`, `reinforcement-learning`, `robotics`, `graph-ml`, `feature-extraction`, `embedding`
+
+Tasks not covered by the predefined values (for example, the more general categories below) may be declared as custom tasks using an object with a `name` and `description`:
+
+* **Anomaly Detection**: Identifying outliers or unusual patterns in data.
+* **Clustering**: Grouping unlabeled data based on similar characteristics (e.g., customer segmentation).
+* **Dimensionality Reduction**: Simplifying complex data by reducing the number of variables while preserving core information.
+* **Recommendation/Association**: Finding relationships between items (e.g., "users who bought this also bought...").
+
+### Architecture
+
+The `architecture` object describes what a model is built from, how it is built, and how it runs, using three tiers of controlled vocabulary, along with a `name` and `description` for the specific implementation:
+
+| Field | Question answered | Cardinality |
+|---|---|---|
+| `family` | What is the model fundamentally built from? | one value |
+| `features` | Which structural mechanisms does it use? | array |
+| `topology` | How are parameters activated at runtime? | one value |
+
+Each tier accepts a predefined value or a custom object with a `name` and `description`, so every tier remains extensible.
+
+#### Architecture family
+
+An architecture family defines the model's neural network's structural and data-processing methodology. It typically does not describe a single model but rather the general design of the neural network (NN), the mathematical approach, context, attention mechanisms, and the like. It should provide insight to those versed in the field on how the model is constructed.
+
+The predefined architecture family values are: `transformer`, `cnn`, `rnn`, `lstm`, `gru`, `gan`, `vae`, `mamba`, `ssm`, `gnn`, `mlp`, `rwkv`, `snn`, `kan`, `diffusion`, `flow-matching`, `rbm`, `capsnet`, `neuromorphic`, and `hybrid` (for models that combine families, such as hybrid Mamba/Transformer designs).
+
+Some examples of commonly referenced neural network (NN) architecture families include:
+
+* **Transformers** (`transformer`) - an architecture designed to process sequential data (like text, speech, or images) in parallel rather than in order.
+* **Convolutional Neural Network** (`cnn`) - an architecture designed to efficiently detect patterns (like edges, shapes, and textures) to typically classify or analyze visual (videos/image) or auditory data, but can be applied to text analysis, behavioral patterns and more.
+* **Recurrent Neural Network** (`rnn`) - an architecture designed for processing sequential data like text, speech, and time series, typically used for tasks where order matters, such as language translation, speech recognition and time-series forecasting.
+* **Long Short-Term Memory** (`lstm`) - a specialized variant of a Recurrent Neural Network (RNN) architecture designed specifically to overcome the limitations of traditional RNNs in learning long-term dependencies.
+* **Gated Recurrent Units** (`gru`) - a specialized variant of a Recurrent Neural Network (RNN) architecture designed to overcome challenges like the vanishing gradient problem and enhance the modeling of long-term dependencies in sequential datasets.
+* **Generative Adversarial Networks** (`gan`) - an architecture used to train two neural networks, a *Generator* and a *Discriminator*, to compete against each other to generate more authentic data from a starting training dataset. The Generator tries to fool the Discriminator by creating fake data, while the Discriminator tries to identify fakes, leading to continuous improvement in data quality.
+
+Again, the list above represents architecture families commonly referenced in research to establish an understanding of general model design; however, the architectural landscape continues to grow as researchers specialize and optimize for different use cases, goals, and datasets.
+
+#### Architecture features
+
+Architecture features identify the structural mechanisms present in a model, including macro-level layouts, attention variants, and parameter-efficient adaptation mechanisms. The predefined values are:
+
+* **Layout**: `decoder-only`, `encoder-only`, `encoder-decoder`, `dual-encoders`, `siamese-network`, `u-net`, `vae-bottleneck`, `hybrid-backbone`, `state-space-model`, `flow-matching`, `mixture-of-experts`
+* **Attention & positional encoding**: `cross-attention`, `cross-attention-gated`, `grouped-query-attention`, `sliding-window-attention`, `rotary-position-embedding`
+* **Layers & adaptation**: `residual-connections`, `gated-linear-units`, `adapter-layers`, `projector-layers`, `vision-encoder`, `multimodal-fusion`
+* **Inference & augmentation**: `speculative-decoding`, `retrieval-augmented`, `memory-augmented`, `reranker`
+
+#### Architecture topology
+
+The topology describes how the model's parameters are activated at runtime. The predefined values are: `dense`, `sparse` (e.g., Mixture-of-Experts routing), `dynamic`, `liquid`, `mixture-of-depths`, `early-exit`, and `recurrent-hybrid`.
+
+#### Architecture name
+
+The architecture `name` field is intended to include specific keywords to identify an implementation (class or library) or technical descriptors of the architectural "blueprint" needed to run a specific model.
+
+These are typically found in one of several locations relative to the model:
+
+* **Model Card**: the associated "model card" (e.g., `README.md` in Hugging Face) may contain mentions of specific class names like `LlamaForCausalLM`, `BertModel`, or `VisionTransformer`.
+* **Framework-Specific Implementation Keywords** or tags: Depending on your code environment (PyTorch, TensorFlow, llama.cpp, etc.) that identify specific model code within the platform or environment.
+* **Framework-Specific Configuration files** (e.g., Hugging Face transformer's `config.json` file): may contain the name of the class or function used to configure the framework for the specific implementation recommended for the associated model.
+* **Academic Research Papers** (e.g., arXiv): may include detailed descriptors of processing algorithms, supported training or inference engines or specific, named implementations
+
+### Parameter count & quantization
+
+* **parameterCount** - The total number of trainable parameters of the model, expressed as an integer (e.g., `7000000000` rather than `"7B"`).
+* **quantization** - Describes the quantization applied to the model's weights (if any), including the `method` (e.g., `k-quant`, `gptq`, `awq`), the number of `bits`, the `scheme` (`affine` or `symmetric`), the `granularity` (`per-tensor`, `per-channel`, or `per-group`), and for grouped or per-channel quantization, the `groupSize` and `axis`.
+
+###### Example: Model metadata for the Qwen-7B model
+
+This example demonstrates best practices for the Qwen-7B model using information published within and for the model's repository on Hugging Face.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "modelProperties": {
+ "learningTypes": [ "self-supervised", "supervised", "reinforcement-learning" ],
+ "tasks": [ "text-generation" ],
+ "architecture": {
+ "name": "QWenLMHeadModel",
+ "description": "Decoder-only Transformer using rotary position embeddings and SwiGLU activations.",
+ "family": "transformer",
+ "features": [
+ "decoder-only",
+ "rotary-position-embedding",
+ "gated-linear-units"
+ ],
+ "topology": "dense"
+ },
+ "parameterCount": 7000000000
+ // ...
+ }
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ]
+}
+```
+
+###### Field discussion
+
+* **learningTypes** - Qwen-7B was pre-trained using self-supervised (next-token prediction) learning on a large corpus; the supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF) methods, also declared as [hyperparameter properties](#example-model-parameters--hyperparameters-for-the-qwen-7b-model) later in this section, are represented by `supervised` and `reinforcement-learning`.
+* **architecture.name** - the value `QWenLMHeadModel` was located in the model's `config.json` model configuration file.
+* **architecture.features** - Lists the structural mechanisms documented in the Qwen Technical Report.
+* **architecture.topology** - The value `dense` indicates that all of the model's parameters are active for each token (in contrast to a `sparse` Mixture-of-Experts model).
+* **parameterCount** - The nominal parameter count ("7B") as published by the model provider, expressed as an integer.
+
+#### Providing links to papers & articles
+
+Most models are fully described in terms of research papers, articles, and other reference documents. In those cases, they should be provided as `externalReferences` under the `component`. Links specific to the architecture may also be provided as `externalReferences` within the `architecture` object itself.
+
+###### Example: "Qwen Technical Report"
+
+This shows how the Qwen research team disclosed comprehensive details about the Qwen model's design, training, implementation, and evaluation as a formal research paper in Cornell University's arXiv scholarly article distribution service.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "externalReferences": [
+ {
+ "type": "documentation",
+ "url": "https://arxiv.org/abs/2309.16609",
+ "comment": "Qwen Technical Report"
+ }
+ ]
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ]
+}
+```
+
+## Datasets
+
+Details the datasets used to train and evaluate the model.
+
+#### Declaring datasets
+
+In CycloneDX 2.0, each dataset used to train, fine-tune, test, or evaluate a machine learning model is described as a CycloneDX component of type `data` and referenced from the model:
+
+* **Training datasets** are referenced from `modelProperties.training.datasets`, using the `refId` of the data component (or a BOM-Link to a data component declared in another BOM).
+* **Evaluation datasets** are referenced from each performance metric's `evaluationDatasets` (see [Quantitative analysis](0x23-Design-Model-Card-Quantitative-Analysis.md#model-quantitative-analysis)).
+
+> **CycloneDX 1.7 → 2.0**: The 1.7 `modelParameters.datasets` array allowed either in-line dataset objects or `ref` references to data components. In 2.0, `modelProperties.training.datasets` contains only references; information previously provided in-line is now provided on the referenced `data` component (e.g., within its `data` array).
+
+How much detail is provided for each data component depends on the context, as discussed in the next sections.
+
+##### Datasets with minimal information
+
+A data component may be kept minimal to simplify the association between training datasets and the model, specifically addressing scenarios where data is difficult to reference as an independent, fully described component.
+
+Key applications:
+
+* **Filtered Data**: Documenting specific slices or individual snippets of data used for fine-tuning or testing.
+* **Private Repositories**: Providing transparency via BOMs for non-public datasets in public model cards (e.g, private data used for models in the healthcare or financial services industries).
+* **Unstructured Sources**: Referencing data not housed in traditional databases or management tools (e.g., data within S3 buckets, event data within Security information and event management (SIEM) systems).
+
+
+
+###### Example: Custom health model with private dataset
+
+This example shows a model fine-tuned (by a fictional "ACME Health" company) from the public [m42-health/Llama3-Med42-8B](https://huggingface.co/m42-health/Llama3-Med42-8B) model using a private dataset.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ "specFormat": "CycloneDX",
+ "specVersion": "2.0",
+ "serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
+ "version": 1,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/acme-health/custom-Llama3-Med42-8B@2ee9dc9",
+ "name": "acme-health/custom-Llama3-Med42-8B",
+ "description": "Customized Med42-v2 large language models (LLMs) which uses the Llama3 architecture and fine-tuned using private clinical dataset.",
+ // ...,
+ "modelProperties": {
+ // ...,
+ "training": {
+ "datasets": [
+ "dataset-ultrafeedback",
+ // ...,
+ "dataset-acme-midwest-health"
+ ]
+ }
+ // ...
+ }
+ },
+ "components": [
+ {
+ "type": "data",
+ "refId": "dataset-ultrafeedback",
+ "name": "UltraFeedback dataset",
+ "data": [
+ {
+ "type": "dataset",
+ "classification": "public",
+ "contents": {
+ "url": "https://huggingface.co/datasets/openbmb/UltraFeedback"
+ }
+ }
+ ]
+ },
+ // ...,
+ {
+ "type": "data",
+ "refId": "dataset-acme-midwest-health",
+ "name": "ACME Midwest health data",
+ "data": [
+ {
+ "type": "dataset",
+ "classification": "confidential",
+ "contents": {
+ "url": "https://acme.ai/adatasets/health/patient?region=midwest"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
+```
+
+###### Field discussion
+
+* **classification** - The predefined data classifications are `public`, `internal`, `confidential`, `restricted`, and `classified` (custom classifications are also supported). The ACME private dataset is classified as `confidential`.
+* **url** - Please note that URLs may be to either public or private resources. For example, in the case of the ACME `confidential` dataset above, the URL is likely behind an Access Control Point (ACP) which regulates traffic to the private resource in accordance with the ACME company's governance policies.
+
+##### Datasets as fully described data components
+
+This method is preferable for most security and compliance contexts, as it allows for the full expression of provenance, pedigree, attestations, and other contextual information as a full CycloneDX component.
+
+###### Example: health model with public datasets
+
+This example shows the recommended best practice of declaring the datasets for the base model used in the previous example (i.e., [m42-health/Llama3-Med42-8B](https://huggingface.co/m42-health/Llama3-Med42-8B)) as their own, fully identified CycloneDX components.
+
+The public datasets, as documented in the model's research paper, include:
+
+* [openbmb/UltraFeedback](https://huggingface.co/datasets/openbmb/UltraFeedback)
+* [snorkelai/Snorkel-Mistral-PairRM-DPO](https://huggingface.co/snorkelai/Snorkel-Mistral-PairRM-DPO)
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ "specFormat": "CycloneDX",
+ "specVersion": "2.0",
+ "serialNumber": "urn:uuid:eb033070-85d1-45f4-9eb7-f50510f83853",
+ "version": 1,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/m42-health/Llama3-Med42-8B@ceab7e7",
+ "name": "m42-health/Llama3-Med42-8B",
+ "description": "an open, clinical large language models (LLM) instruct and preference-tuned by M42 to expand access to medical knowledge. Built off LLaMA-3 and designed to provide high-quality answers to medical questions.",
+ "identifiers": [
+ {
+ "party": "party-hugging-face",
+ "identities": [
+ { "scheme": "purl", "value": "pkg:huggingface/m42-health/Llama3-Med42-8B@ceab7e7ee4b9dbde7ba82867f34274db51487d83" }
+ ]
+ }
+ ],
+ // ...,
+ "modelProperties": {
+ // ...,
+ "training": {
+ "datasets": [
+ "pkg:huggingface/openbmb/UltraFeedback@40b4365",
+ "pkg:huggingface/snorkelai/Snorkel-Mistral-PairRM-DPO@07af5d0a"
+ ]
+ }
+ }
+ },
+ "components": [
+ {
+ "name": "UltraFeedback dataset",
+ "type": "data",
+ "refId": "pkg:huggingface/openbmb/UltraFeedback@40b4365",
+ "identifiers": [
+ {
+ "party": "party-hugging-face",
+ "identities": [
+ { "scheme": "purl", "value": "pkg:huggingface/openbmb/UltraFeedback@40b436560ca83a8dba36114c22ab3c66e43f6d5e" }
+ ]
+ }
+ ]
+ // ...
+ },
+ {
+ "name": "Snorkel-Mistral-PairRM-DPO dataset",
+ "type": "data",
+ "refId": "pkg:huggingface/snorkelai/Snorkel-Mistral-PairRM-DPO@07af5d0a",
+ "identifiers": [
+ {
+ "party": "party-hugging-face",
+ "identities": [
+ { "scheme": "purl", "value": "pkg:huggingface/snorkelai/Snorkel-Mistral-PairRM-DPO@07af5d0a875b4c692dfaff6c675b10af07b45511" }
+ ]
+ }
+ ]
+ // ...
+ }
+ ]
+ }
+ ],
+ "definitions": {
+ "parties": [
+ {
+ "refId": "party-hugging-face",
+ "roles": [ { "role": "supplier" } ],
+ "organization": { "name": "Hugging Face" }
+ }
+ ]
+ }
+}
+```
+
+> **Tip**: Datasets may be further described using properties from the proposed `cdx:ai-ml:dataset` namespace of the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy) ([PR #175](https://github.com/CycloneDX/cyclonedx-property-taxonomy/pull/175)), such as the dataset's `stage`, `category`, and EU AI Act data `sources`.
+
+
+
+
+### Inputs & outputs
+
+Describes the input and output parameters of the model. Each entry in the `inputs` and `outputs` arrays describes one parameter, including its:
+
+* **name** and **description**
+* **modality** - `text`, `image`, `audio`, `video`, `multimodal`, `embedding`, or `logits`
+* **dataType** - The numeric or symbolic data type (e.g., `string`, `float32`, `bfloat16`, `int64`, `uint8`)
+* **mimeType** - The media type for encoded content (e.g., `image/png`)
+* **shape** - The dimensional shape (e.g., tensor dimensions), where dynamic dimensions are expressed as `null` or `-1`
+* **processingStage** - The stage of the parameter relative to tokenization or encoding: `pre-tokenizer`, `post-tokenizer`, `pre-encoder`, `post-encoder`, `pre-processing`, `post-processing`, or `raw`
+* **required**, **defaultValue**, and **constraints** (e.g., `minLength`, `maxLength`, `minValue`, `maxValue`, `allowedValues`, `pattern`)
+
+> **CycloneDX 1.7 → 2.0**: The 1.7 `inputs`/`outputs` objects only supported a single `format` string.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "modelProperties": {
+ // ...,
+ "inputs": [
+ {
+ "name": "prompt",
+ "description": "The text prompt to be completed by the model.",
+ "modality": "text",
+ "dataType": "string",
+ "processingStage": "pre-tokenizer",
+ "required": true
+ }
+ ],
+ "outputs": [
+ {
+ "name": "completion",
+ "description": "The generated text completion.",
+ "modality": "text",
+ "dataType": "string",
+ "processingStage": "post-processing"
+ }
+ ]
+ }
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ]
+}
+```
+
+In order to provide information on other model configuration parameters and hyperparameters, it is recommended to follow the best practice as shown in the next section "[Declaring other properties](#declaring-other-properties)" and its "[Example: Model parameters & hyperparameters for the Qwen-7B model](#example-model-parameters--hyperparameters-for-the-qwen-7b-model)".
+
+
+
+### Declaring other properties
+
+#### Configuration parameters & hyperparameters
+
+In general, model configuration parameters describe values used to configure model processing applications, frameworks, and implementations of model architectures. For example, most models on Hugging Face typically include configuration files for both the models and the tokenizers they are designed to work with, using the [Hugging Face Transformers](https://huggingface.co/docs/transformers/) library and its underlying PyTorch framework.
+
+> **Note**: Configuration parameters and hyperparameters that are not represented by native `modelProperties` fields are provided using CycloneDX `properties` and the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy) reserved namespaces `cdx:ai-ml:model:parameter` and `cdx:ai-ml:model:hyperparameter` as needed. Because the taxonomy can be extended at any time (independently of the schema's standardization cycle), it is the preferred mechanism for describing the rapidly evolving set of AI/ML configuration values.
+
+###### Example: Model parameters & hyperparameters for the Qwen-7B model
+
+As shown in the [Qwen/Qwen-7B model repository files](0x20-Design-Model-Component-Metadata.md#example-qwenqwen-7b-model-repository-files) example in the previous section, we see the model includes several configuration files, including:
+
+- [config.json](https://huggingface.co/Qwen/Qwen-7B/blob/main/config.json) - which contains configuration parameters (as key-value pairs) used for initializing the model's implementation.
+- [generation_config.json](https://huggingface.co/Qwen/Qwen-7B/blob/main/generation_config.json) - which contains model hyperparameters (as key-value pairs) and their suggested (default) values used for configuring the model for token generation (inference).
+
+The JSON below shows how a few of the [Qwen/Qwen-7B](https://huggingface.co/Qwen/Qwen-7B) model's parameters, as contained in the [config.json](https://huggingface.co/Qwen/Qwen-7B/blob/main/config.json) configuration file, would be declared within the CycloneDX `modelProperties` object's `properties` array using the CycloneDX reserved namespace for AI/ML.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "modelProperties": {
+ // ...,
+ "parameterCount": 7000000000,
+ "properties": [
+ {
+ "name": "cdx:ai-ml:model:parameter:tune_method",
+ "value": "sft"
+ },
+ {
+ "name": "cdx:ai-ml:model:parameter:tune_method",
+ "value": "rlhf"
+ },
+ {
+ "name": "cdx:ai-ml:model:hyperparameter:num_hidden_layers",
+ "value": "32"
+ },
+ {
+ "name": "cdx:ai-ml:model:hyperparameter:hidden_size",
+ "value": "4096"
+ },
+ {
+ "name": "cdx:ai-ml:model:hyperparameter:context_length",
+ "value": "8192"
+ },
+ {
+ "name": "cdx:ai-ml:model:hyperparameter:vocab_size",
+ "value": "151936"
+ },
+ {
+ "name": "cdx:ai-ml:model:hyperparameter:quantization",
+ "value": "BF16"
+ }
+ // ...
+ ]
+ }
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ]
+}
+```
+
+###### Field discussion
+
+Please note that the example above includes only a small set of parameters and hyperparameters that extend the `cdx:ai-ml:model:parameter` and `cdx:ai-ml:model:hyperparameter` paths. Actual models may have a more comprehensive set of properties declared.
+
+The example above contains the following native field and `cdx:ai-ml:model:parameter` and `cdx:ai-ml:model:hyperparameter` properties, which are explained below:
+
+- **parameterCount** - Total number of learned parameters in the model. In CycloneDX 2.0, this native integer field replaces the `cdx:ai-ml:model:parameter:count` property.
+- **properties**
+
+ * **context_length** - The maximum sequence length the model supports during training and inference.
+ * **num_hidden_layers** - The total number of intermediate (hidden) processing layers situated between the input layer and the output layer of the model.
+ * **hidden_size** - The dimension of the input and output representations (i.e., of the token embeddings) used by the internal (hidden) layers of a model's neural network.
+ * **tune_method** - Indicates the fine-tuning methods used to develop the model. In this case, `sft` (Supervised Fine-Tuning) and `rlhf` (Reinforcement Learning from Human Feedback).
+ * **quantization** - The numerical precision (number of bits) used to store the model's tensor weights, which affects model memory usage. Where a model's weights have been quantized (e.g., 4-bit GGUF `Q4_K_M`), the quantization method, bits, scheme, and granularity should also be described using the native `modelProperties.quantization` object.
+ * **vocab_size** - The size of the model's vocabulary.
+
+##### Tokenizer parameters and hyperparameters
+
+The same methodology used to provide model hyperparameter names and values for models can also be applied to model tokenizers by instead using the `cdx:ai-ml:tokenizer:hyperparameter` path and extending it with a path with a parameter name.
+
+
diff --git a/ML-BOM/2.0/en/0x23-Design-Model-Card-Quantitative-Analysis.md b/ML-BOM/2.0/en/0x23-Design-Model-Card-Quantitative-Analysis.md
new file mode 100644
index 00000000..43f291b3
--- /dev/null
+++ b/ML-BOM/2.0/en/0x23-Design-Model-Card-Quantitative-Analysis.md
@@ -0,0 +1,232 @@
+# Model quantitative analysis
+
+
+
+
+
+This section will feature guidance on providing quantitative analysis information using the CycloneDX model component's `measurements` array and its performance metric objects, including:
+
+* [Metrics](#metrics)
+ * [Performance metrics](#performance-metrics)
+* [Graphics](#graphics)
+
+> **CycloneDX 1.7 → 2.0**: The 1.7 `modelCard.quantitativeAnalysis.performanceMetrics` array is replaced by performance metric entries in the component's `measurements` array. Each metric now has a separate `type` and `benchmark`, a typed `measure` with a numeric `value` and a `unit`, numeric `confidenceInterval` bounds, and references to the `evaluationDatasets` used. The 1.7 `quantitativeAnalysis.graphics` collection is replaced by per-metric `graphics`.
+
+## What is quantitative analysis
+
+Quantitative analysis is the process of using metrics on benchmarks to determine if a model is reliable, safe, or better than another. It involves comparing the metric results against the benchmark standard to assess performance, identify limitations, and track progress over time.
+
+
+
+### The value of quantitative analysis
+
+* **Numerical Metrics**: Provides measurable data (e.g., error rates, latency, performance scores) rather than subjective feedback.
+* **Objective Evaluation**: Provides reproducible, scalable results that can be compared across different models or versions.
+* **Pattern & Trend Detection**: Identifies numerical patterns, correlations, and trends within large or complex datasets that might be missed manually.
+* **Testing Hypotheses**: Enables the statistical testing of assumptions about model behavior allowing for comparisons against similar models for given tasks.
+
+## Benchmarks
+
+Benchmarks are standardized test datasets, scenarios, or tasks that define the "playing field". They provide a consistent environment for evaluating different models and enable the comparison of their metrics across similar models.
+
+### Types of machine learning benchmarks
+
+Benchmarks use standardized datasets to objectively compare model quality, efficiency, fairness, and speed, providing a shared baseline for identifying areas for improvement in various categories.
+
+* [Large Language Models (LLM)](0x90-Appendix-A_Glossary.md#large-language-model-llm) and [Natural Language Processing (NLP)](0x90-Appendix-A_Glossary.md#natural-language-processing-nlp) (e.g., speech recognition or text classification): These benchmarks evaluate reasoning, knowledge, and generation capabilities. A few examples of datasets used to benchmark these models against different tasks include:
+
+ * **General Tasks**
+ * [MMLU](https://huggingface.co/datasets/cais/mmlu), [MMLU-Pro](https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro) (Massive Multitask Language Understanding): Tests knowledge across STEM, humanities, and social sciences.
+ * [HellaSwag](https://huggingface.co/datasets/Rowan/hellaswag) / [WinoGrande](https://huggingface.co/datasets/allenai/winogrande): Common sense reasoning and pronoun resolution tasks.
+ * [GLUE](https://gluebenchmark.com/): benchmarking resources for training, evaluating, and analyzing natural language understanding systems. GLUE's dataset is available in Hugging Face Hub ([nyu-mll/glue](https://huggingface.co/datasets/nyu-mll/glue)) and supports multiple tasks that can be evaluated independently, for example:
+ * *ax* - evaluates sentence understanding through Natural Language Inference (NLI) problems.
+ * *cola* - The Corpus of Linguistic Acceptability consists of English acceptability judgments drawn from books and journal articles on linguistic theory.
+ * *mnli* - The Multi-Genre Natural Language Inference Corpus consists of sentence pairs with textual entailment annotations. Given a premise sentence and a hypothesis sentence, the task is to predict whether the premise entails the hypothesis.
+ * **Math/STEM tasks**
+ * [GSM8K](https://huggingface.co/datasets/openai/gsm8k) (OpenAI, Grade School Math 8K): a dataset of 8.5K high quality linguistically diverse grade school math word problems.
+ * [MATH-500](https://huggingface.co/datasets/HuggingFaceH4/MATH-500) (Hugging Face): Benchmarks specifically designed to evaluate mathematical reasoning.
+ * **Coding Tasks**
+ * [HumanEval](https://huggingface.co/datasets/openai/openai_humaneval) (OpenAI): used to evaluate the functional correctness of code generated LLMs. It consists of hand-crafted programming problems designed to test reasoning and code synthesis abilities.
+ * [MBPP](https://huggingface.co/datasets/Muennighoff/mbpp) (Mostly Basic Python Problems ): Benchmarks for evaluating code generation and programming capabilities.
+ * [CodeXGLUE](https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-refinement) (MicroSoft, Code Refinement): Used to evaluate a model's ability to remove (i.e., "fix") bugs from Java code (i.e., refine the code) with accuracy being reported as [BLEU](https://learn.microsoft.com/en-us/azure/ai-services/translator/custom-translator/concepts/bleu-score) scores.
+ * **Other Tasks**
+ * [IMDB](https://www.kaggle.com/datasets/lakshmi25npathi/imdb-dataset-of-50k-movie-reviews): a large dataset of 50K, highly polarized, movie reviews for NLP sentiment analysis and classification.
+
+* [Computer Vision](0x90-Appendix-A_Glossary.md#computer-vision) (e.g., digital image or video recognition): These benchmarks measure the performance, accuracy, and efficiency of models in tasks like image classification, object detection, segmentation, and tracking. Some example "vision" datasets include:
+
+ * [ImageNet](https://image-net.org): large-scale dataset for computer vision, featuring over 14 million annotated, high-resolution images across thousands of object categories organized by the [WordNet](https://en.wikipedia.org/wiki/WordNet) hierarchy.
+ * [MathVista](https://huggingface.co/datasets/AI4Math/MathVista): Used to evaluating math reasoning in Visual Contexts. It consists of three datasets, *IQTest*, *FunctionQA*, and *PaperQA*, which are tailored to evaluate visual reasoning on puzzle test figures, algebraic reasoning over functional plots, and scientific reasoning with academic paper figures, respectively.
+ * [MNIST](https://www.tensorflow.org/datasets/catalog/mnist) (Modified National Institute of Standards and Technology database): a large database of handwritten digits (glyphs) that is commonly used for training various image processing systems.
+
+Again, the list above contains only a small number of benchmarking datasets that can be used to train and evaluate models.
+
+> **Tip**: Since a benchmark's dataset can be declared as a `data` component, each performance metric can reference the exact dataset (and version) it was computed against using `evaluationDatasets`.
+
+## Metrics
+
+AI benchmarking metrics are standardized, quantitative measures used to evaluate and compare the performance, accuracy, efficiency, and reliability of artificial intelligence models against established, uniform tasks and datasets. They serve as a gauge of progress in capabilities such as reasoning, coding, and language understanding, enabling simple comparisons with similar models.
+
+> **Note**: A component's `measurements` array can contain both *performance metrics* (described in this section) and *energy consumption* measurements (see [Environmental considerations](0x24-Design-Model-Card-Considerations.md#environmental-considerations)).
+
+#### Performance metrics
+
+Performance metrics are specific, quantitative measures used to evaluate a model's behavior, such as accuracy, precision, recall, perplexity, or inference speed. They provide the raw, numerical data for analysis.
+
+Each performance metric includes the following fields:
+
+* **type** (required) - The type of metric (e.g., `accuracy`, `f1`, `pass@1`, `perplexity`, `latency`, `throughput`).
+* **measure** (required) - The metric's numeric `value` and its `unit` (e.g., `%`, `1` for unitless ratios, `ms`, `tokens/s`).
+* **benchmark** - The benchmark (and its configuration, e.g., number of shots) used to compute the metric.
+* **slice** - The named subset of the evaluation data the metric was computed on.
+* **confidenceInterval** - The numeric `lowerBound` and/or `upperBound` of the metric.
+* **evaluationDatasets** - References to the `data` components the metric was computed against.
+* **graphics** - Graphics (or references to graphics) illustrating the metric.
+
+##### Common Performance Metrics
+
+* **Accuracy**: Overall correctness; typically represented as a percentage of correct responses to the full set of problems posed by a benchmark's dataset.
+* **Precision**: Of predicted positives, how many are correct.
+* **Recall** (Sensitivity): Of actual positives, how many are found.
+* **F1 Score**: Harmonic mean of *Precision* and *Recall*.
+* **Latency/Throughput**: Speed of prediction (inference), e.g., time-to-first-token (`ms`) or generation rate (`tokens/s`).
+
+
+
+###### Example: Declaring the MMLU accuracy score for Qwen-7B
+
+The Qwen accuracy scores for various benchmarks are published in the [QwenLM/Qwen](https://github.com/QwenLM/Qwen?tab=readme-ov-file#performance) GitHub repository's README.
+
+This appears as a table that includes all Qwen models, along with other similar models for comparison. Here is the table row for all Qwen-7B benchmarks:
+
+| Model | MMLU | C-Eval | GSM8K | MATH | HumanEval | MBPP | BBH | CMMLU |
+|:------------------|:--------:|:--------:|:--------:|:--------:|:---------:|:--------:|:--------:|:--------:|
+| **Qwen-7B** | 58.2 | 63.5 | 51.7 | 11.6 | 29.9 | 31.6 | 45.0 | 62.2 |
+
+The MMLU score from the table would be declared as a performance metric as follows:
+
+```json
+{
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "measurements": [
+ {
+ "type": "accuracy",
+ "benchmark": "MMLU (5-shot)",
+ "measure": {
+ "value": 58.2,
+ "unit": "%"
+ },
+ "confidenceInterval": {
+ "lowerBound": 57.48,
+ "upperBound": 58.92
+ },
+ "evaluationDatasets": [
+ "pkg:huggingface/cais/mmlu"
+ ]
+ }
+ ]
+}
+```
+
+###### Field discussion
+
+* **type** / **benchmark** - The metric type (`accuracy`) is separated from the benchmark and its configuration (`MMLU (5-shot)`), which allows the same metric type to be compared across benchmarks.
+* **measure** - The value is provided as a number with an explicit unit (`%`) rather than as a string.
+* **slice** - the `slice` property was omitted indicating the full dataset was used for performance benchmarking.
+* **confidenceInterval** - the values provided reflect the 95% Statistical Confidence Interval (±0.72) of the accuracy for the full MMLU test set (approx. 14,000 questions).
+* **evaluationDatasets** - References the `refId` of a `data` component (declared elsewhere in the BOM) describing the MMLU dataset.
+
+###### Example: Declaring a GLUE F1 Score
+
+This example shows how to provide an [F1 score](https://en.wikipedia.org/wiki/F-score) (i.e., the harmonic mean of precision and recall measurements) for a model's performance on classification tasks within the [GLUE benchmark](https://zilliz.com/glossary/glue-benchmark).
+
+```json
+{
+ "measurements": [
+ {
+ "type": "f1",
+ "benchmark": "GLUE",
+ "slice": "cola",
+ "measure": {
+ "value": 0.87,
+ "unit": "1"
+ }
+ }
+ ]
+}
+```
+
+###### Field discussion
+
+* **slice** - the `slice` property references a named subset `cola` (Corpus of Linguistic Acceptability) which is a subset of the GLUE tests; "cola" consists of single-sentence task to determine if a sentence is grammatically correct or not.
+* **unit** - The unit `1` denotes a unitless (dimensionless) ratio between 0 and 1.
+
+## Graphics
+
+Model cards typically include graphs, charts, and other graphics that highlight the model's performance benchmarks, often relative to other models. This section exemplifies the use of the CycloneDX `graphics` object to include these graphics in the AI/ML-BOM as part of its quantitative analysis information.
+
+Graphics may be provided in-line on a performance metric, or declared once in the BOM's `definitions.graphics` and referenced (by `refId`) from each metric they illustrate.
+
+###### Example: Qwen model comparative benchmarks
+
+The [QwenLM/Qwen](https://github.com/QwenLM/Qwen) GitHub repository includes the following JPG format spider diagram showing benchmarking comparisons for their Qwen2 models, along with some peer models:
+
+
+
+This could be encoded in a CycloneDX AI/ML-BOM as follows:
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "name": "Qwen/Qwen2-72B",
+ // ...,
+ "measurements": [
+ {
+ "type": "accuracy",
+ "benchmark": "MMLU (5-shot)",
+ "measure": { "value": 84.2, "unit": "%" },
+ "graphics": [
+ { "ref": "graphic-qwen2-benchmarks" }
+ ]
+ }
+ // ...
+ ]
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ],
+ "definitions": {
+ "graphics": [
+ {
+ "refId": "graphic-qwen2-benchmarks",
+ "name": "Qwen2 Performance Benchmarks (spider diagram)",
+ "description": "benchmark_score",
+ "image": {
+ "mediaType": "image/jpeg",
+ "encoding": "base64",
+ "content": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA"
+ }
+ }
+ ]
+ }
+}
+```
+
+###### Field discussion
+
+* **definitions.graphics** - Declaring the graphic once allows every metric shown in the spider diagram to reference it.
+* **mediaType** - The media type of the image (in 1.7, this field was named `contentType`).
+* **encoding** - CycloneDX, currently, only supports a `base64` encoding type.
+
+
diff --git a/ML-BOM/2.0/en/0x24-Design-Model-Card-Considerations.md b/ML-BOM/2.0/en/0x24-Design-Model-Card-Considerations.md
new file mode 100644
index 00000000..ac0227db
--- /dev/null
+++ b/ML-BOM/2.0/en/0x24-Design-Model-Card-Considerations.md
@@ -0,0 +1,608 @@
+# Model Design Considerations
+
+
+
+
+
+This section will feature guidance on providing the design considerations for a model, including:
+
+* [Users & use cases](#users--use-cases) - Who are the intended users of the model, and what are the intended use cases for the model inclusive of the Operational Design Domains (ODD)?
+* [Technical limitations](#technical-limitations) - What are the known technical limitations of the model? For example, "What kind(s) of data should the model be expected not to perform well on?", "What are the factors that might degrade model performance?".
+* [Performance tradeoffs](#performance-tradeoffs) - What are the known tradeoffs in accuracy/performance of the model?
+* [Ethical considerations](#ethical-considerations) - How to disclose known ethical risks involved in the application of this model?
+* [Fairness assessments](#fairness-assessments) - How does the model affect groups at risk of being systematically disadvantaged? What are the harms and benefits to the various affected groups?
+* [Environmental considerations](#environmental-considerations) - What are the various environmental impacts the corresponding machine learning model has exhibited across its lifecycle?
+
+> **CycloneDX 1.7 → 2.0**: The 1.7 `modelCard.considerations` object is replaced by several, more structured and referenceable objects:
+>
+> | CycloneDX 1.7 `considerations` field | CycloneDX 2.0 |
+> |---|---|
+> | `users` | `parties` (e.g., personas) with the `end-user` role |
+> | `useCases` | `definitions.useCases`, whose `actors` reference parties, asserted by the model via `useCaseAssertions` |
+> | `technicalLimitations` | `modelProperties.limitations` |
+> | `performanceTradeoffs` | `modelProperties.limitations` (see [Performance tradeoffs](#performance-tradeoffs)) |
+> | `ethicalConsiderations` | `risks.risks` with an `ethical` (or other) domain, whose `affects` references the model, and `responses` for mitigations |
+> | `fairnessAssessments` | `risks.risks` with a `fairness` domain, whose `affects` references the model and the party (persona) at risk, with graded harm and benefit `impacts` |
+> | `environmentalConsiderations` | Energy consumption entries in the model component's `measurements` |
+
+## Users & use cases
+
+The intended users of the model are described as CycloneDX `parties`, and its envisioned use cases are described as CycloneDX use cases.
+
+* **Users** - Each kind of user is a party (typically a `persona`) with the `end-user` role. Unlike a simple list of labels, a party may also be an identifiable `organization`, `person`, or `system` (e.g., an AI agent), with legal names, jurisdictions, and identifiers, so that obligations (e.g., as a deployer under the EU AI Act) can be assigned.
+* **Use cases** - Each use case is declared in the BOM's `definitions.useCases`, naming its `actors` (references to parties) and optionally its pre- and post-conditions, main flow steps, alternative flows, exceptions, and success criteria.
+* **Use case assertions** - The model component declares its relationship to each use case using `useCaseAssertions` (e.g., `implements`, `supports`, `participates-in`, or `inhibits`).
+
+###### Example: Qwen/Qwen-7B
+
+This example shows what kind of user and use case information would be expected for a typical `7B` parameter size Large Language Model (LLM) that is multi-lingual and supports code/instruct capabilities.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "useCaseAssertions": [
+ {
+ "assertionType": "supports",
+ "useCaseRefs": [
+ "uc-code-assistant",
+ "uc-translation",
+ "uc-support-triage",
+ "uc-research-summarization",
+ "uc-edge-device",
+ "uc-security-log-analysis",
+ "uc-local-assistant"
+ ]
+ }
+ ]
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ],
+ "definitions": {
+ "parties": [
+ { "refId": "user-software-developer", "roles": [ { "role": "end-user" } ], "persona": { "label": "Software developer", "archetype": "developer" } },
+ { "refId": "user-content-creator", "roles": [ { "role": "end-user" } ], "persona": { "label": "Multilingual Content Creator" } },
+ { "refId": "user-support-architect", "roles": [ { "role": "end-user" } ], "persona": { "label": "Customer Support Systems Architect" } },
+ { "refId": "user-researcher", "roles": [ { "role": "end-user" } ], "persona": { "label": "Academic Researcher / Student", "archetype": "researcher" } },
+ { "refId": "user-edge-engineer", "roles": [ { "role": "end-user" } ], "persona": { "label": "Edge Device Engineer" } },
+ { "refId": "user-security-analyst", "roles": [ { "role": "end-user" } ], "persona": { "label": "Enterprise Security Analyst", "scope": "internal" } },
+ { "refId": "user-local-ai", "roles": [ { "role": "end-user" } ], "persona": { "label": "Local AI Enthusiast / Privacy-First User" } }
+ ],
+ "useCases": [
+ {
+ "refId": "uc-code-assistant",
+ "name": "IDE code assistant",
+ "description": "Utilizing the Qwen \"instruct\" variants within an IDE for real-time code completion, bug fixing, and unit test generation, benefiting from its \"Agentic\" capabilities for repository-scale understanding.",
+ "actors": [ "user-software-developer" ]
+ },
+ {
+ "refId": "uc-translation",
+ "name": "Content translation",
+ "description": "Translating business, education, or other content or informational materials to other languages and dialects while maintaining the original tone and cultural nuances.",
+ "actors": [ "user-content-creator" ]
+ },
+ {
+ "refId": "uc-support-triage",
+ "name": "Customer support triage",
+ "description": "Deploying low-latency chatbots for high-volume inquiries where the 7B model acts as a \"triage\" agent, answering common questions and only escalating complex logic to other support mechanisms.",
+ "actors": [ "user-support-architect" ]
+ },
+ {
+ "refId": "uc-research-summarization",
+ "name": "Research summarization and drafting",
+ "description": "Summarizing long-form research papers and generating initial drafts for school projects, utilizing the model's long context window to ingest entire documents at once.",
+ "actors": [ "user-researcher" ]
+ },
+ {
+ "refId": "uc-edge-device",
+ "name": "On-device natural language control",
+ "description": "Implementing the model on specialized hardware for real-time perception and reasoning to help an intelligent device navigate and interact with its environment based on natural language commands.",
+ "actors": [ "user-edge-engineer" ]
+ },
+ {
+ "refId": "uc-security-log-analysis",
+ "name": "Self-hosted security log analysis",
+ "description": "Running a self-hosted instance to analyze internal security logs for anomalies, ensuring that sensitive infrastructure data never leaves the organization's firewall.",
+ "actors": [ "user-security-analyst" ]
+ },
+ {
+ "refId": "uc-local-assistant",
+ "name": "Local personal assistant",
+ "description": "Running a personal assistant locally on a laptop to answer questions or process private information such as emails or calendars without sending data to an external server.",
+ "actors": [ "user-local-ai" ]
+ }
+ ]
+ }
+}
+```
+
+###### Field discussion
+
+* **parties** - Each user is a `persona` party with the `end-user` role. Where applicable, a predefined persona `archetype` (e.g., `developer`, `researcher`) may be used, and the persona's `scope` (`internal`, `external`, or `mixed`) may be provided.
+* **useCases.actors** - There is no expectation that there is a 1:1 correlation between users and use cases. However, every use case should name at least one actor that corresponds to a declared user (party).
+* **useCaseAssertions** - The model `supports` each of the use cases. A component that is the primary capability realizing a use case would instead assert `implements`.
+
+> **Tip**: For use cases that matter for regulatory or risk evaluation, the `mainFlow` steps (each naming its acting party), `exceptions`, and `successCriteria` should be provided so that evaluators can trace exactly who does what with the model.
+
+## Technical limitations
+
+Since ML models are fundamentally probabilistic and operate on pattern recognition from the data they are trained on, they are prone to various technical limitations.
+
+Some of these limitations include:
+
+* **Hallucination & Inaccuracy**: Due to their autoregressive nature, models prioritize generating plausible-sounding text over factual accuracy (a.k.a. "sycophancy").
+* **Context Window Constraints**: Limited memory prevents the model from processing or remembering long, complex interactions or large documents at once.
+* **Reasoning & Math Deficiencies**: They often struggle with complex, multi-step logic and mathematical reasoning.
+* **Knowledge Cutoff**: Models are generally frozen in time, meaning they cannot access real-time information without external retrieval systems.
+* **Opacity** (lack of traceable reasoning): models' complex architectures make it difficult to trace how a specific output was generated.
+* **Probabilistic Output Inconsistency**: The same prompt can yield different results (e.g., using different seeds or system context carryover), causing reliability issues.
+* **Bias Reinforcement**: Models often replicate or amplify biases present in their training data. This has become more problematic as reliance on synthetic training data has increased.
+
+Technical limitations are provided in the model's `modelProperties.limitations` array. Limitations that expose users or other parties to potential harm should *also* be documented as risks (see [Ethical considerations](#ethical-considerations)).
+
+###### Example: Sample technical limitations for Qwen-7B
+
+This example shows a list of technical limitations that might be associated with a typical multi-lingual, code-/instruction-capable Large Language Model (LLM) with a similar parameter size.
+
+```json
+{
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "modelProperties": {
+ // ...,
+ "limitations": [
+ "Greedy Decoding Degradation. The model is optimized for sampling-based generation. Using greedy decoding (temperature=0) can lead to performance degradation, repetitive loops, and \"stuck\" reasoning steps, particularly in the new Thinking Mode",
+ "Native Context Window Boundaries. While the model supports up to 131,072 tokens using YaRN scaling, its native pre-training context is limited to 32,768 tokens. Performance may degrade on very long sequences if proper scaling factors (like RoPE or YaRN) are not manually configured for local deployments.",
+ "Synthetic Data \"Sanding\" Effects. Research indicates that Qwen, like many models trained on massive synthetic datasets, can suffer from \"model collapse\" where rare edge cases or minority user behaviors are underrepresented, potentially leading to errors in complex, real-world production environments.",
+ "Thinking Mode History Overhead. In multi-turn conversations, including the model's internal \"thinking\" steps in the chat history can confuse the model and consume unnecessary tokens. Best practices require developers to filter out \"thinking\" content from the history to maintain coherence."
+ ]
+ }
+}
+```
+
+## Performance Tradeoffs
+
+When creating Machine Learning (ML) models, developers must navigate several core performance tradeoffs to align model capabilities with business needs and technical constraints.
+
+Some of these tradeoff considerations include:
+
+* **Accuracy vs. Interpretability**: Complex models often provide higher accuracy but are "black boxes," making them hard to interpret. Simpler models are easy to explain but may not capture complex patterns, sacrificing performance for transparency.
+* **Accuracy vs. Speed/Latency**: Highly accurate models often require significant computation, leading to slower inference times. In production, a slightly less accurate model that responds in milliseconds is frequently preferred over a highly accurate model that takes seconds.
+* **Bias vs. Variance** (Generalization): Highly flexible models (low bias) can overfit to training data, leading to high variance and poor performance on new data. Conversely, simpler models (high bias) may underfit, missing patterns altogether.
+* **Complexity vs. Resource Constraints** (Cost): Larger, more complex models require more data, training time, and computational power (GPUs/CPUs). Developers must balance the need for model performance against budget, infrastructure, and deployment constraints.
+* **Precision vs. Recall**: For models that perform classification, developers often must choose whether to minimize false positives (high precision) or false negatives (high recall).
+
+CycloneDX 2.0 does not define a dedicated field for performance tradeoffs. Since a tradeoff describes a constraint on accuracy, scalability, or appropriate use, tradeoffs should be included in the model's `modelProperties.limitations` array. A tradeoff whose consequence is significant enough to warrant assessment may instead (or additionally) be modeled as a risk with paired `harm` and `benefit` impacts (see [Fairness assessments](#fairness-assessments)).
+
+
+
+###### Example: Performance tradeoffs for Qwen-7B
+
+This example shows how to provide performance trade-offs for a few acknowledged parameters in the Qwen 7B parameter model.
+
+```json
+{
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B",
+ // ...,
+ "modelProperties": {
+ // ...,
+ "limitations": [
+ // ...,
+ "Performance tradeoff: Intelligence Plateau in Domain-Specific Tasks. Research indicates that for specialized fields like legal text analysis, performance often flattens beyond the 7B parameter mark. While efficient, the 7B model may not offer the incremental reasoning gains found in the 32B or 235B models for complex, high-stakes domain reasoning.",
+ "Performance tradeoff: Enhanced Quantization Sensitivity. The Qwen-7B employs advanced pre-training techniques that reduce parameter redundancy. A documented tradeoff of this efficiency is a higher sensitivity to low-bit quantization (3-bit and below), where it exhibits more pronounced performance degradation compared to previous 7B generations.",
+ "Performance tradeoff: Context Window Consistency. While the 7B model supports a native context window of 32,768 tokens, its performance degrades significantly more than the Qwen-8B (which uses YaRN scaling to reach 128K+) when handling massive document sets. Users must tradeoff deep long-document comprehension for the 7B's lower memory footprint.",
+ "Performance tradeoff: Conciseness vs. Contextual Nuance. Experiments show that the older 7B design prioritizes cleaner, easier-to-read, and more concise outputs. The tradeoff is a loss of the \"faithful and nuanced\" insights and richer context provided by the newer 8B and larger architectures.",
+ "Performance tradeoff: Agentic Capability Limitations. The 7B model shows a documented gap in its ability to follow complex multi-step instructions or navigate large software repositories, requiring tighter chunking and more finely tuned prompts to be effective",
+ "Performance tradeoff: Hardware Efficiency vs. Throughput. Running the 7B model on older hardware (e.g., 8GB VRAM cards) is possible but results in a tradeoff of throughput. Modern inference techniques like continuous batching and PagedAttention are less effective at this scale than on the larger, more parallelizable MoE models.",
+ "Performance tradeoff: Decoding Strategy Rigidity. The 7B model is highly sensitive to sampling parameters; specifically, using greedy decoding (temperature=0) can lead to severe repetition loops and \"endless repetitions\". To maintain performance, users must tradeoff predictability for more complex sampling-based generation."
+ ]
+ }
+}
+```
+
+###### Field discussion
+
+* **limitations** - Prefixing each entry with "Performance tradeoff:" allows tradeoffs to be distinguished from other technical limitations.
+
+## Ethical considerations
+
+In CycloneDX 2.0, known ethical considerations are declared as *risks* in the BOM's top-level `risks` object. This turns each design-time consideration into an acknowledged, referenceable risk attached to the model. Each risk includes:
+
+* **refId**, **name**, and **statement** (required) - A concise name, and a statement that reads as *source → event → impact*.
+* **domains** - The risk domains, such as `ethical`, `fairness`, `societal`, `privacy`, `security`, `safety`, `environmental`, `human-rights`, or `legal`.
+* **affects** - References to what the risk applies to: the model component's `refId` and, where relevant, parties (e.g., groups at risk).
+* **inherentRisk** - An optional rating including the `likelihood` and graded `impacts` (each a `harm` or `benefit`, with a `level` from `negligible` to `catastrophic` and impact `categories`).
+* **responses** - The mitigations, each with a `strategy` (e.g., `reduce`, `avoid`, `share`, `accept`, or `enhance` for benefits) and a `description`.
+* **status** - `identified`, `assessed`, `treated`, `monitored`, or `retired`.
+
+> **Note**: Separating the risk `name` from its `statement` removes the 1.7 practice of overloading the `name` field to describe the consideration.
+
+###### Example: Qwen-7B ethical considerations
+
+Based on technical reports and safety evaluations such as Qwen3Guard, the following ethical considerations and mitigations are documented and typical of a multi-lingual LLM of similar parameter size and with a dense architecture:
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9",
+ "name": "Qwen/Qwen-7B"
+ // ...
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ],
+ "risks": {
+ "risks": [
+ {
+ "refId": "risk-bias",
+ "name": "Algorithmic and Cultural Bias",
+ "statement": "Training on trillions of tokens across many languages → the model reflects societal biases and stereotypes present in its training data → representational harm to affected groups.",
+ "domains": [ { "type": "ethical" }, { "type": "fairness" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9" ],
+ "status": "identified",
+ "responses": [
+ {
+ "refId": "resp-bias-detection",
+ "strategy": "reduce",
+ "description": "Use the Qwen-Gender framework or Chain-of-Thought (CoT) prompting to detect and reduce implicit biases in generated text."
+ }
+ ]
+ },
+ {
+ "refId": "risk-jailbreak",
+ "name": "Vulnerability to Adversarial Attacks (Jailbreaking)",
+ "statement": "Despite safety tuning, users craft adversarial prompts (\"Prompt Hacking\" or \"Jailbreaking\") → safety constraints are bypassed → the model generates toxic or illegal content.",
+ "domains": [ { "type": "ethical" }, { "type": "security" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9" ],
+ "status": "identified",
+ "responses": [
+ {
+ "refId": "resp-guard-filter",
+ "strategy": "reduce",
+ "description": "Implement Qwen3Guard as an input/output filter to classify and block unsafe queries or responses in real-time."
+ }
+ ]
+ },
+ {
+ "refId": "risk-hallucination",
+ "name": "Misinformation or Hallucinations",
+ "statement": "Probabilistic generation without grounding → the model fabricates false or misleading information, especially regarding sensitive topics like government actions or historical events → users are misinformed.",
+ "domains": [ { "type": "ethical" }, { "type": "societal" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9" ],
+ "status": "identified",
+ "responses": [
+ {
+ "refId": "resp-rag-grounding",
+ "strategy": "reduce",
+ "description": "Explicitly instruct the model to \"Prioritize Safety\" in the prompt and use Retrieval-Augmented Generation (RAG) to ground responses in verified external documents."
+ }
+ ]
+ },
+ {
+ "refId": "risk-pii-leakage",
+ "name": "Privacy, Sensitive or Personally Identifiable Information (PII) Content Leakage",
+ "statement": "Sensitive or personally identifiable data present in the pre-training corpus → the model reproduces such data in its outputs → privacy violation.",
+ "domains": [ { "type": "ethical" }, { "type": "privacy" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9" ],
+ "status": "identified",
+ "responses": [
+ {
+ "refId": "resp-local-deploy-pii-scrub",
+ "strategy": "reduce",
+ "description": "Deploy the model locally using tools like Ollama to ensure sensitive data stays within a secure environment, and apply regex-based PII scrubbing to outputs."
+ }
+ ]
+ },
+ {
+ "refId": "risk-inference-energy",
+ "name": "Environmental Impact (Inference Energy)",
+ "statement": "Continuous large-scale deployment of even mid-sized models like the 7B → significant energy consumption → increased carbon footprint.",
+ "domains": [ { "type": "ethical" }, { "type": "environmental" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9" ],
+ "status": "identified",
+ "responses": [
+ {
+ "refId": "resp-quantize-efficient-inference",
+ "strategy": "reduce",
+ "description": "Utilize 4-bit quantization and low-latency inference engines to reduce the FLOPs required per token, minimizing the power draw per query."
+ }
+ ]
+ },
+ {
+ "refId": "risk-instruction-misalignment",
+ "name": "Instruction Misalignment",
+ "statement": "In-context learning → \"emergent misalignment\" where the model prioritizes following a user's conversational style → established safety boundaries are not respected.",
+ "domains": [ { "type": "ethical" }, { "type": "safety" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9" ],
+ "status": "identified",
+ "responses": [
+ {
+ "refId": "resp-system-prompt-hard-switch",
+ "strategy": "reduce",
+ "description": "Standardize output formats using system prompts and utilize the \"hard switch\" to disable the model's internal thinking mode when maximum safety and predictability are required."
+ }
+ ]
+ }
+ // ...
+ ]
+ }
+}
+```
+
+###### Field discussion
+
+* **affects** - Each risk references the model component by its `refId`, so that tools can find all of the risks attributed to a given model.
+* **domains** - Every ethical consideration carries the `ethical` domain, with an additional domain (e.g., `privacy`, `security`, `environmental`) to further qualify it.
+* **status** - The value `identified` reflects that the risks are documented by the provider at design time, and that the responses are the provider's recommended mitigations. Deployers that implement and verify a mitigation may update a risk's status (e.g., to `treated`) and rate the remaining (`residualRisk`) for their system.
+* **inherentRisk** - Omitted in this example since the source documentation does not grade the risks. Where an assessment has been performed, providers should include a rating with graded `impacts` (see the next section).
+
+## Fairness assessments
+
+Fairness assessments convey information about the benefits and harms of the model to an identified at-risk group. They involve measuring how models treat different social groups to ensure they do not perpetuate or amplify harmful social biases.
+
+For Large Language Models (LLMs), like Qwen, Mistral, or GPT, etc., assessments typically evaluate the model focusing on its training data, internal probabilities (weights and biases), and final generated text using metrics that can be statistically analyzed.
+
+Assessments consider evaluations at all stages of the model development lifecycle, including:
+
+* **Data Bias Auditing** (Pre-processing): Analyzing training datasets for under-represented groups, improper labeling, or historical biases that could cause discriminatory outcomes.
+* **Disaggregated Performance Metrics** (Measurement): Evaluating model performance (e.g., accuracy, false positives/negatives) across different demographic groups (e.g., race, gender) to identify, for example, higher error rates for certain populations.
+* **Impact Assessments** (Contextual): Assessing how AI systems affect specific groups of people, identifying potential harms to rights, safety, or livelihoods, which is a key requirement for high-risk AI under the EU AI Act.
+* **Adversarial Testing** (Verification): Intentionally challenging the AI model with edge cases to uncover hidden biases or vulnerabilities.
+* **Algorithmic Fairness Interventions** (In-processing/Post-processing): Implementing technical solutions to correct identified disparities, such as modifying the model architecture during training or adjusting output thresholds to ensure fair decision-making.
+
+In CycloneDX 2.0, each fairness assessment is declared as a risk with the `fairness` domain, mapped from its 1.7 form as follows:
+
+| CycloneDX 1.7 `fairnessAssessments` field | CycloneDX 2.0 |
+|---|---|
+| `groupAtRisk` | A `persona` party (with a custom `affected-group` role) referenced from the risk's `affects` |
+| `harms` | An `inherentRisk.impacts` entry with `polarity` `harm`, a `level`, `categories`, and the 1.7 text as its `description` |
+| `benefits` | An `inherentRisk.impacts` entry with `polarity` `benefit`, a `level`, `categories`, and the 1.7 text as its `description` |
+| `mitigationStrategy` | `responses` entries (`reduce` for harms, `enhance` for benefits) |
+
+Disaggregated performance metrics that substantiate a fairness assessment can be provided as performance metrics (with a `slice` naming the group) in the model's `measurements` (see [Performance metrics](0x23-Design-Model-Card-Quantitative-Analysis.md#performance-metrics)).
+
+###### Example: LLM fairness assessment for Qwen-7B
+
+This example shows how fairness assessment information would be included in a CycloneDX AI/ML-BOM.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ // ...,
+ "definitions": {
+ "parties": [
+ {
+ "refId": "group-protected-characteristics",
+ "roles": [ { "name": "affected-group", "description": "A group of people at risk of being systematically disadvantaged by the model." } ],
+ "persona": {
+ "label": "People identified by protected characteristics",
+ "description": "People identified by characteristics such as race, gender, and disability status."
+ }
+ },
+ {
+ "refId": "group-other-language-speakers",
+ "roles": [ { "name": "affected-group" } ],
+ "persona": {
+ "label": "Non-English/Non-Chinese speakers",
+ "description": "Non-English/Non-Chinese speakers, speakers of regional dialects or specific geographic regions (e.g., Southeast Asia or the Middle East) on thinking or \"reasoning\" tasks."
+ }
+ }
+ ]
+ },
+ "risks": {
+ "risks": [
+ {
+ "refId": "risk-fairness-discriminatory-outcomes",
+ "name": "Discriminatory outcomes across protected characteristics",
+ "statement": "Biases in training data → the model produces discriminatory outcomes across protected characteristics in task assignment scenarios → individuals in the affected groups are unfairly labeled or treated.",
+ "domains": [ { "type": "fairness" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9", "group-protected-characteristics" ],
+ "status": "assessed",
+ "inherentRisk": {
+ "impacts": [
+ {
+ "polarity": "harm",
+ "level": "major",
+ "categories": [ "discrimination" ],
+ "description": "The model was found to produce discriminatory outcomes across protected characteristics, including race, gender, and disability status. For example, individuals categorized as \"gypsy\" or \"mute\" were incorrectly labeled as untrustworthy in task assignment scenarios."
+ }
+ ]
+ },
+ "responses": [
+ {
+ "refId": "resp-rlaif-alignment",
+ "strategy": "reduce",
+ "description": "Researchers recommend using Reinforcement Learning from Artificial Intelligence Feedback (RLAIF) and rule-based rewards to align the model with specific legal standards like the EU AI Act."
+ }
+ ]
+ },
+ {
+ "refId": "risk-fairness-quality-of-service",
+ "name": "Quality-of-service disparity across languages",
+ "statement": "Reasoning capabilities trained predominantly on English and Mandarin data → oversimplified, factually incorrect, or hallucinated responses in other supported languages → lower quality of service for speakers of those languages.",
+ "domains": [ { "type": "fairness" } ],
+ "affects": [ "pkg:huggingface/Qwen/Qwen-7B@ef3c5c9", "group-other-language-speakers" ],
+ "status": "assessed",
+ "inherentRisk": {
+ "impacts": [
+ {
+ "polarity": "harm",
+ "level": "moderate",
+ "categories": [ "fairness" ],
+ "description": "Quality-of-Service Harm: The model may provide high-quality, nuanced reasoning in English or Mandarin but offer oversimplified, factually incorrect, or \"hallucinated\" information when queried in other supported languages."
+ }
+ ]
+ },
+ "responses": [
+ {
+ "refId": "resp-cross-lingual-sft",
+ "strategy": "reduce",
+ "description": "Cross-Lingual Alignment: Developers can use multilingual Supervised Fine-Tuning (SFT), training on additional high-quality, parallel corpora from other languages on \"reasoning capabilities\" (e.g., logic, math, coding)."
+ }
+ ]
+ }
+ // ...
+ ]
+ }
+}
+```
+
+###### Field discussion
+
+* **parties** - Each group at risk becomes a referenceable `persona` party, so the same group can be linked to multiple risks, use cases, and assessments. CycloneDX does not predefine an "affected group" role, so a custom role (with a `name` and `description`) is used.
+* **affects** - Lists both the model and the party at risk.
+* **impacts** - Each harm (or benefit) is graded with a `level` (`negligible`, `low`, `moderate`, `major`, or `catastrophic`) and one or more impact `categories` (e.g., `discrimination`, `fairness`, `human-rights`, `societal`, `psychological`). The levels shown in this example are illustrative; providers should assign levels based on their own assessments.
+* **benefits** - Where a model provides a benefit to the same group (e.g., faster, more accessible answers), it should be declared as an additional impact with `polarity` `benefit`, and any response that increases the benefit should use the `enhance` strategy.
+
+> **Tip**: Beyond design time, the `risks` object also supports `assessments` (e.g., a periodic AI impact assessment by a named assessor party), `riskAppetites`, and `residualRisk` and `targetRisk` ratings, allowing deployers to score these risks for their own systems and use cases.
+
+## Environmental considerations
+
+### Energy consumptions
+
+This section describes how model providers can publish the energy costs incurred at different stages of the model's lifecycle to address potential regulatory requirements. This information includes the energy sources (i.e., for the datacenters) as well as disclosure of CO2 emission cost equivalents and CO2 offsets (credits).
+
+The intent is for CycloneDX to be able to support the general requirements referenced by the [EU’s AI Act](https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng), which refers to ‘environmental protection’ in its subject matter.
+
+Summary of EU AI Act Environmental Disclosure Rules for GPAI Models:
+
+* **Requirement**: Providers of General-Purpose AI (GPAI) models must disclose the known or estimated energy consumption used during their model's development.
+ * *This information is provided only upon request to the EU's AI Office and national competent authorities.*
+* **Reference**: These requirements are outlined in [Article 53](https://artificialintelligenceact.eu/article/53/) and [Annex XI](https://artificialintelligenceact.eu/annex/11/) of the [EU AI Act](https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng).
+* **Exemption**: Models released under a free and open-source license are exempt from this disclosure obligation.
+
+> **Note**: Since most trained models are published under some form of open license, most providers do not currently disclose the costs of training their models.
+
+In CycloneDX 2.0, energy consumption is declared as an entry in the model component's `measurements` array (alongside its performance metrics). Each energy consumption entry consists of the following, which are explained in more detail below:
+
+* **Activity** (required): The type of activity that was part of the ML model development or operational lifecycle with an associated energy cost.
+
+ | Value | Description |
+ |---|---|
+ | **design** | A model design including problem framing, goal definition and algorithm selection.|
+ | **data-collection** |Model data acquisition including search, selection and transfer.|
+ | **data-preparation** | Model data preparation including data cleaning, labeling and conversion. |
+ | **training** | Model building, training and generalized tuning. |
+ | **fine-tuning** | Refining a trained model to produce desired outputs for a given problem space. |
+ | **validation** | Model validation including model output evaluation and testing. |
+ | **deployment** | Explicit model deployment to a target hosting infrastructure. |
+ | **operation** | Ongoing operation of a deployed model (e.g., hosting). |
+ | **inference** | Generating an output response from a hosted model from a set of inputs. |
+ | **end-of-life** | Decommissioning or retirement of the model. |
+
+ The values `manufacturing` and `transport` are also defined for physical components. An activity whose description does not match the predefined values can be provided as a custom activity object with a `name` and `description` (this replaces the 1.7 value `other`).
+
+* **Description**: An optional description of the activity's energy consumption.
+
+* **Formula**: An optional reference to the `formulation` formula describing the activity (e.g., the training workflow).
+
+* **Energy providers**: The provider(s) of the energy consumed by the associated model development lifecycle activity. Each entry includes the following fields:
+ * **description**: A description of the energy provider.
+ * **provider** (required): The party (e.g., `organization`) that provides the energy, which may include its name, addresses, URLs and identifiers. In 1.7, this was the `organization` field.
+ * **energySource** (required): A value that is one of `coal`, `oil`, `natural-gas`, `nuclear`, `wind`, `solar`, `geothermal`, `hydropower`, `biofuel`, `biomass`, `hydrogen`, `tidal`, `unknown`, or a custom energy source.
+ * **energyProvided** (required): The energy provided by the energy source for an associated activity using Kilowatt-hours (kWh).
+ * **externalReferences**: Optional references (links) to the energy provider.
+
+* **Activity energy cost** (required): The total energy cost associated with the model lifecycle activity using Kilowatt-hours (kWh).
+
+* **CO2 cost equivalent**: The CO2 cost (debit) equivalent to the total energy cost using tonnes of Carbon Dioxide (CO2) equivalent (tCO2eq).
+
+* **CO2 cost offset**: The CO2 offset (credit) for the CO2 equivalent cost using tonnes of Carbon Dioxide (CO2) equivalent (tCO2eq).
+
+###### Example: "Fake" llama3 environmental considerations
+
+This example is for a "fake" model based upon the llama3 architecture.
+
+```json
+{
+ "$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
+ "specFormat": "CycloneDX",
+ "specVersion": "2.0",
+ "serialNumber": "urn:uuid:ed5c5ba0-2be6-4b58-ac29-01a7fd375123",
+ "version": 1,
+ "inventories": [
+ {
+ "subject": {
+ "type": "machine-learning-model",
+ "refId": "pkg:huggingface/FakeAI/Llama3@abcd123",
+ "name": "FakeAI/Llama3",
+ // ...,
+ "measurements": [
+ {
+ "activity": "training",
+ "energyProviders": [
+ {
+ "description": "Meta data-center, US-East",
+ "provider": {
+ "roles": [ { "role": "supplier" } ],
+ "organization": {
+ "name": "Fake.ai",
+ "addresses": [
+ {
+ "country": "United States",
+ "region": "New Jersey",
+ "locality": "Newark"
+ }
+ ]
+ }
+ },
+ "energySource": "natural-gas",
+ "energyProvided": {
+ "value": 0.4,
+ "unit": "kWh"
+ }
+ }
+ ],
+ "activityEnergyCost": {
+ "value": 0.4,
+ "unit": "kWh"
+ },
+ "co2CostEquivalent": {
+ "value": 31.22,
+ "unit": "tCO2eq"
+ },
+ "co2CostOffset": {
+ "value": 31.22,
+ "unit": "tCO2eq"
+ }
+ }
+ ]
+ },
+ "components": [
+ // ...
+ ]
+ }
+ ]
+}
+```
+
+###### Field discussion
+
+* **provider** - The energy provider is a CycloneDX party, which requires at least one role; the `supplier` role is used for the organization that supplies the energy.
+* **addresses** - A party organization may have multiple postal addresses (in 1.7, `address` was a single object).
+* **unit** - the unit `tCO2eq` is defined by the European Commission and stands for metric tonnes of carbon dioxide equivalent, a standardized unit used to measure the total greenhouse gas emissions (including methane and nitrous oxide) generated during the development, training, and operation of AI systems.
+
+
diff --git a/ML-BOM/2.0/en/0x40-Design-Additional-Model-Information.md b/ML-BOM/2.0/en/0x40-Design-Additional-Model-Information.md
new file mode 100644
index 00000000..6a22e971
--- /dev/null
+++ b/ML-BOM/2.0/en/0x40-Design-Additional-Model-Information.md
@@ -0,0 +1,460 @@
+# Additional model-related information
+
+This section describes the design and best practices when providing other model-related information for an ML model's component within a CycloneDX AI/ML-BOM.
+
+Currently, the v2.0 CycloneDX specification may not have specific objects or fields to document certain types of information directly. However, these sections will show how CycloneDX extension mechanisms, such as `properties`, `tags`, and `externalReferences`, can be used to provide and classify such additional ML-related information.
+
+For convenience, here are links to the specific sections for some of these acknowledged informational areas:
+
+* [Using CycloneDX AI/ML properties](#using-cyclonedx-aiml-properties)
+ * [Declaring a model's modalities](#declaring-a-models-modalities)
+ * [Annotating a model's supported languages](#annotating-a-models-supported-languages)
+ * [Providing free-form tags for search](#providing-free-form-tags-for-search)
+ * [Providing a model's usage policy](#providing-a-models-usage-policy)
+* [Tokenizers and prompt templates](#tokenizers-and-prompt-templates)
+* [Including manufacturing information for the ML model](#including-manufacturing-information-for-the-ml-model)
+ * [Declaring hardware and software training components](#declaring-hardware-and-software-training-components)
+ * [Providing training workflow details](#providing-training-workflow-details)
+ * [Declaring the runtime topology](#declaring-the-runtime-topology)
+
+## Using CycloneDX AI/ML properties
+
+This section includes discussion and examples of supported AI/ML-related metadata properties that can be used to classify models in their AI/ML-BOM. This method utilizes reserved [AI/ML property names](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/ai-ml.md) registered under the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy).
+
+> **Note**: The CycloneDX schema is standardized through Ecma International (and ISO) and changes on its ratification cycle, whereas new names and values can be registered in the property taxonomy at any time. Properties therefore allow AI/ML-BOMs to keep pace with new AI/ML concepts without waiting for a schema revision. Names that are not (yet) registered may be declared using the `_undefined: