InternLM / InternLM/lmdeploy

[Feature] 给 lmdeploy pytorch引擎,添加一个权重参数加载精度的参数。

Open
#1,398 3 comments 0 reactions 1 assignee Claimed by @grimoire View on GitHub
Dominant language
Python
Stars
8.1k
Forks
748
Avg merge
6d 2h
Merged PRs (30d)
54

Description

### Motivation

## 硬件 T4 ,16G
## 需求:
给pytorch添加一个加载精度的参数,类似:vllm 的 dtype = [--dtype {auto,half,float16,bfloat16,float,float32}] ,让用户可以主动根据硬件能力选择 加载/推理 精度。

### 命令
lmdeploy serve api_server Qwen/Qwen1.5-1.8B-Chat --server-port 23333 --cache-max-entry-count 0.5

### 错误
2024-04-06 01:12:36,466 - lmdeploy - ERROR - AssertionError: bf16 is not supported on your device
2024-04-06 01:12:36,466 - lmdeploy - ERROR - test failed!
Your device does not support `torch.bfloat16`. Try edit `torch_dtype` in `config.json`.
Note that this might have negative effect!

### Related resources

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.