Skip to content

Commit

Permalink
Update 03-Baichuan2-7B-chat接入LangChain框架.md
Browse files Browse the repository at this point in the history
  • Loading branch information
L4HeyXiao authored Dec 18, 2023
1 parent 63cb801 commit 775b53b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BaiChuan/03-Baichuan2-7B-chat接入LangChain框架.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
import torch

class baichuan2_LLM(LLM):
# 基于本地 InternLM 自定义 LLM 类
# 基于本地 Baichuan 自定义 LLM 类
tokenizer : AutoTokenizer = None
model: AutoModelForCausalLM = None

def __init__(self, model_path :str):
# model_path: InternLM 模型路径
# model_path: Baichuan-7B-chat模型路径
# 从本地初始化模型
super().__init__()
print("正在从本地加载模型...")
Expand Down

0 comments on commit 775b53b

Please sign in to comment.