x-jeff blog

Make progress every day.

【从零开始构建大语言模型】【2】【Working with text data】

Understanding word embeddings,Tokenizing text,Converting tokens into token IDs,Adding special context tokens,Byte pair encoding,Data sampling with a sliding window,Creating token embeddings,Encoding word positions

【从零开始构建大语言模型】系列博客为”Build a Large Language Model (From Scratch)”一书的个人读书笔记。 原书链接:Build a Large Language Model (From Scratch)。 官方示例代码:LLMs-from-scratch。 本文为原创文章,未经本人允许,禁止转载。转载请注明出...

【从零开始构建大语言模型】【1】【Understanding large language models】

What is an LLM?,Applications of LLMs,Stages of building and using LLMs,Introducing the transformer architecture,Utilizing large datasets,A closer look at the GPT architecture,Building a large language model

【从零开始构建大语言模型】系列博客为”Build a Large Language Model (From Scratch)”一书的个人读书笔记。 原书链接:Build a Large Language Model (From Scratch)。 官方示例代码:LLMs-from-scratch。 本文为原创文章,未经本人允许,禁止转载。转载请注明出...

【CUDA编程】【30】【6.C++ Language Extensions】【Part5】

Warp Reduce Functions,Warp Shuffle Functions,Nanosleep Function,Warp Matrix Functions,DPX

【CUDA编程】系列博客参考NVIDIA官方文档“CUDA C++ Programming Guide(v12.6)”。 本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Warp Reduce Functions __reduce_sync(unsigned mask, T value)内置函数在同步由mask指定的线程后,对提供的value数据执行归约操作(red...

【CUDA编程】【29】【6.C++ Language Extensions】【Part4】

Address Space Conversion Functions,Alloca Function,Compiler Optimization Hint Functions,Warp Vote Functions,Warp Match Functions

【CUDA编程】系列博客参考NVIDIA官方文档“CUDA C++ Programming Guide(v12.6)”。 本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Address Space Conversion Functions 本部分都是用于地址空间转换的函数。一些预备知识点: CUDA编程中,通用地址是一种抽象的地址形式,可能指向device内...

【CUDA编程】【28】【6.C++ Language Extensions】【Part3】

Load Functions Using Cache Hints,Store Functions Using Cache Hints,Time Function,Atomic Functions,Address Space Predicate Functions

【CUDA编程】系列博客参考NVIDIA官方文档“CUDA C++ Programming Guide(v12.6)”。 本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Load Functions Using Cache Hints 这些加载函数仅支持计算能力在5.0及以上的device。 1 2 3 4 5 T __ldcg(const T* address)...

【CUDA编程】【27】【6.C++ Language Extensions】【Part2】

Synchronization Functions,Texture Functions,Surface Functions,Read-Only Data Cache Load Function

【CUDA编程】系列博客参考NVIDIA官方文档“CUDA C++ Programming Guide(v12.6)”。 本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Synchronization Functions 1 void __syncthreads(); __syncthreads()会等待线程块中的所有线程到达这个同步点。__syncthread...

【CUDA编程】【26】【6.C++ Language Extensions】【Part1】

Function Execution Space Specifiers,Variable Memory Space Specifiers,Built-in Vector Types,Built-in Variables,Memory Fence Functions

【CUDA编程】系列博客参考NVIDIA官方文档“CUDA C++ Programming Guide(v12.6)”。 本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Function Execution Space Specifiers 函数执行空间限定符用于定义一个函数是运行在host上还是device上,以及是否可以从host或device调用。 1.1....

【论文阅读】MobileNetV2:Inverted Residuals and Linear Bottlenecks

MobileNetV2,Linear Bottlenecks,Inverted residuals

本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Introduction 本文提出了一种专为移动端和资源受限环境设计的新型神经网络架构。 2.Related Work 我们的网络设计基于MobileNetV1,保留了其简单性,无需特殊算子,同时显著提升了精度,并在多个移动端的图像分类和检测任务中达到了SOTA的水平。 3.Preliminaries, disc...

【CUDA编程】【25】【5.Performance Guidelines】

Overall Performance Optimization Strategies,Maximize Utilization,Maximize Memory Throughput,Maximize Instruction Throughput,Minimize Memory Thrashing

【CUDA编程】系列博客参考NVIDIA官方文档“CUDA C++ Programming Guide(v12.6)”。 本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Overall Performance Optimization Strategies 性能优化围绕四个基本策略展开: 最大化并行执行以实现最大利用率。 优化内存使用以实现最大内存吞吐量...

【C++并发编程】【5】【Managing threads】Basic thread management

join(),detach(),joinable()

【C++并发编程】系列博客为参考《C++ Concurrency IN ACTION (SECOND EDITION)》一书,自己所做的读书笔记。 本文为原创文章,未经本人允许,禁止转载。转载请注明出处。 1.Basic thread management 每个C++程序至少有一个线程:即运行main()的线程。我们的程序随后可以启动其他线程,这些线程以另一个函数作为入口点。所有...