npc0 commited on
Commit
e73caa2
·
1 Parent(s): d297372

set gen length etc hyperparam

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,7 +16,7 @@ from model import ChatGLMModel#, chat_template
16
  model = ChatGLMModel()
17
  # history = []
18
 
19
- max_tokens = 512
20
  temperature = 1.0
21
  top_p = 0.7
22
  top_k = 50
@@ -104,8 +104,8 @@ def greet(text):
104
  docs = [Document(page_content=text)]
105
 
106
  text_splitter = RecursiveCharacterTextSplitter(
107
- chunk_size=512, # 分割最大尺寸
108
- chunk_overlap=64, # 重复字数
109
  length_function=len
110
  )
111
  texts = text_splitter.split_documents(docs)
 
16
  model = ChatGLMModel()
17
  # history = []
18
 
19
+ max_tokens = 2048
20
  temperature = 1.0
21
  top_p = 0.7
22
  top_k = 50
 
104
  docs = [Document(page_content=text)]
105
 
106
  text_splitter = RecursiveCharacterTextSplitter(
107
+ chunk_size=256, # 分割最大尺寸
108
+ chunk_overlap=32, # 重复字数
109
  length_function=len
110
  )
111
  texts = text_splitter.split_documents(docs)