Skip to content

Commit

Permalink
fix(baichuan): supported from baichuan 2 from now on. (#728)
Browse files Browse the repository at this point in the history
* config support multiple architectures

* chore: only support baichuan2 from now on

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>

* chore: update notes

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>

* chore: run script [skip ci]

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>

---------

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
Co-authored-by: Aaron <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
MingLiangDai and aarnphm committed Nov 24, 2023
1 parent 39ecc73 commit 7b8d902
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,10 @@ openllm query 'What are large language models?'
You can specify any of the following Baichuan models via `openllm start`:
- [baichuan-inc/baichuan-7b](https://huggingface.co/baichuan-inc/baichuan-7b)
- [baichuan-inc/baichuan-13b-base](https://huggingface.co/baichuan-inc/baichuan-13b-base)
- [baichuan-inc/baichuan-13b-chat](https://huggingface.co/baichuan-inc/baichuan-13b-chat)
- [fireballoon/baichuan-vicuna-chinese-7b](https://huggingface.co/fireballoon/baichuan-vicuna-chinese-7b)
- [fireballoon/baichuan-vicuna-7b](https://huggingface.co/fireballoon/baichuan-vicuna-7b)
- [hiyouga/baichuan-7b-sft](https://huggingface.co/hiyouga/baichuan-7b-sft)
- [baichuan-inc/baichuan2-7b-base](https://huggingface.co/baichuan-inc/baichuan2-7b-base)
- [baichuan-inc/baichuan2-7b-chat](https://huggingface.co/baichuan-inc/baichuan2-7b-chat)
- [baichuan-inc/baichuan2-13b-base](https://huggingface.co/baichuan-inc/baichuan2-13b-base)
- [baichuan-inc/baichuan2-13b-chat](https://huggingface.co/baichuan-inc/baichuan2-13b-chat)
### Supported backends
Expand All @@ -249,7 +247,7 @@ OpenLLM will support vLLM and PyTorch as default backend. By default, it will us
To install vLLM, run `pip install "openllm[vllm]"`
```bash
TRUST_REMOTE_CODE=True openllm start baichuan-inc/baichuan-7b --backend vllm
TRUST_REMOTE_CODE=True openllm start baichuan-inc/baichuan2-7b-base --backend vllm
```
Expand All @@ -264,7 +262,7 @@ TRUST_REMOTE_CODE=True openllm start baichuan-inc/baichuan-7b --backend vllm
```bash
TRUST_REMOTE_CODE=True openllm start baichuan-inc/baichuan-7b --backend pt
TRUST_REMOTE_CODE=True openllm start baichuan-inc/baichuan2-7b-base --backend pt
```
</details>
Expand Down
1 change: 1 addition & 0 deletions changelog.d/728.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Only baichuan2 and baichuan3 are supported. We dropped baichuan 1 support
1 change: 0 additions & 1 deletion openllm-core/src/openllm_core/config/configuration_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
)
)


class _LazyConfigMapping(OrderedDictType, ReprMixin):
def __init__(self, mapping: OrderedDict[LiteralString, LiteralString]):
self._mapping = mapping
Expand Down
12 changes: 5 additions & 7 deletions openllm-core/src/openllm_core/config/configuration_baichuan.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@ class BaichuanConfig(openllm_core.LLMConfig):
'url': 'https://github.com/baichuan-inc/Baichuan-7B',
'requirements': ['cpm-kernels'],
'backend': ('pt', 'vllm'),
'architecture': 'BaiChuanForCausalLM',
'architecture': 'BaichuanForCausalLM',
# NOTE: See the following
# https://huggingface.co/baichuan-inc/Baichuan-13B-Chat/blob/19ef51ba5bad8935b03acd20ff04a269210983bc/modeling_baichuan.py#L555
# https://huggingface.co/baichuan-inc/Baichuan-13B-Chat/blob/main/generation_config.json
# https://github.com/baichuan-inc/Baichuan-13B/issues/25
'default_id': 'baichuan-inc/baichuan-7b',
'model_ids': [
'baichuan-inc/baichuan-7b',
'baichuan-inc/baichuan-13b-base',
'baichuan-inc/baichuan-13b-chat',
'fireballoon/baichuan-vicuna-chinese-7b',
'fireballoon/baichuan-vicuna-7b',
'hiyouga/baichuan-7b-sft',
'baichuan-inc/baichuan2-7b-base',
'baichuan-inc/baichuan2-7b-chat',
'baichuan-inc/baichuan2-13b-base',
'baichuan-inc/baichuan2-13b-chat',
],
}

Expand Down
14 changes: 6 additions & 8 deletions openllm-python/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7b8d902

Please sign in to comment.