LCM-LoRA模型推理简明教程
潜在一致性模型 (LCM) 通常可以通过 2-4 个步骤生成高质量图像,从而可以在几乎实时的设置中使用扩散模型。
来自官方网站:
LCM 只需 4,000 个训练步骤(约 32 个 A100 GPU 小时)即可从任何预训练的稳定扩散 (SD) 中提取出来,只需 2~4 个步骤甚至一步即可生成高质量的 768 x 768 分辨率图像,从而显着加速文本转换 -图像生成。 我们使用 LCM 在短短 4,000 次训练迭代中提取了 Dreamshaper-V7 版本的 SD。
有关 LCM 的更多技术概述,请参阅论文。
然而,每个模型需要单独蒸馏以进行潜在一致性蒸馏。 LCM-LoRA 的核心思想是只训练几个适配器层,在本例中适配器是 LoRA。 这样,我们就不必训练完整的模型并保持可训练参数的数量可控。 然后,生成的 LoRA 可以应用于模型的任何微调版本,而无需单独蒸馏它们。 此外,LoRA 还可应用于图像到图像、ControlNet/T2I-Adapter、修复、AnimateDiff 等。LCM-LoRA 还可以与其他 LoRA 结合,只需很少的步骤 (4-8) 即可生成样式图像。

NSDT在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器
LCM-LoRA 可用于 stable-diffusion-v1-5、stable-diffusion-xl-base-1.0 和 SSD-1B 模型。 所有的检查点都可以在这个集合中找到。
有关LCM-LoRA的更多详细信息,请参阅技术报告。
本指南展示了如何使用 LCM-LoRA 进行推理:
- 文本到图像
- 图像到图像
- 与风格化的 LoRA 相结合
- ControlNet/T2I 适配器
- 图像修复
- 动画差异
在阅读本指南之前,我们将先了解一下使用 LCM-LoRA 执行推理的一般工作流程。 LCM-LoRA 与其他稳定扩散 LoRA 类似,因此它们可以与任何支持 LoRA 的 DiffusionPipeline 一起使用。
- 加载任务特定的管道和模型。
- 将调度程序设置为 LCMScheduler。
- 加载模型的 LCM-LoRA 权重。
- 减少 [1.0, 2.0] 之间的guiding_scale,并在 [4, 8] 之间设置 num_inference_steps。
- 使用常用参数对管道进行推理。
让我们看看如何使用 LCM-LoRA 对不同的任务进行推理。
首先,确保已安装 peft,以获得更好的 LoRA 支持。
pip install -U peft
1、文本转图像
我们将使用 StableDiffusionXLPipeline 和调度程序:LCMScheduler,然后加载 LCM-LoRA。 该管道与 LCM-LoRA 和调度程序一起,可实现快速推理工作流程,克服扩散模型的缓慢迭代特性。
import torch
from diffusers import DiffusionPipeline, LCMSchedulerpipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0",variant="fp16",torch_dtype=torch.float16
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LCM-LoRA
pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")prompt = "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"generator = torch.manual_seed(42)
image = pipe(prompt=prompt, num_inference_steps=4, generator=generator, guidance_scale=1.0
).images[0]
结果如下:

