Skip to content

Commit 6251d68

Browse files
authored
[fix] PR #5354 (#5501)
* [fix] * [fix] * Update config.py docstring * [fix] docstring align * [fix] docstring align * [fix] docstring align
1 parent 1d62623 commit 6251d68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

colossalai/inference/config.py

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class InputMetaData:
4444
use_cuda_graph (bool, optional): Indicates whether to use the CUDA graph. Defaults to False.
4545
kv_seq_len (int, optional): Key-value sequence length. Defaults to 512.
4646
head_dim (int, optional): Head dimension. Defaults to 32.
47+
high_precision(bool, optional): Whether to use float32 for underlying calculations of float16 data to achieve higher precision, Defaults to False.
48+
dtype (torch.dtype, optional): The computation type of tensor, Defaults to torch.float32.
4749
"""
4850

4951
block_tables: torch.Tensor = None
@@ -55,6 +57,8 @@ class InputMetaData:
5557
use_cuda_graph: bool = False
5658
kv_seq_len: int = 512
5759
head_dim: int = 32
60+
high_precision: bool = False
61+
dtype: torch.dtype = torch.float32
5862

5963
def __repr__(self) -> str:
6064
return f"InputMetaData(block_tables={self.block_tables}, sequence_lengths={self.sequence_lengths}, fd_inter_tensor={self.fd_inter_tensor}, batch_size={self.batch_size}, is_prompts={self.is_prompts}, use_cuda_graph={self.use_cuda_graph}, kv_seq_len={self.kv_seq_len}, head_dim={self.head_dim})"

0 commit comments

Comments
 (0)