Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(baichuan): supported from baichuan 2 from now on. #728

Merged
merged 4 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.