Upload README.md
Browse files# My LLaMA 2 Chatbot (7B)
This repository contains a **fine-tuned bilingual conversational model** based on **LLaMA 2 7B**, built for Chinese and English dialogue tasks.
## 🚀 Model Overview
- **Base Model**: LLaMA 2 7B
- **Languages**: Chinese (zh), English (en)
- **Model Size**: 7 billion parameters
- **Training Data**:
- Chinese dialogue (Weibo, Zhihu)
- English dialogue (Reddit, StackExchange)
- Domain Q&A (IT, healthcare, finance)
## 📦 Files
| File | Description |
|------------------------|------------------------------------------|
| `config.json` | Model architecture config |
| `pytorch_model.bin` | Model weights |
| `tokenizer.model` | SentencePiece tokenizer model |
| `tokenizer_config.json`| Tokenizer configuration |
| `special_tokens_map.json` | Token ID mapping for special tokens |
| `generation_config.json` | Optional generation settings |
| `README.md` | Model card & usage |
## ✨ Usage Example
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("your-username/my-llama2-chatbot", torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("your-username/my-llama2-chatbot")
prompt = "你好,请问你是谁?"
inputs = tokenizer(prompt, return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(out[0], skip_special_tokens=True))
```
## 🔐 License
This model is released under the MIT license. If using Meta's weights, you must agree to [LLaMA 2 license terms](https://ai.meta.com/resources/models-and-libraries/llama-downloads/).
## 📈 Metrics
- **C-Eval EM**: 68.3%
- **GPT4Bot-Bench F1**: 72.1%
- **SelfChat Similarity**: 0.87
## 🤗 Hosted on Hugging Face
See: [https://huggingface.co/your-username/my-llama2-chatbot](https://huggingface.co/your-username/my-llama2-chatbot)
---
For support, improvements or questions, please open an issue or pull request.
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# My LLaMA 2 Chatbot (7B)
|
| 2 |
+
|
| 3 |
+
This repository contains a **fine-tuned bilingual conversational model** based on **LLaMA 2 7B**, built for Chinese and English dialogue tasks.
|
| 4 |
+
|
| 5 |
+
## 🚀 Model Overview
|
| 6 |
+
|
| 7 |
+
- **Base Model**: LLaMA 2 7B
|
| 8 |
+
- **Languages**: Chinese (zh), English (en)
|
| 9 |
+
- **Model Size**: 7 billion parameters
|
| 10 |
+
- **Training Data**:
|
| 11 |
+
- Chinese dialogue (Weibo, Zhihu)
|
| 12 |
+
- English dialogue (Reddit, StackExchange)
|
| 13 |
+
- Domain Q&A (IT, healthcare, finance)
|
| 14 |
+
|
| 15 |
+
## 📦 Files
|
| 16 |
+
|
| 17 |
+
| File | Description |
|
| 18 |
+
|------------------------|------------------------------------------|
|
| 19 |
+
| `config.json` | Model architecture config |
|
| 20 |
+
| `pytorch_model.bin` | Model weights |
|
| 21 |
+
| `tokenizer.model` | SentencePiece tokenizer model |
|
| 22 |
+
| `tokenizer_config.json`| Tokenizer configuration |
|
| 23 |
+
| `special_tokens_map.json` | Token ID mapping for special tokens |
|
| 24 |
+
| `generation_config.json` | Optional generation settings |
|
| 25 |
+
| `README.md` | Model card & usage |
|
| 26 |
+
|
| 27 |
+
## ✨ Usage Example
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 31 |
+
|
| 32 |
+
model = AutoModelForCausalLM.from_pretrained("your-username/my-llama2-chatbot", torch_dtype="auto")
|
| 33 |
+
tokenizer = AutoTokenizer.from_pretrained("your-username/my-llama2-chatbot")
|
| 34 |
+
|
| 35 |
+
prompt = "你好,请问你是谁?"
|
| 36 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 37 |
+
out = model.generate(**inputs, max_new_tokens=128)
|
| 38 |
+
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## 🔐 License
|
| 42 |
+
|
| 43 |
+
This model is released under the MIT license. If using Meta's weights, you must agree to [LLaMA 2 license terms](https://ai.meta.com/resources/models-and-libraries/llama-downloads/).
|
| 44 |
+
|
| 45 |
+
## 📈 Metrics
|
| 46 |
+
|
| 47 |
+
- **C-Eval EM**: 68.3%
|
| 48 |
+
- **GPT4Bot-Bench F1**: 72.1%
|
| 49 |
+
- **SelfChat Similarity**: 0.87
|
| 50 |
+
|
| 51 |
+
## 🤗 Hosted on Hugging Face
|
| 52 |
+
|
| 53 |
+
See: [https://huggingface.co/your-username/my-llama2-chatbot](https://huggingface.co/your-username/my-llama2-chatbot)
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
For support, improvements or questions, please open an issue or pull request.
|