[Docs] Fix warnings in mkdocs build (continued) (#24092)
Signed-off-by: Zerohertz <ohg3417@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
co-authored by
Harry Mellor
Wentao Ye
parent
c0bd6a684a
commit
ccee371e86
@@ -755,7 +755,7 @@ class FusedMoE(CustomOp):
|
||||
intermediate_size: Intermediate size of the experts
|
||||
params_dtype: Data type for the parameters.
|
||||
reduce_results: Whether to all all_reduce on the output of the layer
|
||||
renomalize: Whether to renormalize the logits in the fused_moe kernel
|
||||
renormalize: Whether to renormalize the logits in the fused_moe kernel
|
||||
quant_config: Quantization configure.
|
||||
enable_eplb: Whether to enable expert parallelism load balancer.
|
||||
"""
|
||||
|
||||
@@ -420,9 +420,8 @@ def shuffle_weights(
|
||||
|
||||
Args:
|
||||
*tensors: Variable number of torch.Tensor objects.
|
||||
layout: A pair of integers specifying the
|
||||
block sizes used to divide the tensors during shuffling.
|
||||
Default is (16, 16).
|
||||
layout: A pair of integers specifying the block sizes used to divide
|
||||
the tensors during shuffling. Default is (16, 16).
|
||||
|
||||
Returns:
|
||||
A Tuple of shuffled tensors.
|
||||
|
||||
@@ -10,7 +10,7 @@ like uniform random routing.
|
||||
"""
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Optional
|
||||
from typing import Any, Optional
|
||||
|
||||
import torch
|
||||
|
||||
@@ -50,7 +50,9 @@ class DistributionBasedRouting(RoutingStrategy):
|
||||
distributions for testing different routing patterns.
|
||||
"""
|
||||
|
||||
def __init__(self, distribution: str = "uniform", **distribution_params):
|
||||
def __init__(self,
|
||||
distribution: str = "uniform",
|
||||
**distribution_params: Any):
|
||||
"""
|
||||
Initialize distribution-based routing.
|
||||
|
||||
@@ -244,7 +246,7 @@ class RoutingSimulator:
|
||||
cls._routing_strategies[name] = strategy
|
||||
|
||||
@classmethod
|
||||
def get_available_strategies(cls):
|
||||
def get_available_strategies(cls) -> list[str]:
|
||||
"""
|
||||
Get list of available routing strategy names.
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ class BitBLASLinearMethod(LinearMethodBase):
|
||||
output_size: int,
|
||||
params_dtype: torch.dtype,
|
||||
**extra_weight_attrs,
|
||||
):
|
||||
) -> None:
|
||||
"""Creates quantized weights for use in linear operations.
|
||||
|
||||
The function initializes and returns a dictionary containing quantized
|
||||
@@ -211,7 +211,7 @@ class BitBLASLinearMethod(LinearMethodBase):
|
||||
|
||||
Args:
|
||||
input_size_per_partition: The size of the input partition.
|
||||
output_size_per_partition: The size of the output partition.
|
||||
output_partition_sizes: List of output partition sizes.
|
||||
input_size: The total size of the input (unused).
|
||||
output_size: The total size of the output (unused).
|
||||
params_dtype:
|
||||
@@ -222,9 +222,9 @@ class BitBLASLinearMethod(LinearMethodBase):
|
||||
scales ('scales'), and zeros ('zeros').
|
||||
|
||||
Raises:
|
||||
ValueError: If `params_dtype` is not `torch.float16` or if the
|
||||
input size per partition is not divisible by the group size in
|
||||
`quant_config`.
|
||||
ValueError: If `params_dtype` is not `torch.float16` or if the input
|
||||
size per partition is not divisible by the group size
|
||||
in `quant_config`.
|
||||
"""
|
||||
del input_size, output_size # Unused arguments.
|
||||
weight_loader = extra_weight_attrs["weight_loader"]
|
||||
|
||||
@@ -265,9 +265,9 @@ class GPTQBitBLASLinearMethod(LinearMethodBase):
|
||||
scales ('scales'), and zeros ('zeros').
|
||||
|
||||
Raises:
|
||||
ValueError: If `params_dtype` is not `torch.float16` or
|
||||
if the input size per partition is not divisible by the
|
||||
group size in `quant_config`.
|
||||
ValueError: If `params_dtype` is not `torch.float16` or if the input
|
||||
size per partition is not divisible by the group size
|
||||
in `quant_config`.
|
||||
"""
|
||||
if params_dtype != torch.float16:
|
||||
raise ValueError("Parameter data type must be torch.float16, "
|
||||
|
||||
@@ -46,11 +46,11 @@ def choose_mp_linear_kernel(
|
||||
performance.
|
||||
|
||||
Args:
|
||||
config (MPLinearLayerConfig): Description of the linear layer to be
|
||||
implemented.
|
||||
config (MPLinearLayerConfig): Description of the linear layer to be
|
||||
implemented.
|
||||
compute_capability (Optional[int], optional): The compute capability of
|
||||
the target device, if None uses `current_platform` to get the compute
|
||||
capability. Defaults to None.
|
||||
the target device, if None uses `current_platform` to get
|
||||
the compute capability. Defaults to None.
|
||||
|
||||
Raises:
|
||||
ValueError: If no kernel can implement the given config.
|
||||
|
||||
Reference in New Issue
Block a user