08 2023 档案

摘要:## LLM inference workflow **Generative Inference**. A typical LLM generative inference task consists of two stages: i) the prefill stage which takes a 阅读全文
posted @ 2023-08-23 18:57 鸽鸽的书房 阅读(155) 评论(0) 推荐(0) 编辑
摘要:- VSCode启动Debug模式调试带参数的python文件: https://blog.csdn.net/weixin_39329055/article/details/119530587 - 单步调试进入外部文件:launch.json中写入以下: ```json { // 使用 Intell 阅读全文
posted @ 2023-08-14 23:02 鸽鸽的书房 阅读(18) 评论(0) 推荐(0) 编辑
摘要:- Towards Topic-Guided Conversational Recommender System - RecInDial: A Unified Framework for Conversational Recommendation with Pretrained Language M 阅读全文
posted @ 2023-08-14 19:19 鸽鸽的书房 阅读(28) 评论(0) 推荐(0) 编辑
摘要:## TD learning of state values The data/experience required by the algorithm: - (s0,r1,s1,,st,rt+1,st+1,) or 阅读全文
posted @ 2023-08-13 16:47 鸽鸽的书房 阅读(19) 评论(0) 推荐(0) 编辑
摘要:### the discounted return $$ \begin{aligned} G_t & =R_{t+1}+\gamma R_{t+2}+\gamma^2 R_{t+3}+\ldots \\ & =R_{t+1}+\gamma\left(R_{t+2}+\gamma R_{t+3}+\l 阅读全文
posted @ 2023-08-13 16:05 鸽鸽的书房 阅读(10) 评论(0) 推荐(0) 编辑
摘要:# 1.7 Markov decision processes This section presents these concepts in a more formal way under the framework of Markov decision processes (MDPs). An 阅读全文
posted @ 2023-08-13 15:30 鸽鸽的书房 阅读(8) 评论(0) 推荐(0) 编辑
摘要:第6课-随机近似与随机梯度下降 ## 6.1 Motivating examples ## Mean Estimation Revisit the mean estimation problem: - Consider a random variable X. - Our aim is to e 阅读全文
posted @ 2023-08-12 16:32 鸽鸽的书房 阅读(139) 评论(0) 推荐(0) 编辑
摘要:```python import torch def promptGating(gating, adding, x): ''' gating: (num_prefix, dim) adding: (num_prefix, dim) x: (seq_length, batch_size, dim) ' 阅读全文
posted @ 2023-08-09 17:34 鸽鸽的书房 阅读(25) 评论(0) 推荐(0) 编辑
摘要:prefix_tuning.py ```python import torch from transformers import PretrainedConfig class PrefixEncoder(torch.nn.Module): r''' The torch.nn model to enc 阅读全文
posted @ 2023-08-09 15:09 鸽鸽的书房 阅读(162) 评论(0) 推荐(0) 编辑
摘要:今天我们阅读peft源码,主要是为了弄清楚prefix tuning的工作原理和代码细节。 # 理解和思考 (1) prefix tuning和zero-shot的区别在于,把指令/要求(比如要生成positive的句子)和输入的文字直接区分开,指令用连续向量而不是离散词元表示。如果不是prefix 阅读全文
posted @ 2023-08-07 22:21 鸽鸽的书房 阅读(1267) 评论(0) 推荐(0) 编辑
摘要:记录运行这个代码的过程:https://huggingface.co/docs/peft/task_guides/seq2seq-prefix-tuning # 环境配置 虚拟环境 ```bash python -V conda create -n peft-practice python=3.10 阅读全文
posted @ 2023-08-07 16:31 鸽鸽的书房 阅读(146) 评论(0) 推荐(0) 编辑
摘要:今天的任务很艰巨,需要把下面这张图的模型架构复现一遍,要有耐心哦。我参考了哈佛NLP小组对transformer的分拆讲解[The Annotated Transformer](http://nlp.seas.harvard.edu/annotated-transformer/),但思路不同于原文。 阅读全文
posted @ 2023-08-01 20:02 鸽鸽的书房 阅读(26) 评论(0) 推荐(0) 编辑
摘要:Transformer鼎鼎大名人尽皆知,2017年就问津于世,鸽鸽2023年才学习它,任何时候圆梦都不算晚!本文记录了我像建房子一样从头到尾打造变形金刚的全过程,目的是熟悉pytorch和深入理解transformer。 先看下我设定的任务难度,我们要解决的是经典的seq2seq翻译任务。使用的数据 阅读全文
posted @ 2023-08-01 20:01 鸽鸽的书房 阅读(26) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示