核心目标 为什么用多头注意力 Q / K / V 分别在做什么 attention 为什么用点乘、为什么要 scaled Encoder / Decoder 的结构分别是什么 位置编码、残差、LayerNorm、BatchNorm、前馈网络分别起什么作用 decoder-only 模型是怎么一步一步生成新 token 的 encoder-only、decoder-only、encoder-decoder 各适合什么任务 架构图 引用自 https://github.com/An-Jhon/Hand-Drawn-Transformer Tra...
linear / relu / sgd -> tokenization -> LLM workflow -> inference / deployment SGD、Linear、ReLU 神经网络为什么能工作 神经网络本质上不是神秘黑盒,而是很多简单函数的组合。 最基础的一条链可以写成: x -> Linear -> ReLU -> Linear -> loss -> backward -> SGD step Linear 是什么 nn.Linear 做的是一个仿射变换。 它会把输入特征映射到新的特征空间。 例如: 输入是 `in_fea...
核心目标不是学会很多 API,而是先把最小训练闭环真正串起来: dataset -> dataloader -> model -> forward -> loss -> backward -> optimizer.step() -> eval -> save/load 最小训练闭环是什么 训练一个神经网络,本质上是在重复下面几步: 从 dataloader 中取出一个 batch 的数据 把数据送进 model 做前向计算,得到预测值 用 loss function 比较预测值和真实标签,得到 loss 对 loss 调用...
Prompt Engineering Author: Lee Boonstra Acknowledgements Content contributors Michael Sherman Yuan Cao Erick Armbrust Anant Nawalgaria Antonio Gulli Simone Cammel Curators and Editors Antonio Gulli Anant Nawalgaria Grace Mollison Technical Writer Joey Haym...
Prompting guide 101 A quick-start handbook for effective prompts October 2024 edition Writing effective prompts From the very beginning, Google Workspace was built to allow you to collaborate in real time with other people. Now, you can also collaborate with AI using Gemini for Google Works...
基于 CANN 社区版 8.2.RC1 制作 Ascend C 算子开发 1. Ascend C简介 2. [环境准备](https://www.hiascend.com/doc_center/source/zh/CANNCommunityEdition/82RC1/opdevg/Ascendcopdevg/atlas_ascendc_...
摘要: 本文介绍了如何使用 Cloudflare Images 转换服务配合 Workers 实现图片的无感压缩。该方案可以让图片 URL 保持不变,同时自动将图片转换为更高效的格式(如 WEBP),大幅减少图片文件大小,提升网站加载速度。
最近发现了 Cloudflare 有一个 Images 转换服务,可以用来处理图片,搭配 Workers,实现访问图片的 URL 不变,无感压缩图片,很适合图床使用。当然前提是图片托管到 CF,小黄云代理或是 R2 对象存储都可以。免费版每月有 5000 次的转换额度,实际上一张图片转换过一次后就会缓存,下次访问不会再占额度。另外,只对嵌入在网页中的图片有效,不影响单独标签页打开图片。 实现效果 以香港-深圳-广州游为例,7-8MB 的 JPG 原图被压缩为了 1-2MB 的 WEBP 图片,大幅缩短了打开网站所需的时间,部分图片...
先用lnmp脚本安装一遍LNMP,然后再单独编译nginx升级 Openssl wget https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz tar -vzxf openssl-3.4.0.tar.gz FancyIndex `bash wget https://github.com/aperezdc/ngx-fancyindex/releases/download/v0.5.2/ngx-fan...
在 x86 平台编译可直接参考官方文档,在 arm 平台编译需要略作修改 X86 平台 `bash apt update -y apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache clang cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \ g++-multilib git gnutls-dev gperf h...
在 x86 平台编译可直接参考官方文档,在 arm 平台编译需要略作修改 X86 平台 `bash apt update -y apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache clang cmake cpio curl device-tree-compiler flex gawk gcc-multilib g++-multilib gettext \ genisoimage git gperf haveged help...