惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
T
Threatpost
C
CERT Recently Published Vulnerability Notes
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
Project Zero
Project Zero
H
Heimdal Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
W
WeLiveSecurity
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
News | PayPal Newsroom
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
S
Securelist
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
NISL@THU
NISL@THU
N
News and Events Feed by Topic
S
Security Affairs
The Last Watchdog
The Last Watchdog
T
Tor Project blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
C
Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security

博客园 - osoft

Sound Disable-Download-Chrome-AI-Mode Audio-Channel DAR-PAR-SAR ffmpeg-layouts Blender-Tank-Tracks Blender-Curve Bézier-curve Bézier-VS-NURBS Walking-leg-mechanism-in-Blender Blender-Armatures Blender-Rigid-Body Simulate-pendulum-motion-using-Blender Platonic-solids Differential-Gear otvinta-Bevel-Gear-Calculator Bevel-gears Epicyclic-gearing Blender-Gears Blender5-WindowUI Video-file-size Windows-Execution-Policies Windows-PowerShell-prompt Windows-UAC Windows-Commands-prompt Windows-GameBar-ErrorLog Microsoft-Store-error Windows-sfc Windows-Delivery-Optimization Windows-icacls Dism-Cleanup-image DISM-Get-cmds Windows11-GPT Generate-MAC-Address
Chrome-Gemini-Nano
osoft · 2025-11-22 · via 博客园 - osoft
1. Chrome-Weights.bin
	1.1 停用删除
	1.2 转移目录
2. 尝试失败记录2025
	2.1 在 Chrome 中启用 AI
	2.2 Next.js Chrome AI 聊天机器人
	2.3 Chrome插件
3. 相关帮助
	3.1 内置 AI 帮助
	3.2 Chrome AI 功能故障排除
4. 更多相关主题
	4.1 templates模板
	4.2 demo演示
	4.3 Gemini-api

 Chrome-Gemini-Nano

1. Chrome-Weights.bin

OptGuideOnDeviceModel文件夹: C:\Users\Tom\AppData\Local\Google\Chrome\User Data\OptGuideOnDeviceModel\2025.8.21.1028 

OptGuideOnDeviceModel 文件夹(通常包含一个很大的weights.bin 文件)

  • 是Chrome 浏览器内置的Gemini Nano AI 模型, 名为Gemini Nano,用于支持“Prompt API”等实验性功能。 
  • 它包含Chrome的优化指南功能使用的设备端机器学习模型的已学习参数(权重)。 
  • 该模型帮助Chrome做出本地决策,以优化你的浏览体验(例如,提高页面加载时间,管理资源),而无需将可能敏感的浏览数据发送到服务器进行分析以用于此特定功能。 

1.1 停用删除

若不需要,可以参照下一节,停用相关组件即可。避免这个超大文件占用空间。

1.2 转移目录

Chrome用户数据默认位置如下: 

C:\Users\Tom\AppData\Local\Google\Chrome\User Data

  1. 将 [User Data] 复制到其他分区。比如 F:\ChromeData
  2. 删除C:\Users\Tom\AppData\Local\Google\Chrome\下的目录 [User Data]。
  3. 创建链接
    •   mklink /J "C:\Users\Tom\AppData\Local\Google\Chrome\User Data" "F:\ChromeData"
    • 为 C:\Users\Tom\AppData\Local\Google\Chrome\User Data <<===>> F:\ChromeData 创建的联接

这样,Chrome的用户数据都在F盘,不再占用C盘空间。

2. 尝试失败记录2025

2.1 在 Chrome 中启用 AI

浏览器安装完成后,请确保设置以下标志:

  • chrome://flags/#prompt-api-for-gemini-nano
    • 选择“已启用”
  • chrome://flags/#optimization-guide-on-device-model
    • 选择“启用绕过首选项要求”
  • chrome://flags/#summarization-api-for-gemini-nano
    • 选择“已启用”
  • chrome://components/
    • 点击设备型号优化指南 [Optimization Guide On Device Model] 中的“检查更新”按钮下载该型号的优化指南。 如果您看不到优化指南,请确保您已正确设置上述参数,然后重新启动浏览器并刷新页面。
    • Optimization Guide On Device Model - 版本: 2025.8.21.1028 
  • chrome://settings/help
    • Google Chrome 已是最新版本
    • 版本 142.0.7444.176(正式版本) (64 位) 
  • chrome://on-device-internals/
    • Tools \ 
      • Device performance class: Very Low 
    • Model Status \ 
      • Foundational model state: Ready
      • Model Name: v3Nano
      • Version: 2025.08.14.1358
      • Backend Type: CPU
      • File path: C:\Users\Tom\AppData\Local\Google\Chrome\User Data\OptGuideOnDeviceModel\2025.8.21.1028
      • Folder size: 2,730.3 MiB
    • 模型状态下可以看到模型已经Ready。

完成以上任然收到错误提示:

您的浏览器不受支持。

请将Chrome浏览器更新至127版本或更高版本。 注: 这里的Chrome大概需要开发版。

模型相关源码

2.2 Next.js Chrome AI 聊天机器人

这个聊天机器人演示(来源)使用 Next.js 和Vercel AI SDK,并通过chrome-ai提供程序调用 Chrome 的内置 AI模型(Gemini Nano)。

