From 333d7fe7539c0f9627191d12681ddc2fb0140092 Mon Sep 17 00:00:00 2001 From: JieShen <49408146+JieShenAI@users.noreply.github.com> Date: Sat, 24 Jun 2023 19:32:39 +0800 Subject: [PATCH] Update 4.mdx You forgot to write a return for this function. --- chapters/zh-CN/chapter7/4.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/chapters/zh-CN/chapter7/4.mdx b/chapters/zh-CN/chapter7/4.mdx index a88dc2777..bb15ba4c7 100644 --- a/chapters/zh-CN/chapter7/4.mdx +++ b/chapters/zh-CN/chapter7/4.mdx @@ -225,6 +225,7 @@ def preprocess_function(examples): model_inputs = tokenizer( inputs, text_target=targets, max_length=max_length, truncation=True ) + return model_inputs ``` 请注意,我们为输入和输出设置了相同的最大长度。由于我们处理的文本看起来很短,我们使用 128。