Comments (2)
目前的构建方式和普通问答一致,如果文档对应的string是context,问题是question,建议的方式如下:
query = '{context}\n\n{question}'.format(context, question)
response, history = model.chat(tokenizer, query)
print(response)
from chatglm3.
非常感谢答疑
from chatglm3.
Related Issues (20)
- Streamlit 启动 composite_demo后页面加载报错 HOT 3
- 多卡运行 OMP_NUM_THREADS=1 torchrun --standalone --nnodes=1 --nproc_per_node=8 finetune_hf.py data/AdvertiseGen/ THUDM/chatglm3-6b configs/lora.yaml configs/ds_zero_2.json
- ChatGLM3分词器的model.vocab能不能提供一下 HOT 1
- langchain DEMO问题:无法调用tools HOT 2
- composite_demo 代码解释器 无法生成 图片 HOT 2
- chatglm-6b库中ptuning/evaluate.sh&main.py可否直接用于chatglm3的LoRA微调的评估 HOT 2
- Running Prediction HOT 5
- chatglm4啥时候开源? HOT 1
- 【已经移动到Discussions】【咨询】Mac 上通过运行python3 web_demo_streamlit.py 会把模型下载到哪里?
- quantization failed HOT 1
- 关于多卡部署 HOT 3
- lora微调后没有pytorch_model.bin HOT 2
- api_server.py只能用post请求调用吗 HOT 2
- GLM大模型是Causal Language Model类型的模型么? HOT 1
- 官方的所有openai_api实现的函数调用全部失效了 HOT 8
- 关于微调多轮对话生成的loss_mask格式问题 HOT 1
- ptuning_v2 微调后使用inference_hf.py推理 出现Both `max_new_tokens` (=512) and `max_length`(=8192) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation) HOT 4
- openai_api.py 支持并发调用,或者怎么实现并发调用 HOT 1
- 量化加载chatglm3,报错:round_vml_cpu not implemented for Half HOT 5
- 导入huggingface_hub不知道那个版本导入库没有后面的 TextGenerationStreamResponse, Token HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatglm3.