vllm.transformers_utils.utils ¶
_maybe_json_dict ¶
_maybe_space_split_dict ¶
Source code in vllm/transformers_utils/utils.py
check_gguf_file cached ¶
Check if the file is a GGUF model.
Source code in vllm/transformers_utils/utils.py
convert_model_repo_to_path ¶
When VLLM_USE_MODELSCOPE is True convert a model repository string to a Path str.
Source code in vllm/transformers_utils/utils.py
is_cloud_storage ¶
is_gcs ¶
is_gguf ¶
Check if the model is a GGUF model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model | str | Path | Model name, path, or Path object to check. | required |
Returns:
| Type | Description |
|---|---|
bool | True if the model is a GGUF model, False otherwise. |
Source code in vllm/transformers_utils/utils.py
is_remote_gguf cached ¶
Check if the model is a remote GGUF model.
Source code in vllm/transformers_utils/utils.py
is_s3 ¶
is_valid_gguf_quant_type ¶
maybe_model_redirect cached ¶
Use model_redirect to redirect the model name to a local folder.
:param model: hf model name :return: maybe redirect to a local folder
Source code in vllm/transformers_utils/utils.py
modelscope_list_repo_files ¶
modelscope_list_repo_files(
repo_id: str,
revision: str | None = None,
token: str | bool | None = None,
) -> list[str]
List files in a modelscope repo.
Source code in vllm/transformers_utils/utils.py
parse_safetensors_file_metadata ¶
Source code in vllm/transformers_utils/utils.py
split_remote_gguf ¶
Split the model into repo_id and quant type.