Meteonis's picture
Update README.md
fe34adb
|
raw
history blame
1.68 kB
---
license: apache-2.0
language:
- zh
tags:
- Chinese
---
# Open-Chinese-LLaMA-7B-Patch
This model is a **Chinese large language model base** generated from the [LLaMA](https://github.com/facebookresearch/llama)-7B model after **secondary pre-training** on Chinese datasets.
This model is a **patch** model and must be used in conjunction with the official weights. For the installation of the patch and related tutorials, please refer to [OpenLMLab/llama](https://github.com/OpenLMLab/llama).
## Usage
Since the official weights for [LLaMA](https://github.com/facebookresearch/llama)-7B have not been open-sourced, the model released this time is of the **patch** type, which needs to be used in combination with the original official weights.
You can install the **patch** using `tools/patch_model.py`, for example:
```bash
python tools/patch_model.py --base_model <path_or_name_to_original_model>
--patch_model openlmlab/open-chinese-llama-7b-patch
--base_model_format <hf_or_raw>
```
The **patch** is installed in place, which means that the installed **patch** is the complete `hf` format weight. You can use `transformers` to load the model.
## Quick Experience via Command Line
The **patched** model can be easily loaded by `transformers`. For a quick experience, we provide a console Demo:
```bash
python cli_demo.py --model openlmlab/open-chinese-llama-7b-patch
--devices 0
--max_length 1024
--do_sample true
--top_k 40
--top_p 0.8
--temperature 0.7
--penalty 1.02
```