Gemini Nano的Prompt API在浏览器的window.ai函数中公开。它可以通过Vercel AI SDK的统一API轻松调用。

工作原理

以下代码包含了使用 Chrome AI 和 Vercel AI SDK 进行文本流传输所需的全部内容。

import { streamText } from "ai";
import { chromeai } from "chrome-ai";

const { textStream } = await streamText({
  model: chromeai(),
  prompt: "what is a large language model?",
}); 

chromeai实现了一个底层使用window.ai的Provider 。 

支持的浏览器

请确保您使用的是 Chrome(开发者 / Canary)版本 127 或更高版本。 

必要的实验性标志

浏览器安装完成后,请确保设置以下标志:

chrome://flags

启用相关模块与上一节一致

chrome://components

点击“设备型号优化指南”中的“检查更新”按钮下载该型号。 如果您看不到优化指南,请确保您已正确设置上述参数。 如果仍然看不到优化指南,请在浏览器控制台中运行“await window.ai.assistant.create();”,然后刷新页面。

浏览器控制台(console)

更多工具 → 开发者工具 → 控制台(console)页签

快捷键: F12 或 (Ctrl + Shift + I) → 开发者工具 → 控制台(console)页签

2.3 Chrome插件

Chrome 应用商店 

搜索:Gemini nano ai

Chrome AI - Chrome 内置离线 AI 对话/翻译

概述

在侧边栏(Side panel)里打开 Chrome 内置 Gemini Nano AI,可以离线使用 AI 对话和翻译功能。

使用 Chrome 内置的 Gemini Nano AI 与 AI 进行对话和翻译,支持离线使用。

使用此扩展程序依赖于 Chrome 内置的 Gemini Nano AI,因此 Chrome 版本必须不低于 v138,最新版本已包含此版本。

  1. Download and install Chrome with built-in AI Latest Version.
  2. Go to chrome://flags/#prompt-api-for-gemini-nano and enable the Prompt API for Gemini Nano option.
  3. Go to chrome://flags/#optimization-guide-on-device-model and turn on the Enables optimization guide on device option.
  4. Go to chrome://components/ and check or download the latest version of Optimization Guide On Device Model.

Chrome 内置离线AI 对话/翻译

安装后测试,如下错误提示:

This extension uses Chrome's built-in Translation API and Gemini Nano AI, which requires Chrome version be no lower than v138, which you can get in the Latest Version.

Translation Feature Setup:

  1. Download and install Chrome with built-in AI Latest Version.
  2. Go to (chrome://…) and enable
    1. chrome://flags/#enable-experimental-web-platform-features
    2. chrome://flags/#translation-api
    3. chrome://flags/#language-detection-api
  3. Restart Chrome browser to apply changes.

Chat Feature Setup:

  • Go to (chrome://…) and enable
    • chrome://flags/#prompt-api-for-gemini-nano
    • chrome://flags/#optimization-guide-on-device-model
  • Go to (chrome://…) and check or download the latest version of [Optimization Guide On Device Model].
    • chrome://components/

以上几种工具及插件需要设置的部分基本一致。

3. 相关帮助

3.1 内置 AI 帮助

硬件

  • GPU 或 CPU:内置模型可以使用 GPU 或 CPU 运行。
  • GPU:VRAM 严格大于 4 GB。
  • CPU:16 GB 或更多 RAM,以及 4 个或更多 CPU 核心。
  • 网络:无限流量或不按流量计费的网络连接。
  • 存储空间:包含 Chrome 个人资料的卷上至少有 22 GB 的可用空间。 

随着浏览器更新模型,Gemini Nano 的确切大小可能会有所不同。 如需确定当前大小,请访问:  

  • chrome://on-device-internals/
    • Foundational model state: Ready
    • Model Name: v3Nano
    • Version: 2025.08.14.1358
    • Backend Type: CPU
    • File path: C:\Users\Tom\AppData\Local\Google\Chrome\User Data\OptGuideOnDeviceModel\2025.8.21.1028
    • Folder size: 2,730.3 MiB

3.2 Chrome AI 功能故障排除

4. 更多相关主题

4.1 templates模板

AI应用模板和示例

4.2 demo演示

网络人工智能示例 

Web AI 是一个 TypeScript 库,它允许您直接在 Web 浏览器中运行现代深度学习模型。

您可以轻松地将 AI 功能添加到 Web 应用程序中,而无需复杂的服务器端基础架构。 

特征 Features

  • 便于使用: 用一行代码创建一个模型,用另一行代码获取结果。
  • ONNX 运行时提供支持: Web AI 使用 ONNX Web 运行时环境运行模型,该环境对各种运算符都有丰富的支持。这意味着任何模型都能正常工作。
  • 兼容Hugging Face: Web AI 使用与中心相同的格式的模型配置文件,这使得集成现有模型变得更加容易。
  • 内置缓存: Web AI 使用 localforage 将下载的模型存储在 IndexedDB 中。您可以动态配置缓存大小。
  • Web Worker 支持: 所有繁重的操作 – 模型创建和推理 – 都被卸载到单独的线程中,这样用户界面就不会冻结。

4.3 Gemini-api