Skip to content

Conversation

@littlegy
Copy link
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Please describe the motivation of this PR and the goal you want to achieve through this PR.

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

Comment on lines 167 to 174
cmd = [
'lmdeploy', 'serve', 'api_server', model_path, '--server-port',
str(self.api_port), '--tp',
str(tp), '--backend', backend, '--communicator', communicator
]

if backend == 'turbomind':
cmd.extend(['--quant-policy', str(quant_policy)])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Both engines support --quant-policy
But only turbomind engine support --communicator

Comment on lines 16 to 47
def is_port_open(host: str, port: int, timeout: float = 1.0) -> bool:
"""Check if a port is open."""
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.settimeout(timeout)
try:
s.connect((host, port))
return True
except (socket.timeout, ConnectionRefusedError, OSError):
return False


def verify_service_functionality(host: str, proxy_port: int, model_name: str, check_count: int) -> bool:
try:
url = f'http://{host}:{proxy_port}/v1/chat/completions'
payload = {
'model': model_name,
'messages': [{
'role': 'user',
'content': 'hi'
}],
'max_tokens': 5,
'stream': False
}
resp = requests.post(url, json=payload, timeout=15)
if resp.status_code in (200, 400):
return True
else:
print(f'🔧 Check {check_count}: Service returned status {resp.status_code}')
return False
except Exception as e:
print(f'🔧 Check {check_count}: Failed to verify service functionality - {e}')
return False
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can it be reused in ray_distributed_utils.py

Qwen3-235B-A22B-Thinking-2507: 8

dp_ep_config:
Kimi-K2-Instruct-0905: {"dp": 16, "ep": 16}
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use YAML format instead of a JSON string; the configuration reader will parse it into JSON.

Kimi-K2-Instruct-0905:
dp: 16
ep: 16

- unsloth/gpt-oss-120b-BF16


evaluate_model:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We may also cover the use of the tp_ep configuration in the future.

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.

3 participants