Add README_zh.md
Browse files- README.md +12 -11
- README_zh.md +31 -0
README.md
CHANGED
|
@@ -6,25 +6,26 @@ base_model:
|
|
| 6 |
- zai-org/chatglm3-6b
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
---
|
| 9 |
-
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
##
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
##
|
| 18 |
-
LLMDF
|
| 19 |
```
|
| 20 |
<|user|>
|
| 21 |
-
|
| 22 |
<|assistant|>
|
| 23 |
```
|
| 24 |
-
|
| 25 |
```
|
| 26 |
<|user|>
|
| 27 |
-
|
| 28 |
<|assistant|>
|
| 29 |
-
<DietFeedback
|
| 30 |
```
|
|
|
|
| 6 |
- zai-org/chatglm3-6b
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
---
|
| 9 |
+
\[ English | [中文](README_zh.md) \]
|
| 10 |
+
## Introduction
|
| 11 |
+
The Large Language Model for Dietary Feedback (LLMDF) is a model fine-tuned using real-world dietary feedback data from a mobile health weight management App. For details on the specific fine-tuning process, see the paper: **Using Large Language Models to Generate Dietary Feedback Similar to Human Experts in Weight Management: Based on Real-world Scenario Data**
|
| 12 |
|
| 13 |
+
## Features
|
| 14 |
+
**Advantages:** The model fine-tuned using real-world data generates dietary feedback in a similar voice to local dietitians.
|
| 15 |
|
| 16 |
+
**Disadvantages:** Due to the healthcare provider interaction preferences influenced noise and effects of long-tail distribution in the real-world data, the model's response is considered lacking the ability to provide sufficient information.
|
| 17 |
|
| 18 |
+
## Inference
|
| 19 |
+
LLMDF is fine-tuned from [ChatGLM3-6B](https://huggingface.co/zai-org/chatglm3-6b). When using Hugging Face's `transformers` for inference, it is necessary to pay attention to constructing a [prompt template](https://github.com/zai-org/ChatGLM3/blob/main/PROMPT.md) consistent with the dialogue format used during training.
|
| 20 |
```
|
| 21 |
<|user|>
|
| 22 |
+
Imagine you are a dietitian and you will receive dietary information from a client who is undergoing dietary management. Your task is to give the client feedback on the dietary information, and you need to provide insightful content to give the client dietary guidance to guide him towards a healthy lifestyle. \nYou can refer to organizing the dietary feedback from the following perspectives: analyzing the attributes of the food consumed by the client, providing healthy food choices, helping the client to develop a dietary pattern, encouraging the client to maintain healthy eating habits, and advising the client to modify his or her dietary habits.<MealInformation><MealType>Breakfast</MealType><MealIntakeInformation>Soy milk 1 bowl; 1 medium egg; pork, corn, and carrot glutinous rice 200 grams;</MealIntakeInformation></MealInformation><PersonalHealthInformation><Gender>Male</Gender><Age>19</Age><Height>180cm</Height><Weight>84.0kg</Weight><Waistline>85cm</Waistline><LaborIntensity>Medium</LaborIntensity></PersonalHealthInformation>
|
| 23 |
<|assistant|>
|
| 24 |
```
|
| 25 |
+
When using the prompt of the above example, the generation result of LLMDF is:
|
| 26 |
```
|
| 27 |
<|user|>
|
| 28 |
+
Imagine you are a dietitian and you will receive dietary information from a client who is undergoing dietary management. Your task is to give the client feedback on the dietary information, and you need to provide insightful content to give the client dietary guidance to guide him towards a healthy lifestyle. \nYou can refer to organizing the dietary feedback from the following perspectives: analyzing the attributes of the food consumed by the client, providing healthy food choices, helping the client to develop a dietary pattern, encouraging the client to maintain healthy eating habits, and advising the client to modify his or her dietary habits.<MealInformation><MealType>Breakfast</MealType><MealIntakeInformation>Soy milk 1 bowl; 1 medium egg; pork, corn, and carrot glutinous rice 200 grams;</MealIntakeInformation></MealInformation><PersonalHealthInformation><Gender>Male</Gender><Age>19</Age><Height>180cm</Height><Weight>84.0kg</Weight><Waistline>85cm</Waistline><LaborIntensity>Medium</LaborIntensity></PersonalHealthInformation>
|
| 29 |
<|assistant|>
|
| 30 |
+
<DietFeedback>Breakfast looked good! Keep it up</DietFeedback>
|
| 31 |
```
|
README_zh.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- zh
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- zai-org/chatglm3-6b
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
---
|
| 9 |
+
\[ [English](README.md) | 中文 \]
|
| 10 |
+
## 简介
|
| 11 |
+
用于体重管理饮食反馈任务的大语言模型(Large Language Model for Dietary Feedback, LLMDF)是使用移动健康体重管理软件的真实场景饮食反馈数据微调得到的模型。具体微调方式见论文:**Using Large Language Models to Generate Dietary Feedback Similar to Human Experts in Weight Management: Based on Real-world Scenario Data**
|
| 12 |
+
|
| 13 |
+
## 特点
|
| 14 |
+
**优势:** 直接使用真实世界数据微调得到的模型,在生成饮食反馈时,生成的内容与本地营养师的回复风格相近。
|
| 15 |
+
|
| 16 |
+
**劣势:** 由于真实世界的健康服务提供者与健康管理用户沟通的数据存在受交互偏好影响的噪声以及长尾分布影响的原因,直接使用真实世界数据微调时,模型的回复在专家评估中被认为:提供充足信息的能力存在缺失。
|
| 17 |
+
|
| 18 |
+
## 使用方式
|
| 19 |
+
LLMDF是由[ChatGLM3-6B](https://huggingface.co/zai-org/chatglm3-6b)微调得到的,当使用Hugging Face的``transformers``进行推理时,需要注意构造与训练时对话格式一致的[提示词模版](https://github.com/zai-org/ChatGLM3/blob/main/PROMPT.md)
|
| 20 |
+
```
|
| 21 |
+
<|user|>
|
| 22 |
+
想象你是一位营养师,你将收到进行饮食管理的客户的饮食信息。你的任务是提供对客户饮食信息的反馈,你需要提供有见解性的内容,给客户饮食指导,引导客户进行健康的生活方式。你可以参考从以下角度组织你给客户的饮食反馈:分析客户摄入食物的属性、提供健康食物的选择、帮助客户制定饮食模式、鼓励客户维持健康的饮食习惯、建议客户修正饮食习惯。<MealInformation><MealType>早餐</MealType><MealIntakeInformation>豆浆 1碗;鸡蛋 1中只;猪肉玉米胡萝卜糯米饭 200克;</MealIntakeInformation></MealInformation><PersonalHealthInformation><Gender>男</Gender><Age>19</Age><Height>180cm</Height><Weight>84.0kg</Weight><Waistline>85cm</Waistline><LaborIntensity>中等劳动强度</LaborIntensity></PersonalHealthInformation>
|
| 23 |
+
<|assistant|>
|
| 24 |
+
```
|
| 25 |
+
当使用上述示例的提示词时,LLMDF的生成结果为:
|
| 26 |
+
```
|
| 27 |
+
<|user|>
|
| 28 |
+
想象你是一位营养师,你将收到进行饮食管理的客户的饮食信息。你的任务是提供对客户饮食信息的反馈,你需要提供有见解性的内容,给客户饮食指导,引导客户进行健康的生活方式。你可以参考从以下角度组织你给客户的饮食反馈:分析客户摄入食物的属性、提供健康食物的选择、帮助客户制定饮食模式、鼓励客户维持健康的饮食习惯、建议客户修正饮食习惯。<MealInformation><MealType>早餐</MealType><MealIntakeInformation>豆浆 1碗;鸡蛋 1中只;猪肉玉米胡萝卜糯米饭 200克;</MealIntakeInformation></MealInformation><PersonalHealthInformation><Gender>男</Gender><Age>19</Age><Height>180cm</Height><Weight>84.0kg</Weight><Waistline>85cm</Waistline><LaborIntensity>中等劳动强度</LaborIntensity></PersonalHealthInformation>
|
| 29 |
+
<|assistant|>
|
| 30 |
+
<DietFeedback>早餐还是不错的,继续保持。</DietFeedback>
|
| 31 |
+
```
|