请注意,我们仅使用 4 个步骤进行生成,这比标准 SDXL 通常使用的步骤要少得多。
你可能已经注意到,我们设置guidance_scale=1.0,这会禁用classifer-free-guidance。 这是因为 LCM-LoRA 是在指导下进行训练的,因此在这种情况下批量大小不必加倍。 这会导致更快的推理时间,但缺点是负面提示对去噪过程没有任何影响。
还可以使用 LCM-LoRA 的指导,但由于训练的性质,模型对guiding_scale 值非常敏感,高值可能会导致生成的图像中出现伪影。 在我们的实验中,我们发现最佳值在 [1.0, 2.0] 范围内。
2、使用微调模型进行推理
如上所述,LCM-LoRA 可以应用于模型的任何微调版本,而无需单独提取它们。 让我们看看如何使用微调模型进行推理。 在此示例中,我们将使用 animagine-xl 模型,它是用于生成动画的 SDXL 模型的微调版本。
from diffusers import DiffusionPipeline, LCMSchedulerpipe = DiffusionPipeline.from_pretrained("Linaqruf/animagine-xl",variant="fp16",torch_dtype=torch.float16
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LCM-LoRA
pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")prompt = "face focus, cute, masterpiece, best quality, 1girl, green hair, sweater, looking at viewer, upper body, beanie, outdoors, night, turtleneck"generator = torch.manual_seed(0)
image = pipe(prompt=prompt, num_inference_steps=4, generator=generator, guidance_scale=1.0
).images[0]
结果如下:

3、图像到图像
LCM-LoRA 也可以应用于图像到图像的任务。 让我们看看如何使用 LCM 执行图像到图像的生成。 在本例中,我们将使用 dreamshaper-7 模型和 LCM-LoRA 来实现 stable-diffusion-v1-5 。
import torch
from diffusers import AutoPipelineForImage2Image, LCMScheduler
from diffusers.utils import make_image_grid, load_imagepipe = AutoPipelineForImage2Image.from_pretrained("Lykon/dreamshaper-7",torch_dtype=torch.float16,variant="fp16",
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LCM-LoRA
pipe.load_lora_weights("latent-consistency/lcm-lora-sdv1-5")# prepare image
url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/img2img-init.png"
init_image = load_image(url)
prompt = "Astronauts in a jungle, cold color palette, muted colors, detailed, 8k"# pass prompt and image to pipeline
generator = torch.manual_seed(0)
image = pipe(prompt,image=init_image,num_inference_steps=4,guidance_scale=1,strength=0.6,generator=generator
).images[0]
make_image_grid([init_image, image], rows=1, cols=2)
结果如下:

你可以根据提示和提供的图像获得不同的结果。 为了获得最佳结果,我们建议尝试 num_inference_steps、strength 和guiding_scale 参数的不同值并选择最佳值。
4、与风格化的 LoRA 结合
LCM-LoRA 可以与其他 LoRA 结合使用,只需很少的步骤即可生成样式图像 (4-8)。 在下面的示例中,我们将使用 LCM-LoRA 和剪纸 LoRA。 要了解有关如何组合 LoRA 的更多信息,请参阅这个指南。
import torch
from diffusers import DiffusionPipeline, LCMSchedulerpipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0",variant="fp16",torch_dtype=torch.float16
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LoRAs
pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl", adapter_name="lcm")
pipe.load_lora_weights("TheLastBen/Papercut_SDXL", weight_name="papercut.safetensors", adapter_name="papercut")# Combine LoRAs
pipe.set_adapters(["lcm", "papercut"], adapter_weights=[1.0, 0.8])prompt = "papercut, a cute fox"
generator = torch.manual_seed(0)
image = pipe(prompt, num_inference_steps=4, guidance_scale=1, generator=generator).images[0]
image
结果如下:

5、ControlNet/T2I 适配器
让我们看看如何使用 ControlNet/T2I-Adapter 和 LCM-LoRA 进行推理。
在本例中,我们将使用 SD-v1-5 模型和 SD-v1-5 的 LCM-LoRA 以及 canny ControlNet。
import torch
import cv2
import numpy as np
from PIL import Imagefrom diffusers import StableDiffusionControlNetPipeline, ControlNetModel, LCMScheduler
from diffusers.utils import load_imageimage = load_image("https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png"
).resize((512, 512))image = np.array(image)low_threshold = 100
high_threshold = 200image = cv2.Canny(image, low_threshold, high_threshold)
image = image[:, :, None]
image = np.concatenate([image, image, image], axis=2)
canny_image = Image.fromarray(image)controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16)
pipe = StableDiffusionControlNetPipeline.from_pretrained("runwayml/stable-diffusion-v1-5",controlnet=controlnet,torch_dtype=torch.float16,safety_checker=None,variant="fp16"
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LCM-LoRA
pipe.load_lora_weights("latent-consistency/lcm-lora-sdv1-5")generator = torch.manual_seed(0)
image = pipe("the mona lisa",image=canny_image,num_inference_steps=4,guidance_scale=1.5,controlnet_conditioning_scale=0.8,cross_attention_kwargs={"scale": 1},generator=generator,
).images[0]
make_image_grid([canny_image, image], rows=1, cols=2)
结果如下:

本示例中的推理参数可能不适用于所有示例,因此我们建议你尝试“num_inference_steps”、“guidance_scale”、“controlnet_conditioning_scale”和“cross_attention_kwargs”参数的不同值,并选择最佳的值。
下面的示例展示了如何将 LCM-LoRA 与 Canny T2I 适配器和 SDXL 结合使用。
import torch
import cv2
import numpy as np
from PIL import Imagefrom diffusers import StableDiffusionXLAdapterPipeline, T2IAdapter, LCMScheduler
from diffusers.utils import load_image, make_image_grid# Prepare image
# Detect the canny map in low resolution to avoid high-frequency details
image = load_image("https://huggingface.co/Adapter/t2iadapter/resolve/main/figs_SDXLV1.0/org_canny.jpg"
).resize((384, 384))image = np.array(image)low_threshold = 100
high_threshold = 200image = cv2.Canny(image, low_threshold, high_threshold)
image = image[:, :, None]
image = np.concatenate([image, image, image], axis=2)
canny_image = Image.fromarray(image).resize((1024, 1024))# load adapter
adapter = T2IAdapter.from_pretrained("TencentARC/t2i-adapter-canny-sdxl-1.0", torch_dtype=torch.float16, varient="fp16").to("cuda")pipe = StableDiffusionXLAdapterPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", adapter=adapter,torch_dtype=torch.float16,variant="fp16",
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LCM-LoRA
pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")prompt = "Mystical fairy in real, magic, 4k picture, high quality"
negative_prompt = "extra digit, fewer digits, cropped, worst quality, low quality, glitch, deformed, mutated, ugly, disfigured"generator = torch.manual_seed(0)
image = pipe(prompt=prompt,negative_prompt=negative_prompt,image=canny_image,num_inference_steps=4,guidance_scale=1.5, adapter_conditioning_scale=0.8, adapter_conditioning_factor=1,generator=generator,
).images[0]
make_image_grid([canny_image, image], rows=1, cols=2)
结果如下:

6、图像修复
LCM-LoRA 也可用于修复。
import torch
from diffusers import AutoPipelineForInpainting, LCMScheduler
from diffusers.utils import load_image, make_image_gridpipe = AutoPipelineForInpainting.from_pretrained("runwayml/stable-diffusion-inpainting",torch_dtype=torch.float16,variant="fp16",
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LCM-LoRA
pipe.load_lora_weights("latent-consistency/lcm-lora-sdv1-5")# load base and mask image
init_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/inpaint.png")
mask_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/inpaint_mask.png")# generator = torch.Generator("cuda").manual_seed(92)
prompt = "concept art digital painting of an elven castle, inspired by lord of the rings, highly detailed, 8k"
generator = torch.manual_seed(0)
image = pipe(prompt=prompt,image=init_image,mask_image=mask_image,generator=generator,num_inference_steps=4,guidance_scale=4,
).images[0]
make_image_grid([init_image, mask_image, image], rows=1, cols=3)
结果如下:

7、动画差异
AnimateDiff 允许你使用稳定扩散模型对图像进行动画处理。 为了获得好的结果,我们需要生成多个帧(16-24),而使用标准 SD 模型执行此操作可能会非常慢。 LCM-LoRA 可用于显着加快该过程,因为你只需为每一帧执行 4-8 个步骤。 让我们看看如何使用 LCM-LoRA 和 AnimateDiff 执行动画。
import torch
from diffusers import MotionAdapter, AnimateDiffPipeline, DDIMScheduler, LCMScheduler
from diffusers.utils import export_to_gifadapter = MotionAdapter.from_pretrained("diffusers/animatediff-motion-adapter-v1-5")
pipe = AnimateDiffPipeline.from_pretrained("frankjoshua/toonyou_beta6",motion_adapter=adapter,
).to("cuda")# set scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)# load LCM-LoRA
pipe.load_lora_weights("latent-consistency/lcm-lora-sdv1-5", adapter_name="lcm")
pipe.load_lora_weights("guoyww/animatediff-motion-lora-zoom-in", weight_name="diffusion_pytorch_model.safetensors", adapter_name="motion-lora")pipe.set_adapters(["lcm", "motion-lora"], adapter_weights=[0.55, 1.2])prompt = "best quality, masterpiece, 1girl, looking at viewer, blurry background, upper body, contemporary, dress"
generator = torch.manual_seed(0)
frames = pipe(prompt=prompt,num_inference_steps=5,guidance_scale=1.25,cross_attention_kwargs={"scale": 1},num_frames=24,generator=generator
).frames[0]
export_to_gif(frames, "animation.gif")
结果如下:

原文链接:LCM-LoRA推理简明教程 - BimAnt
相关文章:
LCM-LoRA模型推理简明教程
潜在一致性模型 (LCM) 通常可以通过 2-4 个步骤生成高质量图像,从而可以在几乎实时的设置中使用扩散模型。 来自官方网站: LCM 只需 4,000 个训练步骤(约 32 个 A100 GPU 小时)即可从任何预训练的稳定扩散 (SD) 中提取出来&#…...
设计模式-开篇
什么是设计模式 设计模式是一种被反复使用、多数人知晓的、经过分类编目的代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、提高代码的可靠性。设计模式不是可直接转化为代码的完成解决方案,而是描述了如何解决一个问题的经过…...
HashMap的实现原;HashMap的工作原理;HashMap存储结构; HashMap 构造函数
文章目录 说一下HashMap的实现原理(非常重要)①HashMap的工作原理HashMap存储结构常用的变量HashMap 构造函数tableSizeFor() put()方法详解hash()计算原理resize() 扩容机制get()方法为什么HashMap链表会形成死循环 HashMap是我们在工作中使用到存储数据特别频繁的数据结构&am…...
JavaScript 原型,原型链的特点
JavaScript 的原型(Prototype)和原型链(Prototype chain)是 JavaScript 面向对象编程中的重要概念。 原型(Prototype) 在 JavaScript 中,每个对象都有一个原型对象,而这个原型对象…...
越南服务器租用:企业在越南办工厂的趋势与当地(ERP/OA等)系统部署的重要性
近年来,越南逐渐成为全球企业布局的热门目的地之一。许多企业纷纷选择在越南设立工厂,以利用其低廉的劳动力成本和优越的地理位置。随着企业在越南的扩张,对于当地部署ERP系统或OA系统等的需求也日益增长。在这种情况下,租用越南服…...
Qt QString与QChar总结
(一) QString 1 QString的简介 QString 是Qt 中的一个类,用于存储字符串,QString 没有父类。QString 存储的是一串字符,每个字符是一个 QChar 类型的数据。QChar 使用的是 UTF-16 编码,一个字符包含 2字节数据。 对于超过 6553…...
Leetcode算法系列| 1. 两数之和(四种解法)
目录 1.题目2.题解解法一:暴力枚举解法二:哈希表解法解法三:双指针(有序状态)解法四:二分查找(有序状态) 1.题目 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数…...
汇编-pop出栈指令
32位汇编 执行动作分为两步: 第一步:读出数据 第二步:改变栈地址 如果操作数是16位, 则ESP加2; 如果操作数是32位, 则ESP加4 espesp2 或 espesp4 格式:...
【代码】基于VMD(变分模态分解)-SSA(麻雀搜索算法优化)-LSTM的光伏功率预测模型(完美复现)matlab代码
程序名称:基于VMD(变分模态分解)-SSA(麻雀搜索算法优化)-LSTM的光伏功率预测模型 实现平台:matlab 代码简介:提出了变分模态分解(VMD)和麻雀搜索算法(SSA)与长短期记忆神经网络 (LSTM)相耦合,…...
【UnLua】在 Lua 中定义 UE 反射类型
【UnLua】在 Lua 中定义 UE 反射类型 用法 启动编辑器时遍历 Defines 目录下 lua 脚本来加载 UE 反射类型(开个临时的 Lua VM 即可)直接像 -- define a uenum in lua UEnum.EEnumGuestSomethingElse {Value1 1;Value2 2; }-- use it like a native …...
react的开发中关于图片的知识
React是一个流行的JavaScript库,用于构建用户界面。在React开发中,图片是一个非常重要的元素,可以用于美化界面和展示内容。本篇博客将详细讲解React中关于图片的知识。 1. React中使用图片 在React中使用图片非常简单,只需要使…...
AcWing 188:武士风度的牛 ← BFS
【题目来源】https://www.acwing.com/problem/content/190/ 【题目描述】 农民 John 有很多牛,他想交易其中一头被 Don 称为 The Knight 的牛。 这头牛有一个独一无二的超能力,在农场里像 Knight 一样地跳(就是我们熟悉的象棋中马的走法&…...
马养殖场建设VR模拟实训教学平台具有灵活性和复用性
为保障养殖场生物安全,避免疫病传播,学生出入养殖场受时间和地域的限制, 生产实习多以参观为主,通过畜牧企业技术人员的讲解,学生被动了解生产过程。为了解决畜牧养殖实训难的问题,借助VR技术开展畜牧养殖虚…...
云原生技术演进之路-(云技术如何一步步演进的,云原生解决了什么问题?)
云技术如何一步步演进的? 云原生解决了什么问题? 物理设备 电脑刚被发明的时候,还没有网络,每个电脑(PC),就是一个单机。 这台单机,包括CPU、内存、硬盘、显卡等硬件。用户在单机…...
基于OGG实现Oracle实时同步MySQL
📢📢📢📣📣📣 哈喽!大家好,我是【IT邦德】,江湖人称jeames007,10余年DBA及大数据工作经验 一位上进心十足的【大数据领域博主】!😜&am…...
〖大前端 - 基础入门三大核心之JS篇㊷〗- DOM事件对象及它的属性
说明:该文属于 大前端全栈架构白宝书专栏,目前阶段免费,如需要项目实战或者是体系化资源,文末名片加V!作者:不渴望力量的哈士奇(哈哥),十余年工作经验, 从事过全栈研发、产品经理等工作…...
如何搭建zerotier服务器组网实现内网穿透
小白花了四天的下班时间终于把zerotier网络调通,此刻坐在桌前舒畅地喝口茶~~ 下面来详细记录下这几天踩的坑: 起因就在于一直在iPad上用向日葵连接公司电脑的我觉得向日葵的界面用的实在难受,vs code操作十分不灵光&…...
【C++】构造函数和析构函数第四部分(深拷贝和浅拷贝)--- 2023.11.25
目录 什么是浅拷贝?浅拷贝的问题使用深拷贝解决浅拷贝问题结束语 什么是浅拷贝? 如果在一个类中没有人为定义拷贝函数,则系统会提供默认拷贝函数。那么在此默认拷贝函数中主要进行了简单的赋值操作,那这个简单的赋值操作我们一般…...
加速软件开发:自动化测试在持续集成中的重要作用!
持续集成的自动化测试 如今互联网软件的开发、测试和发布,已经形成了一套非常标准的流程,最重要的组成部分就是持续集成(Continuous integration,简称CI,目前主要的持续集成系统是Jenkins)。 那么什么是持…...
工具及方法 - 查找排名:国内网络作家排名
中国十大网络小说作家排名,在买购网的排名: 中国十大网络小说作家 网络小说作家排行榜 中国著名网络写手排名→MAIGOO生活榜 (这个网站里还有很多其他的排名。) 1,唐家三少 2,辰东 3,我吃西红…...
谷歌浏览器插件
项目中有时候会用到插件 sync-cookie-extension1.0.0:开发环境同步测试 cookie 至 localhost,便于本地请求服务携带 cookie 参考地址:https://juejin.cn/post/7139354571712757767 里面有源码下载下来,加在到扩展即可使用FeHelp…...
【Python】 -- 趣味代码 - 小恐龙游戏
文章目录 文章目录 00 小恐龙游戏程序设计框架代码结构和功能游戏流程总结01 小恐龙游戏程序设计02 百度网盘地址00 小恐龙游戏程序设计框架 这段代码是一个基于 Pygame 的简易跑酷游戏的完整实现,玩家控制一个角色(龙)躲避障碍物(仙人掌和乌鸦)。以下是代码的详细介绍:…...
工业安全零事故的智能守护者:一体化AI智能安防平台
前言: 通过AI视觉技术,为船厂提供全面的安全监控解决方案,涵盖交通违规检测、起重机轨道安全、非法入侵检测、盗窃防范、安全规范执行监控等多个方面,能够实现对应负责人反馈机制,并最终实现数据的统计报表。提升船厂…...
解锁数据库简洁之道:FastAPI与SQLModel实战指南
在构建现代Web应用程序时,与数据库的交互无疑是核心环节。虽然传统的数据库操作方式(如直接编写SQL语句与psycopg2交互)赋予了我们精细的控制权,但在面对日益复杂的业务逻辑和快速迭代的需求时,这种方式的开发效率和可…...
在四层代理中还原真实客户端ngx_stream_realip_module
一、模块原理与价值 PROXY Protocol 回溯 第三方负载均衡(如 HAProxy、AWS NLB、阿里 SLB)发起上游连接时,将真实客户端 IP/Port 写入 PROXY Protocol v1/v2 头。Stream 层接收到头部后,ngx_stream_realip_module 从中提取原始信息…...
从零实现STL哈希容器:unordered_map/unordered_set封装详解
本篇文章是对C学习的STL哈希容器自主实现部分的学习分享 希望也能为你带来些帮助~ 那咱们废话不多说,直接开始吧! 一、源码结构分析 1. SGISTL30实现剖析 // hash_set核心结构 template <class Value, class HashFcn, ...> class hash_set {ty…...
《基于Apache Flink的流处理》笔记
思维导图 1-3 章 4-7章 8-11 章 参考资料 源码: https://github.com/streaming-with-flink 博客 https://flink.apache.org/bloghttps://www.ververica.com/blog 聚会及会议 https://flink-forward.orghttps://www.meetup.com/topics/apache-flink https://n…...
Linux --进程控制
本文从以下五个方面来初步认识进程控制: 目录 进程创建 进程终止 进程等待 进程替换 模拟实现一个微型shell 进程创建 在Linux系统中我们可以在一个进程使用系统调用fork()来创建子进程,创建出来的进程就是子进程,原来的进程为父进程。…...
【C++特殊工具与技术】优化内存分配(一):C++中的内存分配
目录 一、C 内存的基本概念 1.1 内存的物理与逻辑结构 1.2 C 程序的内存区域划分 二、栈内存分配 2.1 栈内存的特点 2.2 栈内存分配示例 三、堆内存分配 3.1 new和delete操作符 4.2 内存泄漏与悬空指针问题 4.3 new和delete的重载 四、智能指针…...
LLMs 系列实操科普(1)
写在前面: 本期内容我们继续 Andrej Karpathy 的《How I use LLMs》讲座内容,原视频时长 ~130 分钟,以实操演示主流的一些 LLMs 的使用,由于涉及到实操,实际上并不适合以文字整理,但还是决定尽量整理一份笔…...
