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

[Core]Init vllm-ascend #2

Closed
wants to merge 59 commits into from
Closed

Conversation

wangxiyuan
Copy link
Collaborator

@wangxiyuan wangxiyuan commented Jan 29, 2025

No description provided.

wangxiyuan and others added 30 commits December 19, 2024 10:22
Signed-off-by: MengqingCao <[email protected]>
  * add requirements.txt for npu
  * update setup.py

Signed-off-by: MengqingCao <[email protected]>
Add npu worker and model_runner
Signed-off-by: MengqingCao <[email protected]>
Signed-off-by: MengqingCao <[email protected]>
  * add block_size arg to inference script
  * add get_current_memory_usage to platform

Signed-off-by: MengqingCao <[email protected]>
Signed-off-by: MengqingCao <[email protected]>
[bugfix]: attention alibi bias shape is wrong
[Docs] Update docs and code format
[Format] Update docs and add format.sh
Signed-off-by: MengqingCao <[email protected]>
Yikun and others added 23 commits January 16, 2025 09:04
Signed-off-by: MengqingCao <[email protected]>
Signed-off-by: Shanshan Shen <[email protected]>
* enable npu profiling

Signed-off-by: wangli <[email protected]>

* adjust import position

Signed-off-by: wangli <[email protected]>

---------

Signed-off-by: wangli <[email protected]>
* [CI] use cached vLLM

Signed-off-by: MengqingCao <[email protected]>

* fix path

Signed-off-by: MengqingCao <[email protected]>

---------

Signed-off-by: MengqingCao <[email protected]>
Signed-off-by: Yikun <[email protected]>
* update contributing doc

Signed-off-by: Shanshan Shen <[email protected]>

* update contributing doc

Signed-off-by: Shanshan Shen <[email protected]>

* update contributing doc

Signed-off-by: Shanshan Shen <[email protected]>

* update contributing doc

Signed-off-by: Shanshan Shen <[email protected]>

* add ut pr label

Signed-off-by: Shanshan Shen <[email protected]>

* update pr labels

Signed-off-by: Shanshan Shen <[email protected]>

* update pr labels

Signed-off-by: Shanshan Shen <[email protected]>

---------

Signed-off-by: Shanshan Shen <[email protected]>
* Init vLLM Ascend backend plugin README.md

Signed-off-by: Yikun <[email protected]>

* Fix words and logos

Signed-off-by: Yikun <[email protected]>

---------

Signed-off-by: Yikun <[email protected]>
### What this PR does / why we need it?
Add Python ignore and `.DS_Store`

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
git status see related file ignored

Signed-off-by: Yikun <[email protected]>
### What this PR does / why we need it?

This patch align with the meta data of the vllm community and complete
the necessary information:

- Add copyright
- Update version: 0.1.0a1 alpha release follow
https://packaging.python.org/en/latest/specifications/version-specifiers
- Add author/license/description
- Remove extras_require

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?
```
# Prepare
$ python3 -m venv ./.venv-test
$ source ./.venv-test/bin/activate

# Install without failaure
$ pip install -e . --no-deps

# Check metadata as exptected
$ ls ./.venv-test/lib/python3.12/site-packages/vllm_ascend-0.1.0a1.dist-info
INSTALLER        LICENSE          METADATA         RECORD           REQUESTED        WHEEL            direct_url.json  entry_points.txt top_level.txt
```

Signed-off-by: Yikun <[email protected]>
init vLLM native UTs

Signed-off-by: MengqingCao <[email protected]>
* Refactor worker to decouple it from gpuworker
* add `get_model` func to `model_runner` and `worker`

plz merge this pr before #32 , because it relys on the reconstruction in
this PR

Signed-off-by: MengqingCao <[email protected]>
Mainly changes: 
  * exit if vLLM native ut failed
  * rm redundant mappings in docker
  * update TEST_FILES

`test_config.py` is disabled beacuse some models require for access:

![image](https://github.com/user-attachments/assets/79ceb1a5-f8e1-4228-8191-f0a83803ba6a)

Signed-off-by: MengqingCao <[email protected]>
### What this PR does / why we need it?
Adapts AttentionLayer and kvcache scaling interface to make ci happy
with master vLLM.
-
vllm-project/vllm@e97f802
Add the dynamic kv cache scaling factors
-
vllm-project/vllm@86bfb6d
Add AttentionLayer to forward

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
- run with master vllm
```
# Install vLLM main
git clone --depth 1 https://github.com/vllm-project/vllm.git /workspace/vllm
python3 -m pip install -r /workspace/vllm/requirements-build.txt
VLLM_TARGET_DEVICE="empty" python3 -m pip install /workspace/vllm/

# Install vllm-ascend main
python3 -m pip install /workspace/vllm_ascend/

# test
pytest tests -sv
```
- CI passed

Signed-off-by: Yikun <[email protected]>
### What this PR does / why we need it?
Test with vllm master code to fix CI failure

### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
By CI test

Signed-off-by: wangxiyuan <[email protected]>
### What this PR does / why we need it?

Remove useless ci deps because we use `VLLM_TARGET_DEVICE=empty` to
build

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
CI passed

Signed-off-by: Yikun <[email protected]>
### What this PR does / why we need it?
- Add `Building and testing` section to CONTRIBUTING.md
- Refresh Dockerfile to use empty VLLM_TARGET_DEVICE

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Preview and test

Signed-off-by: Yikun Jiang <[email protected]>
@wangxiyuan
Copy link
Collaborator Author

Please Do not merge, the CI need work first.

Copy link
Collaborator

@Yikun Yikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note: some hide files like .github and .gitignore havn't uploaded yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants