Huggingface.js documentation
接口:ModelConfig
@huggingface/inference
使用 Inference ClientAPI 参考
类
HfInferenceInferenceClientInferenceClientEndpointInferenceClientErrorInferenceClientHubApiErrorInferenceClientInputErrorInferenceClientProviderApiErrorInferenceClientProviderOutputErrorInferenceClientRoutingError
接口
AudioToAudioOutputAudioToAudioOutputElemBaseArgsBodyParamsHeaderParamsInferenceProviderMappingEntryLogger选项TextGenerationInputTextGenerationOutputTextGenerationStreamBestOfSequenceTextGenerationStreamDetailsTextGenerationStreamOutputTextGenerationStreamPrefillTokenTextGenerationStreamTokenUrlParams
模块
@huggingface/hub
与 Hub 交互API 参考
类
接口
AuthInfoCachedFileInfoCachedRepoInfoCachedRevisionInfoCommitCopyFileCommitDataCommitDeletedEntryCommitEditFileCommitEditFileParamsCommitFileCommitInfoCommitOutputCopyDestinationCopyFilesEntryCopyProgressEventCopySource凭据DatasetEntryFileDownloadInfoOutputHFCacheInfoJobVolumeLfsPathInfoListFileEntryMlxQuantizationConfigModelConfigModelDerivedFieldsModelEntryOAuthResultParallelDownloadOptionsPathInfoQuantizationConfigRangeEditCacheEntryRepoIdSafetensorsIndexJsonSafetensorsShardFileInfoSecurityFileStatusSpaceEntrySpaceResourceConfigSpaceResourceRequirementSpaceRuntimeTensorInfoUserInfoWhoAmIAppWhoAmIOrgWhoAmIUserXetFileInfoXetReadToken
@huggingface/mcp-client
@huggingface/tiny-agents
@huggingface/space-header
@huggingface/gguf
@huggingface/lerobot
@huggingface/usd-web-viewer
接口:ModelConfig
属性
expert _ dtype
• Optional expert_dtype:string
某些 MoE 模型会以比模型其余部分更窄的精度存储其专家,并在此处(quantization_config 之外)进行声明(例如 DeepSeek-V4)。当量化配置未声明自身的 expert_dtype 时(如 DeepSeek-V4.1 的情况),此设置将作为回退方案使用。
定义于
packages/hub/src/lib/parse-safetensors-metadata.ts:968
量化
• Optional 量化:MlxQuantizationConfig
当前的 MLX 格式,可选择按模块名称进行逐模块覆盖。
定义于
packages/hub/src/lib/parse-safetensors-metadata.ts:960
量化 _ 配置
• Optional quantization_config: QuantizationConfig | MlxQuantizationConfig
定义于
packages/hub/src/lib/parse-safetensors-metadata.ts:961
文本 _ 配置
• Optional text_config: Pick<ModelConfig, "expert_dtype" | "quantization" | "quantization_config">
定义于
packages/hub/src/lib/parse-safetensors-metadata.ts:962
Update on GitHub