Upload MODEL_CARD.md
Browse files---
license: mit
data:
* 中文对话对(知乎、微博)
* 英文对话对(Reddit、StackExchange)
* 行业知识问答(IT、医疗、金融)
language:
* zh
* en
metrics:
* 中文问答精确率(C-Eval EM): 68.3%
* 多轮对话F1(GPT4Bot-Bench): 72.1%
* 自我对话相似度(SelfChat Sim): 0.87
base\_model: LLaMA 2 7B
new\_version: 1.0.0
pipeline\_tag: text-generation, conversational
auto\_detect:
* language
* sentiment
library\_name:
* llama.cpp
* FastAPI
tags:
* chatbot
* self-hosted
* bilingual
* low-latency
eval\_results: 见评估结果部分
documentation: [https://huggingface.co/your-username/my-chatbot-llama2-7b](https://huggingface.co/your-username/my-chatbot-llama2-7b)
---
# 中文双语智能对话模型 `my-chatbot-llama2-7b`
## 模型简介
* **模型名称**:my-chatbot-llama2-7b
* **版本**:1.0.0
* **许可协议**:MIT License
* **基础模型**:LLaMA 2 7B(由 Meta 提供)
* **适用语言**:中文、英文
* **适用场景**:问答、闲聊、知识检索、行业对话
该模型在 LLaMA 2 7B 基础上进行微调,加入大量中文和英文对话数据,优化对中文语义理解能力,在对话连贯性、简洁性方面表现稳定,适合本地私有部署,支持最大 2048 字符上下文。
---
## 应用场景
* 🤖 客服助手:适用于网页客服、应用内问答等场景
* 📚 知识查询:结合行业数据,实现领域问答(如 IT 故障、医疗症状解释、金融常识)
* 🖥️ 本地部署:支持 CPU/GPU 本地运行,适合对数据安全有要求的企业用户
* 🔀 中英混合问答:自动识别语言,无需用户手动切换
---
## 快速使用
### 🧩 安装依赖
```bash
# 安装 llama.cpp
git clone https:
```
- MODEL_CARD.md +28 -91
|
@@ -3,16 +3,16 @@
|
|
| 3 |
license: mit
|
| 4 |
data:
|
| 5 |
|
| 6 |
-
*
|
| 7 |
-
*
|
| 8 |
-
*
|
| 9 |
language:
|
| 10 |
* zh
|
| 11 |
* en
|
| 12 |
metrics:
|
| 13 |
-
* C-Eval EM
|
| 14 |
-
* GPT4Bot-Bench
|
| 15 |
-
* SelfChat Sim
|
| 16 |
base\_model: LLaMA 2 7B
|
| 17 |
new\_version: 1.0.0
|
| 18 |
pipeline\_tag: text-generation, conversational
|
|
@@ -27,103 +27,40 @@ data:
|
|
| 27 |
* self-hosted
|
| 28 |
* bilingual
|
| 29 |
* low-latency
|
| 30 |
-
eval\_results:
|
| 31 |
documentation: [https://huggingface.co/your-username/my-chatbot-llama2-7b](https://huggingface.co/your-username/my-chatbot-llama2-7b)
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
-
#
|
| 36 |
|
| 37 |
-
##
|
| 38 |
|
| 39 |
-
*
|
| 40 |
-
*
|
| 41 |
-
*
|
| 42 |
-
*
|
| 43 |
-
*
|
| 44 |
-
*
|
| 45 |
-
* **Hardware Requirements:** CPU-only (4+ cores, 8 GB RAM) or GPU (≥4 GB VRAM recommended)
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
## Intended Use
|
| 52 |
-
|
| 53 |
-
* **Primary Use Cases:**
|
| 54 |
-
|
| 55 |
-
* Chatbot applications (customer support, personal assistant)
|
| 56 |
-
* FAQ generation and knowledge retrieval
|
| 57 |
-
* Low-latency on-premises inference
|
| 58 |
-
* **Users:** Developers seeking an open-source, self-hosted chat model.
|
| 59 |
-
* **Exclusions:** Not for generating disallowed content (hate speech, misinformation, medical or legal advice without expert oversight).
|
| 60 |
-
|
| 61 |
-
## How to Use
|
| 62 |
-
|
| 63 |
-
1. **Installation**
|
| 64 |
-
|
| 65 |
-
```bash
|
| 66 |
-
# Clone and build llama.cpp
|
| 67 |
-
git clone https://github.com/ggerganov/llama.cpp
|
| 68 |
-
cd llama.cpp && make
|
| 69 |
-
pip install fastapi uvicorn
|
| 70 |
-
```
|
| 71 |
-
2. **Download Model Weights**
|
| 72 |
-
Obtain `llama2-7b.gguf` from Hugging Face or convert official weights:
|
| 73 |
-
|
| 74 |
-
```bash
|
| 75 |
-
python convert-llama2-to-gguf.py /path/to/llama2-7b /models/llama2-7b.gguf
|
| 76 |
-
```
|
| 77 |
-
3. **Run Inference API:**
|
| 78 |
-
|
| 79 |
-
```bash
|
| 80 |
-
uvicorn app:app --host 0.0.0.0 --port 8000 --reload
|
| 81 |
-
```
|
| 82 |
-
4. **Sample Request:**
|
| 83 |
-
|
| 84 |
-
```bash
|
| 85 |
-
curl -X POST http://localhost:8000/generate \
|
| 86 |
-
-H "Content-Type: application/json" \
|
| 87 |
-
-d '{"prompt": "你好,世界!", "token": "YOUR_SECURE_TOKEN"}'
|
| 88 |
-
```
|
| 89 |
-
|
| 90 |
-
## Training Data
|
| 91 |
-
|
| 92 |
-
* **Base Model:** LLaMA 2 7B (Meta)
|
| 93 |
-
* **Fine-Tuning Data:**
|
| 94 |
-
|
| 95 |
-
* 200k Chinese conversational pairs (Weibo, Zhihu)
|
| 96 |
-
* 150k English conversational pairs (Reddit, StackExchange)
|
| 97 |
-
* 50k domain-specific Q\&A (IT, healthcare, finance)
|
| 98 |
-
* **Preprocessing:** Unicode normalization, deduplication, profanity filtering
|
| 99 |
-
|
| 100 |
-
## Evaluation Results
|
| 101 |
-
|
| 102 |
-
| Benchmark | Metric | Score | Notes |
|
| 103 |
-
| ------------------ | ---------- | ----- | --------------------------------- |
|
| 104 |
-
| C-Eval (Chinese) | EM | 68.3% | Compared against human reference |
|
| 105 |
-
| GPT4Bot-Bench | F1 | 72.1% | Conversational question answering |
|
| 106 |
-
| SelfChat Sim Score | Similarity | 0.87 | Diversity of responses |
|
| 107 |
|
| 108 |
-
##
|
| 109 |
|
| 110 |
-
*
|
| 111 |
-
*
|
| 112 |
-
*
|
|
|
|
| 113 |
|
| 114 |
-
|
| 115 |
|
| 116 |
-
|
| 117 |
-
* **Privacy:** No personal data was used in fine-tuning.
|
| 118 |
-
* **Misuse Risk:** Could be used to generate misleading or spam content. Users should implement rate-limiting and content moderation.
|
| 119 |
|
| 120 |
-
|
| 121 |
|
| 122 |
-
```
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
author = {Your Name or Organization},
|
| 126 |
-
year = {2025},
|
| 127 |
-
howpublished = {\url{https://huggingface.co/your-username/my-chatbot-llama2-7b}}
|
| 128 |
-
}
|
| 129 |
```
|
|
|
|
| 3 |
license: mit
|
| 4 |
data:
|
| 5 |
|
| 6 |
+
* 中文对话对(知乎、微博)
|
| 7 |
+
* 英文对话对(Reddit、StackExchange)
|
| 8 |
+
* 行业知识问答(IT、医疗、金融)
|
| 9 |
language:
|
| 10 |
* zh
|
| 11 |
* en
|
| 12 |
metrics:
|
| 13 |
+
* 中文问答精确率(C-Eval EM): 68.3%
|
| 14 |
+
* 多轮对话F1(GPT4Bot-Bench): 72.1%
|
| 15 |
+
* 自我对话相似度(SelfChat Sim): 0.87
|
| 16 |
base\_model: LLaMA 2 7B
|
| 17 |
new\_version: 1.0.0
|
| 18 |
pipeline\_tag: text-generation, conversational
|
|
|
|
| 27 |
* self-hosted
|
| 28 |
* bilingual
|
| 29 |
* low-latency
|
| 30 |
+
eval\_results: 见评估结果部分
|
| 31 |
documentation: [https://huggingface.co/your-username/my-chatbot-llama2-7b](https://huggingface.co/your-username/my-chatbot-llama2-7b)
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
+
# 中文双语智能对话模型 `my-chatbot-llama2-7b`
|
| 36 |
|
| 37 |
+
## 模型简介
|
| 38 |
|
| 39 |
+
* **模型名称**:my-chatbot-llama2-7b
|
| 40 |
+
* **版本**:1.0.0
|
| 41 |
+
* **许可协议**:MIT License
|
| 42 |
+
* **基础模型**:LLaMA 2 7B(由 Meta 提供)
|
| 43 |
+
* **适用语言**:中文、英文
|
| 44 |
+
* **适用场景**:问答、闲聊、知识检索、行业对话
|
|
|
|
| 45 |
|
| 46 |
+
该模型在 LLaMA 2 7B 基础上进行微调,加入大量中文和英文对话数据,优化对中文语义理解能力,在对话连贯性、简洁性方面表现稳定,适合本地私有部署,支持最大 2048 字符上下文。
|
| 47 |
|
| 48 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
## 应用场景
|
| 51 |
|
| 52 |
+
* 🤖 客服助手:适用于网页客服、应用内问答等场景
|
| 53 |
+
* 📚 知识查询:结合行业数据,实现领域问答(如 IT 故障、医疗症状解释、金融常识)
|
| 54 |
+
* 🖥️ 本地部署:支持 CPU/GPU 本地运行,适合对数据安全有要求的企业用户
|
| 55 |
+
* 🔀 中英混合问答:自动识别语言,无需用户手动切换
|
| 56 |
|
| 57 |
+
---
|
| 58 |
|
| 59 |
+
## 快速使用
|
|
|
|
|
|
|
| 60 |
|
| 61 |
+
### 🧩 安装依赖
|
| 62 |
|
| 63 |
+
```bash
|
| 64 |
+
# 安装 llama.cpp
|
| 65 |
+
git clone https:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
```
|