ONNX 模型库
返回模型

说明文档


language:

  • en

  • de

  • fr

  • it

  • pt

  • hi

  • es

  • th library_name: transformers pipeline_tag: text-generation tags:

  • facebook

  • meta

  • pytorch

  • llama

  • llama-3 license: llama3.2 extra_gated_prompt: >-

    LLAMA 3.2 COMMUNITY LICENSE AGREEMENT

    Llama 3.2 Version Release Date: September 25, 2024

    “Agreement” means the terms and conditions for use, reproduction, distribution and modification of the Llama Materials set forth herein.

    “Documentation” means the specifications, manuals and documentation accompanying Llama 3.2 distributed by Meta at https://llama.meta.com/doc/overview.

    “Licensee” or “you” means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.

    “Llama 3.2” means the foundational large language models and software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing distributed by Meta at https://www.llama.com/llama-downloads.

    “Llama Materials” means, collectively, Meta’s proprietary Llama 3.2 and Documentation (and any portion thereof) made available under this Agreement.

    “Meta” or “we” means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).

    By clicking “I Accept” below or by using or distributing any portion or element of the Llama Materials, you agree to be bound by this Agreement.

    1. License Rights and Redistribution.

    a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Llama Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Llama Materials.

    b. Redistribution and Use.

    i. If you distribute or make available the Llama Materials (or any derivative works thereof), or a product or service (including another AI model) that contains any of them, you shall (A) provide a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with Llama” on a related website, user interface, blogpost, about page, or product documentation. If you use the Llama Materials or any outputs or results of the Llama Materials to create, train, fine tune, or otherwise improve an AI model, which is distributed or made available, you shall also include “Llama” at the beginning of any such AI model name.

    ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part of an integrated end user product, then Section 2 of this Agreement will not apply to you.

    iii. You must retain in all copies of the Llama Materials that you distribute the following attribution notice within a “Notice” text file distributed as a part of such copies: “Llama 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.”

    iv. Your use of the Llama Materials must comply with applicable laws and regulations (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama Materials (available at https://www.llama.com/llama3_2/use-policy), which is hereby incorporated by reference into this Agreement.

    1. Additional Commercial Terms. If, on the Llama 3.2 version release date, the monthly active users of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700 million monthly active users in the preceding calendar month, you must request a license from Meta, which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the rights under this Agreement unless or until Meta otherwise expressly grants you such rights.

    2. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.

    3. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.

    4. Intellectual Property.

    a. No trademark licenses are granted under this Agreement, and in connection with the Llama Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates, except as required for reasonable and customary use in describing and redistributing the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a license to use “Llama” (the “Mark”) solely as required to comply with the last sentence of Section 1.b.i. You will comply with Meta’s brand guidelines (currently accessible at https://about.meta.com/brand/resources/meta/company-brand/). All goodwill arising out of your use of the Mark will inure to the benefit of Meta.

    b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the Llama Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.

    c. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Llama 3.2 outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the Llama Materials.

    1. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Llama Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this Agreement.

    2. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement.

    Llama 3.2 Acceptable Use Policy

    Meta is committed to promoting safe and fair use of its tools and features, including Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of this policy can be found at https://www.llama.com/llama3_2/use-policy.

    Prohibited Uses

    We want everyone to use Llama 3.2 safely and responsibly. You agree you will not use, or allow others to use, Llama 3.2 to:

    1. Violate the law or others’ rights, including to:
      1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
        1. Violence or terrorism
        2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material
        3. Human trafficking, exploitation, and sexual violence
        4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.
        5. Sexual solicitation
        6. Any other criminal activity
      2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
      3. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
      4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
      5. Collect, process, disclose, generate, or infer private or sensitive information about individuals, including information about individuals’ identity, health, or demographic information, unless you have obtained the right to do so in accordance with applicable law
      6. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama Materials
      7. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
      8. Engage in any action, or facilitate any action, to intentionally circumvent or remove usage restrictions or other safety measures, or to enable functionality disabled by Meta
    2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Llama 3.2 related to the following: 8. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State or to the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons Convention Implementation Act of 1997 9. Guns and illegal weapons (including weapon development) 10. Illegal drugs and regulated/controlled substances 11. Operation of critical infrastructure, transportation technologies, or heavy machinery 12. Self-harm or harm to others, including suicide, cutting, and eating disorders 13. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
    3. Intentionally deceive or mislead others, including use of Llama 3.2 related to the following: 14. Generating, promoting, or furthering fraud or the creation or promotion of disinformation 15. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content 16. Generating, promoting, or further distributing spam 17. Impersonating another individual without consent, authorization, or legal right 18. Representing that the use of Llama 3.2 or outputs are human-generated 19. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
    4. Fail to appropriately disclose to end users any known dangers of your AI system
    5. Interact with third party tools, models, or software designed to generate unlawful content or engage in unlawful or harmful conduct and/or represent that the outputs of such tools, models, or software are associated with Meta or Llama 3.2

    With respect to any multimodal models included in Llama 3.2, the rights granted under Section 1(a) of the Llama 3.2 Community License Agreement are not being granted to you if you are an individual domiciled in, or a company with a principal place of business in, the European Union. This restriction does not apply to end users of a product or service that incorporates any such multimodal models.

    Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation of this Policy through one of the following means:

    • Reporting issues with the model: https://github.com/meta-llama/llama-models/issues

    • Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback

    • Reporting bugs and security concerns: facebook.com/whitehat/info

    • Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama 3.2: LlamaUseReport@meta.com extra_gated_fields: First Name: text Last Name: text Date of birth: date_picker Country: country Affiliation: text Job title: type: select options:

      • Student
      • Research Graduate
      • AI researcher
      • AI developer/engineer
      • Reporter
      • Other geo: ip_location By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy: checkbox extra_gated_description: >- The information you provide will be collected, stored, processed and shared in accordance with the Meta Privacy Policy. extra_gated_button_content: Submit

模型信息

Meta Llama 3.2 多语言大语言模型(LLM)系列是一组预训练和指令微调的生成式模型,提供 1B 和 3B 两种规模(文本输入/文本输出)。Llama 3.2 指令微调纯文本模型针对多语言对话用例进行了优化,包括代理检索和摘要任务。它们在常见的行业基准测试中优于许多可用的开源和闭源聊天模型。

模型开发者: Meta

模型架构: Llama 3.2 是一个使用优化 Transformer 架构的自回归语言模型。微调版本使用监督微调(SFT)和带人类反馈的强化学习(RLHF)来与人类对有帮助性和安全性的偏好保持一致。

训练数据 参数量 输入模态 输出模态 上下文长度 GQA 共享嵌入 词元数量 知识截止日期
Llama 3.2(纯文本) 公开可用的在线数据新组合。 1B (1.23B) 多语言文本 多语言文本和代码 128k 高达 9T 词元 2023年12月
3B (3.21B) 多语言文本 多语言文本和代码

支持的语言: 英语、德语、法语、意大利语、葡萄牙语、印地语、西班牙语和泰语为官方支持语言。Llama 3.2 在比这8种支持语言更广泛的语言集合上进行了训练。开发者可以为这些支持语言之外的语言微调 Llama 3.2 模型,前提是他们遵守 Llama 3.2 社区许可协议和可接受使用政策。开发者始终应确保其部署(包括涉及额外语言的部署)以安全和负责任的方式完成。

Llama 3.2 模型系列: 词元计数仅指预训练数据。所有模型版本都使用分组查询注意力(GQA)来提高推理可扩展性。

模型发布日期: 2024年9月25日

状态: 这是一个在离线数据集上训练的静态模型。未来可能会发布改进模型能力和安全性的版本。

许可: Llama 3.2 的使用受 Llama 3.2 社区许可协议(自定义的商业许可协议)管辖。

反馈: 关于模型的问题或评论的发送位置以及如何提供有关模型的反馈或评论的说明可在模型 README 中找到。有关生成参数和在应用程序中使用 Llama 3.2 的配方的更多技术信息,请访问这里

预期用途

预期用例: Llama 3.2 旨在用于多种语言的商业和研究用途。指令微调纯文本模型旨在用于类似助手的聊天和代理应用,如知识检索和摘要、移动 AI 驱动的写作助手以及查询和提示重写。预训练模型可以适应各种额外的自然语言生成任务。

不在范围内: 以任何违反适用法律或法规(包括贸易合规法律)的方式使用。以可接受使用政策和 Llama 3.2 社区许可协议禁止的任何其他方式使用。在本模型卡中未明确提及为支持的语言之外的语言中使用。

如何使用

此仓库包含两个版本的 Llama-3.2-1B-Instruct,分别用于 transformers 和原始 llama 代码库。

使用 transformers

transformers >= 4.43.0 开始,您可以使用 Transformers pipeline 抽象或利用带有 generate() 函数的 Auto 类来运行对话推理。

确保通过 pip install --upgrade transformers 更新您的 transformers 安装。

import torch
from transformers import pipeline

model_id = \"meta-llama/Llama-3.2-1B-Instruct\"
pipe = pipeline(
    \"text-generation\",
    model=model_id,
    torch_dtype=torch.bfloat16,
    device_map=\"auto\",
)
messages = [
    {\"role\": \"system\", \"content\": \"You are a pirate chatbot who always responds in pirate speak!\"},
    {\"role\": \"user\", \"content\": \"Who are you?\"},
]
outputs = pipe(
    messages,
    max_new_tokens=256,
)
print(outputs[0][\"generated_text\"][-1])

注意:您还可以在 huggingface-llama-recipes 找到有关如何在本地使用模型、使用 torch.compile()、辅助生成、量化等的详细配方。

使用 llama

请按照仓库中的说明操作。

要下载原始检查点,请参阅下面利用 huggingface-cli 的示例命令:

huggingface-cli download meta-llama/Llama-3.2-1B-Instruct --include \"original/*\" --local-dir Llama-3.2-1B-Instruct

硬件和软件

训练因素: 我们使用自定义训练库、Meta 定制构建的 GPU 集群和生产基础设施进行预训练。微调、标注和评估也在生产基础设施上进行。

训练能耗: 根据下表,训练在 H100-80GB(TDP 为 700W)类型硬件上累计使用了 916k GPU 小时的计算。训练时间是训练每个模型所需的总 GPU 时间,功耗是每个使用的 GPU 设备的峰值功率容量,并根据电源使用效率进行了调整。

训练温室气体排放: 训练的估计总基于位置的温室气体排放量为 240 吨 CO2当量。自 2020 年以来,Meta 在其全球运营中保持了温室气体净零排放,并 100% 使用可再生能源匹配其电力使用;因此,训练的总基于市场的温室气体排放量为 0 吨 CO2当量。

训练时间(GPU 小时) Logit 生成时间(GPU 小时) 训练功耗(W) 训练基于位置的温室气体排放(吨 CO2当量) 训练基于市场的温室气体排放(吨 CO2当量)
Llama 3.2 1B 370k - 700 107 0
Llama 3.2 3B 460k - 700 133 0
总计 830k 86k 240 0

用于确定训练能耗和温室气体排放的方法可以在这里找到。由于 Meta 公开发布这些模型,其他人不会产生训练能耗和温室气体排放。

训练数据

概述: Llama 3.2 在来自公开可用来源的高达 9 万亿词元的数据上进行了预训练。对于 1B 和 3B Llama 3.2 模型,我们将来自 Llama 3.1 8B 和 70B 模型的 logits 整合到模型开发的预训练阶段,其中这些较大模型的输出用作词元级目标。在剪枝后使用知识蒸馏来恢复性能。在后训练中,我们使用了与 Llama 3.1 类似的配方,并通过在预训练模型之上进行几轮对齐来生成最终的聊天模型。每轮包括监督微调(SFT)、拒绝采样(RS)和直接偏好优化(DPO)。

数据新鲜度: 预训练数据的截止日期为 2023 年 12 月。

基准测试 - 英语文本

在本节中,我们报告 Llama 3.2 模型在标准自动基准测试上的结果。对于所有这些评估,我们使用了我们的内部评估库。

基础预训练模型

类别 基准测试 # Shots 指标 Llama 3.2 1B Llama 3.2 3B Llama 3.1 8B
通用 MMLU 5 macro_avg/acc_char 32.2 58 66.7
AGIEval 英语 3-5 average/acc_char 23.3 39.2 47.8
ARC-Challenge 25 acc_char 32.8 69.1 79.7
阅读理解 SQuAD 1 em 49.2 67.7 77
QuAC (F1) 1 f1 37.9 42.9 44.9
DROP (F1) 3 f1 28.0 45.2 59.5
长上下文 Needle in Haystack 0 em 96.8 1 1

指令微调模型

能力 基准测试 # Shots 指标 Llama 3.2 1B Llama 3.2 3B Llama 3.1 8B
通用 MMLU 5 macro_avg/acc 49.3 63.4 69.4
重写 Open-rewrite eval 0 micro_avg/rougeL 41.6 40.1 40.9
摘要 TLDR9+ (test) 1 rougeL 16.8 19.0 17.2
指令遵循 IFEval 0 avg(prompt/instruction acc loose/strict) 59.5 77.4 80.4
数学 GSM8K (CoT) 8 em_maj1@1 44.4 77.7 84.5
MATH (CoT) 0 final_em 30.6 47.3 51.9
推理 ARC-C 0 acc 59.4 78.6 83.4
GPQA 0 acc 27.2 32.8 32.8
Hellaswag 0 acc 41.2 69.8 78.7
工具使用 BFCL V2 0 acc 25.7 67.0 70.9
Nexus 0 macro_avg/acc 13.5 34.3 38.5
长上下文 InfiniteBench/En.QA 0 longbook_qa/f1 20.3 19.8 27.3
InfiniteBench/En.MC 0 longbook_choice/acc 38.0 63.3 72.2
NIH/Multi-needle 0 recall 75.0 84.7 98.8
多语言 MGSM (CoT) 0 em 24.5 58.2 68.9

多语言基准测试

类别 基准测试 语言 Llama 3.2 1B Llama 3.2 3B Llama 3.1 8B
通用 MMLU (5-shot, macro_avg/acc) 葡萄牙语 39.82 54.48 62.12
西班牙语 41.5 55.1 62.5
意大利语 39.8 53.8 61.6
德语 39.2 53.3 60.6
法语 40.5 54.6 62.3
印地语 33.5 43.3 50.9
泰语 34.7 44.5 50.3

责任与安全

作为我们负责任发布方法的一部分,我们遵循三管齐下的策略来管理信任与安全风险:

  1. 使开发者能够为其目标受众和 Llama 支持的用例部署有帮助、安全和灵活的体验
  2. 保护开发者免受旨在利用 Llama 能力潜在造成伤害的对抗性用户的侵害
  3. 为社区提供保护,以帮助防止我们模型的滥用

负责任的部署

方法: Llama 是一项基础技术,旨在用于各种用例。关于 Meta 的 Llama 模型如何负责任部署的示例可以在我们的社区故事网页上找到。我们的方法是构建最有帮助的模型,使世界能够从技术力量中受益,通过将我们的模型安全性与通用用例对齐并解决一组标准伤害来实现。然后,开发者掌握主导权,为其用例定制安全性,定义自己的策略,并在其 Llama 系统中部署必要的保障措施。Llama 3.2 的开发遵循我们的负责任使用指南中概述的最佳实践。

Llama 3.2 Instruct

目标: 我们进行安全微调的主要目标是为研究界提供一个有价值的资源来研究安全微调的鲁棒性,以及为开发者提供一个现成、安全和强大的模型,用于各种应用程序,以减少开发者部署安全 AI 系统的工作量。我们实施了与 Llama 3 相同的安全缓解措施,您可以在 Llama 3 论文中了解更多关于这些措施的信息。

微调数据: 我们采用多方面的数据收集方法,将来自供应商的人工生成数据与合成数据相结合,以缓解潜在的安全风险。我们开发了许多基于大语言模型(LLM)的分类器,使我们能够深思熟虑地选择高质量的提示和响应,增强数据质量控制。

拒绝和语气: 基于我们在 Llama 3 中开始的工作,我们非常重视模型对良性提示的拒绝以及拒绝语气。我们在安全数据策略中包含了边界和对抗性提示,并修改了我们的安全数据响应以遵循语气指南。

Llama 3.2 系统

作为系统的安全性: 大语言模型,包括 Llama 3.2,不是设计为孤立部署的,而应作为具有所需额外安全防护措施的整体 AI 系统的一部分进行部署。开发者在构建代理系统时预计会部署系统保障措施。保障措施是实现正确的帮助性-安全性对齐以及缓解系统和模型或系统与外部工具的任何集成固有的安全和安全风险的关键。作为我们负责任发布方法的一部分,我们为社区提供了开发者应与 Llama 模型或其他 LLM 一起部署的保障措施,包括 Llama Guard、Prompt Guard 和 Code Shield。我们所有的参考实现演示默认包含这些保障措施,以便开发者可以开箱即用地受益于系统级安全性。

新能力和用例

技术进步: Llama 发布通常会引入需要特定考虑的新能力,除了通常适用于所有生成式 AI 用例的最佳实践之外。对于 Llama 3.2 也支持的先前发布能力,请参阅 Llama 3.1 模型卡,因为相同的考虑也适用于此。

受限环境: Llama 3.2 1B 和 3B 模型预计将部署在高度受限的环境中,例如移动设备。使用较小模型的 LLM 系统将具有不同的对齐配置文件和安全性/帮助性权衡,比更复杂、更大的系统。开发者应确保其系统的安全性满足其用例的要求。我们建议对此类用例使用较轻的系统保障措施,如 Llama Guard 3-1B 或其移动优化版本。

评估

规模化评估: 我们构建了专门的对抗性评估数据集,并评估了由 Llama 模型和 Purple Llama 保障措施组成的系统,以过滤输入提示和输出响应。在上下文中评估应用程序很重要,我们建议为您的用例构建专门的评估数据集。

红队测试: 我们进行了反复的红队测试练习,目标是通过对对抗性提示发现风险,我们利用这些学习来改进我们的基准测试和安全调优数据集。我们与关键风险领域的主题专家早期合作,以了解这些现实世界伤害的性质以及此类模型如何可能导致对社会意外伤害。基于这些对话,我们为红队推导了一组对抗性目标来尝试实现,例如提取有害信息或重新编程模型以潜在有害的能力行动。红队由网络安全、对抗性机器学习、负责任 AI 和诚信方面的专家以及具有特定地理市场诚信问题背景的多语言内容专家组成。

关键风险

除了上述安全工作外,我们还特别关注测量和/或缓解以下关键风险领域:

1. CBRNE(化学、生物、放射、核和爆炸武器): Llama 3.2 1B 和 3B 模型是 Llama 3.1 的更小和更不具能力的派生模型。对于 Llama 3.1 70B 和 405B,为了评估与化学和生物武器扩散相关的风险,我们进行了提升测试,旨在评估 Llama 3.1 模型的使用是否有意义地增加恶意行为者计划或使用这些类型武器进行攻击的能力,并确定此类测试也适用于较小的 1B 和 3B 模型。

2. 儿童安全: 儿童安全风险评估是使用一组专家进行的,以评估模型产生可能导致儿童安全风险的输出的能力,并通过微调告知任何必要和适当的风险缓解措施。我们利用这些专家红队会议来通过 Llama 3 模型开发扩展我们的评估基准的覆盖范围。对于 Llama 3,我们使用基于目标的方法进行了新的深入会议,以沿着多个攻击向量评估模型风险,包括 Llama 3 训练的其他语言。我们还与内容专家合作进行红队练习,评估潜在违规内容,同时考虑市场特定的细微差别或经验。

3. 网络攻击: 对于 Llama 3.1 405B,我们的网络攻击提升研究调查了 LLM 是否可以增强人类在黑客任务中的能力,包括技能水平和速度。我们的攻击自动化研究专注于评估 LLM 在网络攻击行动中作为自主代理使用时的能力,特别是在勒索软件攻击的背景下。此评估不同于之前将 LLM 视为交互式助手的研究。主要目标是评估这些模型是否可以有效地作为独立代理执行复杂的网络攻击,而无需人工干预。因为 Llama 3.2 的 1B 和 3B 模型是比 Llama 3.1 405B 更小和更不具能力的模型,我们广泛认为对 405B 模型进行的测试也适用于 Llama 3.2 模型。

社区

行业合作伙伴关系: 生成式 AI 安全需要专业知识和工具,我们相信开放社区的力量可以加速其进展。我们是开放联盟的活跃成员,包括 AI Alliance、Partnership on AI 和 MLCommons,积极贡献于安全标准化和透明度。我们鼓励社区采用像 MLCommons 概念验证评估这样的分类法,以促进安全性和内容评估的协作和透明度。我们的 Purple Llama 工具已开源供社区使用,并在生态系统合作伙伴(包括云服务提供商)中广泛分发。我们鼓励社区向我们的 Github 仓库做出贡献。

资助: 我们还设立了 Llama 影响资助计划,以识别和支持 Meta 的 Llama 模型在社会福利方面最具说服力的应用,涵盖三个类别:教育、气候和开放创新。来自数百份申请的 20 名决赛入围者可以在这里找到。

报告: 最后,我们建立了一套资源,包括输出报告机制漏洞赏金计划,以在社区的帮助下持续改进 Llama 技术。

伦理考虑和限制

价值观: Llama 3.2 的核心价值是开放性、包容性和帮助性。它旨在为每个人服务,并适用于广泛的用例。因此,它的设计旨在让不同背景、经历和视角的人都能使用。Llama 3.2 按原样处理用户及其需求,不插入不必要的判断或规范,同时反映了对即使在某些情况下可能看似有问题的内容在其他情况下也可能服务于有价值目的的理解。它尊重所有用户的尊严和自主权,特别是在推动创新和进步的自由思想和表达的价值方面。

测试: Llama 3.2 是一项新技术,像任何新技术一样,与其使用相关的风险。迄今为止进行的测试尚未涵盖,也不可能涵盖所有场景。由于这些原因,与所有 LLM 一样,Llama 3.2 的潜在输出无法提前预测,模型在某些情况下可能会产生不准确、有偏见或其他令人反感的对用户提示的响应。因此,在部署任何 Llama 3.2 模型的应用程序之前,开发者应针对其特定的模型应用程序进行安全测试和调优。请参阅可用资源,包括我们的负责任使用指南信任与安全解决方案和其他资源,以了解更多关于负责任开发的信息。

barflyman/Llama-3.2-1B-Instruct-onnx-web-gqa

作者 barflyman

text-generation transformers
↓ 0 ♥ 0

创建时间: 2025-12-19 21:03:44+00:00

更新时间: 2025-12-19 21:15:46+00:00

在 Hugging Face 上查看

文件 (12)

.gitattributes
LICENSE.txt
README.md
USE_POLICY.md
config.json
genai_config.json
generation_config.json
onnx/model_q4f16.onnx ONNX
onnx/model_q4f16.onnx_data
special_tokens_map.json
tokenizer.json
tokenizer_config.json