lm-sys / lm-sys/FastChat

How to use multiple Ascend NPUs?

Open
#3,060 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

Why is the --device npu parameter fixed to support only one Ascend NPU in code instead of multiple NPUs?
` def generate_stream_gate(self, params):`
` if self.device == "npu":`
` import torch_npu`
` torch_npu.npu.set_device("npu:0")`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the implementation containing generate_stream_gate and trace how --device npu is selected and passed to Ascend. Determine the intended multi-NPU behavior and configuration from the surrounding serving code; done means the npu path no longer forces npu:0 and multi-NPU use is verified on Ascend hardware.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.