# @huggingface/hub

## 클래스

- [HubApiError](classes/HubApiError)
- [InvalidApiResponseFormatError](classes/InvalidApiResponseFormatError)
- [JsonStreamParseError](classes/JsonStreamParseError)
- [SafetensorParseError](classes/SafetensorParseError)
- [\_\_internal\_XetBlob](classes/_internal_XetBlob)

## 인터페이스

- [AuthInfo](interfaces/AuthInfo)
- [CachedFileInfo](interfaces/CachedFileInfo)
- [CachedRepoInfo](interfaces/CachedRepoInfo)
- [CachedRevisionInfo](interfaces/CachedRevisionInfo)
- [커밋 파일 복사](interfaces/CommitCopyFile)
- [CommitData](interfaces/CommitData)
- [CommitDeletedEntry](interfaces/CommitDeletedEntry)
- [커밋 파일 편집](interfaces/CommitEditFile)
- [CommitEditFileParams](interfaces/CommitEditFileParams)
- [CommitFile](interfaces/CommitFile)
- [CommitInfo](interfaces/CommitInfo)
- [CommitOutput](interfaces/CommitOutput)
- [CopyDestination](interfaces/CopyDestination)
- [CopyFilesEntry](interfaces/CopyFilesEntry)
- [CopyProgressEvent](interfaces/CopyProgressEvent)
- [CopySource](interfaces/CopySource)
- [자격 증명](interfaces/Credentials)
- [DatasetEntry](interfaces/DatasetEntry)
- [FileDownloadInfoOutput](interfaces/FileDownloadInfoOutput)
- [HFCacheInfo](interfaces/HFCacheInfo)
- [JobVolume](interfaces/JobVolume)
- [LfsPathInfo](interfaces/LfsPathInfo)
- [ListFileEntry](interfaces/ListFileEntry)
- [MlxQuantizationConfig](interfaces/MlxQuantizationConfig)
- [ModelConfig](interfaces/ModelConfig)
- [ModelDerivedFields](interfaces/ModelDerivedFields)
- [ModelEntry](interfaces/ModelEntry)
- [OAuthResult](interfaces/OAuthResult)
- [ParallelDownloadOptions](interfaces/ParallelDownloadOptions)
- [PathInfo](interfaces/PathInfo)
- [QuantizationConfig](interfaces/QuantizationConfig)
- [RangeEditCacheEntry](interfaces/RangeEditCacheEntry)
- [RepoId](interfaces/RepoId)
- [SafetensorsIndexJson](interfaces/SafetensorsIndexJson)
- [SafetensorsShardFileInfo](interfaces/SafetensorsShardFileInfo)
- [SecurityFileStatus](interfaces/SecurityFileStatus)
- [SpaceEntry](interfaces/SpaceEntry)
- [SpaceResourceConfig](interfaces/SpaceResourceConfig)
- [SpaceResourceRequirement](interfaces/SpaceResourceRequirement)
- [SpaceRuntime](interfaces/SpaceRuntime)
- [TensorInfo](interfaces/TensorInfo)
- [UserInfo](interfaces/UserInfo)
- [WhoAmIApp](interfaces/WhoAmIApp)
- [WhoAmIOrg](interfaces/WhoAmIOrg)
- [WhoAmIUser](interfaces/WhoAmIUser)
- [XetFileInfo](interfaces/XetFileInfo)
- [XetReadToken](interfaces/XetReadToken)

## 타입 별칭

### AccessToken

Ƭ **AccessToken**: `string`

실제로는 `hf_${string}`이지만, 편의상 string 타입을 사용합니다

#### 정의 위치[[accesstoken.defined-in]]

[packages/hub/src/types/public.ts:28](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L28)

___

### AccessTokenRole

Ƭ **AccessTokenRole**: ``"admin"`` \| ``"write"`` \| ``"contributor"`` \| ``"read"``

#### 정의 위치[[accesstokenrole.defined-in]]

[packages/hub/src/types/public.ts:98](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L98)

___

### AuthType

Ƭ **AuthType**: ``"access_token"`` \| ``"app_token"`` \| ``"app_token_as_user"``

#### 정의 위치[[authtype.defined-in]]

[packages/hub/src/types/public.ts:100](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L100)

___

### CommitOperation

Ƭ **CommitOperation**: [`CommitDeletedEntry`](interfaces/CommitDeletedEntry) \| [`CommitFile`](interfaces/CommitFile) \| [`CommitEditFile`](interfaces/CommitEditFile) \| [`CommitCopyFile`](interfaces/CommitCopyFile)

#### 정의 위치[[commitoperation.defined-in]]

[packages/hub/src/lib/commit.ts:123](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/commit.ts#L123)

___

### CommitParams

Ƭ **CommitParams**: \{ `abortSignal?`: `AbortSignal` ; `branch?`: `string` ; `description?`: `string` ; `fetch?`: typeof [`__type`](classes/_internal_XetBlob#__type) ; `hubUrl?`: `string` ; `isPullRequest?`: `boolean` ; `maxFolderDepth?`: `number` ; `operations`: [`CommitOperation`](modules#commitoperation)[] ; `parentCommit?`: `string` ; `rangeEditCache?`: [`RangeEditCache`](modules#rangeeditcache) ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `title`: `string` ; `useWebWorkers?`: `boolean` \| \{ `minSize?`: `number` ; `poolSize?`: `number`  } ; `useXet?`: `boolean`  } & `Partial`\<`CredentialsParams`\>

#### 정의 위치[[commitparams.defined-in]]

[packages/hub/src/lib/commit.ts:130](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/commit.ts#L130)

___

### CommitProgressEvent

Ƭ **CommitProgressEvent**: \{ `event`: ``"phase"`` ; `phase`: ``"preuploading"`` \| ``"uploadingLargeFiles"`` \| ``"committing"``  } \| \{ `event`: ``"fileProgress"`` ; `path`: `string` ; `progress`: `number` ; `state`: ``"hashing"`` \| ``"uploading"`` \| ``"error"``  }

#### 정의 위치[[commitprogressevent.defined-in]]

[packages/hub/src/lib/commit.ts:200](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/commit.ts#L200)

___

### ContentSource

Ƭ **ContentSource**: `Blob` \| `URL`

#### 정의 위치[[contentsource.defined-in]]

[packages/hub/src/lib/commit.ts:44](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/commit.ts#L44)

___

### Dtype

Ƭ **데이터 유형**: ``"F64"`` \| ``"F32"`` \| ``"C64"`` \| ``"F16"`` \| ``"F8_E4M3"`` \| ``"F8_E4M3FNUZ"`` \| ``"F8_E5M2"`` \| ``"F8_E5M2FNUZ"`` \| ``"F8_E8M0"`` \| ``"E8M0"`` \| ``"F6_E3M2"`` \| ``"F6_E2M3"`` \| ``"F4"`` \| ``"FP4"`` \| ``"BF16"`` \| ``"I64"`` \| ``"U64"`` \| ``"I32"`` \| ``"U32"`` \| ``"I16"`` \| ``"I8"`` \| ``"U16"`` \| ``"U8"`` \| ``"UE8"`` \| ``"BOOL"``

#### 정의 위치[[dtype.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:291](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L291)

___

### JsonStreamEvent

Ƭ **JsonStreamEvent**: \{ `type`: ``"startObject"``  } \| \{ `type`: ``"endObject"``  } \| \{ `type`: ``"startArray"``  } \| \{ `type`: ``"endArray"``  } \| \{ `key`: `string` ; `type`: ``"key"``  } \| \{ `type`: ``"value"`` ; `value`: `string` \| `number` \| `boolean` \| ``null``  }

최소 구성, 의존성 없음, 증분(SAX 스타일) JSON 파서.

`JSON.parse`는 전체 문서를 메모리에 두 번(소스 문자열 + 결과 객체 트리) 로드해야 하므로, 문서 자체는 크지만 *관심 있는* 내용은 매우 작은 경우 사용할 수 없습니다. 예를 들어, 큰 MoE의 `model.safetensors.index.json`에서는 60 MB의 `weight_map`이 약 100개의 고유 샤드 파일명만 알려주기 위해 존재합니다.

이 파서는 바이트가 도착할 때마다 평탄한 이벤트 스트림을 출력하므로, 소비자는 관심 있는 항목만 유지하고 나머지는 가비지 컬렉션에 맡길 수 있습니다. 메모리 사용량은 문서의 크기가 아니라 가장 큰 개별 토큰(문자열 / 숫자)의 크기로 제한됩니다.

구현은 재개 가능한 상태 머신입니다: 어떤 토큰이든 청크 경계에 걸쳐 나뉠 수 있으며(멀티바이트 UTF-8 시퀀스와 `\uXXXX` 이스케이프 포함).

Strictness: 허용되는 문법은 RFC 8259(`JSON.parse`와 동일)이며, 여기서 이점이 적으면서 비용이 많이 드는 몇 가지 검사, 특히 숫자 *shapes*가 상태 머신 대신 `Number()`로 검증되므로 `JSON.parse`가 거부하는 소수의 입력이 허용됩니다. `JSON.parse`가 허용하는 모든 것은 동일한 값으로 허용됩니다.

**`Example`**

```ts
for await (const event of streamJson(blob.stream())) {
  if (event.type === "key") { ... }
}
```

#### 정의 위치[[jsonstreamevent.defined-in]]

[packages/hub/src/utils/streamJson.ts:27](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/utils/streamJson.ts#L27)

___

### ModelAdditionalField

Ƭ **ModelAdditionalField**: `Exclude`\ \| keyof [`ModelDerivedFields`](interfaces/ModelDerivedFields)

#### 정의 위치[[modeladditionalfield.defined-in]]

[packages/hub/src/lib/list-models.ts:50](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-models.ts#L50)

___

### PipelineType

Ƭ **PipelineType**: typeof `PIPELINE_DATA`의 keyof

#### 정의 위치[[pipelinetype.defined-in]]

packages/tasks/dist/commonjs/pipelines.d.ts:380

___

### RangeEditCache

Ƭ **RangeEditCache**: `Map`\<`string`, [`RangeEditCacheEntry`](interfaces/RangeEditCacheEntry)\>

이전 범위 편집 경로를 통해 작성된 파일의 메모리 내 상태이며, xet 해시로 키가 지정됩니다. 이후 추가(또는 파일의 마지막 term 편집) 시 재구성 및 file-chunk-hashes API 호출을 완전히 생략할 수 있도록 합니다. 부분 메르클 상태와 검증 해시가 이미 알려져 있기 때문입니다.

같은 파일에 추가하는 연속된 `commit` 호출에 동일한 [RangeEditCache](modules#rangeeditcache) 인스턴스를 전달하여, 모든 추가 작업마다 CAS 메타데이터 API를 호출하지 않도록 하세요.

#### 정의 위치[[rangeeditcache.defined-in]]

[packages/hub/src/utils/rangeEdit.ts:16](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/utils/rangeEdit.ts#L16)

___

### RepoDesignation

Ƭ **RepoDesignation**: [`RepoId`](interfaces/RepoId) \| [`RepoFullName`](modules#repofullname)

#### 정의 위치[[repodesignation.defined-in]]

[packages/hub/src/types/public.ts:17](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L17)

___

### RepoFullName

Ƭ **RepoFullName**: `string` \| \`spaces/$\{string}\` \| \`datasets/$\{string}\` \| \`buckets/$\{string}\` \| \`kernels/$\{string}\`

#### 정의 위치[[repofullname.defined-in]]

[packages/hub/src/types/public.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L10)

___

### RepoType

Ƭ **RepoType**: ``"space"`` \| ``"dataset"`` \| ``"model"`` \| ``"bucket"`` \| ``"kernel"``

#### 정의 위치[[repotype.defined-in]]

[packages/hub/src/types/public.ts:3](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L3)

___

### ResolveModelAdditionalFields

Ƭ **ResolveModelAdditionalFields**\<`T`\>: `Pick`\<`ApiModelInfo`, `T` & keyof `ApiModelInfo`\> & `Pick`\<[`ModelDerivedFields`](interfaces/ModelDerivedFields), `T` & keyof [`ModelDerivedFields`](interfaces/ModelDerivedFields)\>

#### 형식 매개변수[[resolvemodeladditionalfields.type-parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `T` | extends [`ModelAdditionalField`](modules#modeladditionalfield) |

#### 정의 위치[[resolvemodeladditionalfields.defined-in]]

[packages/hub/src/lib/list-models.ts:54](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-models.ts#L54)

___

### SafetensorsFileHeader

Ƭ **SafetensorsFileHeader**: `Record`\<[`TensorName`](modules#tensorname), [`TensorInfo`](interfaces/TensorInfo)\> & \{ `__metadata__?`: \{ `total_parameters?`: `string` \| `number`  } & `Record`\<`string`, `string`\>  }

#### 정의 위치[[safetensorsfileheader.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:324](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L324)

___

### SafetensorsParseFromRepo

Ƭ **SafetensorsParseFromRepo**: \{ `filepaths`: `string`[] ; `header`: [`SafetensorsFileHeader`](modules#safetensorsfileheader) ; `parameterCount?`: `Partial`\<`Record`\<[`Dtype`](modules#dtype), `number`\>\> ; `parameterTotal?`: `number` ; `sharded`: ``false``  } \| \{ `filepaths`: `string`[] ; `headers`: [`SafetensorsShardedHeaders`](modules#safetensorsshardedheaders) ; `index`: [`SafetensorsIndexJson`](interfaces/SafetensorsIndexJson) ; `parameterCount?`: `Partial`\<`Record`\<[`Dtype`](modules#dtype), `number`\>\> ; `parameterTotal?`: `number` ; `sharded`: ``true``  }

#### 정의 위치[[safetensorsparsefromrepo.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:348](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L348)

___

### SafetensorsShardedHeaders

Ƭ **SafetensorsShardedHeaders**: `Record`\<`FileName`, [`SafetensorsFileHeader`](modules#safetensorsfileheader)\>

#### 정의 위치[[safetensorsshardedheaders.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:346](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L346)

___

### SpaceHardwareFlavor

Ƭ **SpaceHardwareFlavor**: ``"cpu-basic"`` \| ``"cpu-upgrade"`` \| ``"cpu-performance"`` \| ``"cpu-xl"`` \| ``"sprx8"`` \| ``"zero-a10g"`` \| ``"inf2x6"`` \| ``"t4-small"`` \| ``"t4-medium"`` \| ``"l4x1"`` \| ``"l4x4"`` \| ``"l40sx1"`` \| ``"l40sx4"`` \| ``"l40sx8"`` \| ``"a10g-small"`` \| ``"a10g-large"`` \| ``"a10g-largex2"`` \| ``"a10g-largex4"`` \| ``"a100-large"`` \| ``"a100x4"`` \| ``"a100x8"`` \| ``"h200"`` \| ``"h200x2"`` \| ``"h200x4"`` \| ``"h200x8"`` \| ``"rtx-pro-6000"`` \| ``"rtx-pro-6000x2"`` \| ``"rtx-pro-6000x4"`` \| ``"rtx-pro-6000x8"``

#### 정의 위치[[spacehardwareflavor.defined-in]]

[packages/hub/src/types/public.ts:53](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L53)

___

### SpaceSdk

Ƭ **SpaceSdk**: ``"streamlit"`` \| ``"gradio"`` \| ``"docker"`` \| ``"static"``

#### 정의 위치[[spacesdk.defined-in]]

[packages/hub/src/types/public.ts:84](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L84)

___

### SpaceStage

Ƭ **SpaceStage**: ``"NO_APP_FILE"`` \| ``"CONFIG_ERROR"`` \| ``"BUILDING"`` \| ``"BUILD_ERROR"`` \| ``"RUNNING"`` \| ``"RUNNING_BUILDING"`` \| ``"RUNTIME_ERROR"`` \| ``"DELETING"`` \| ``"PAUSED"`` \| ``"SLEEPING"``

#### 정의 위치[[spacestage.defined-in]]

[packages/hub/src/types/public.ts:86](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/types/public.ts#L86)

___

### TensorName

Ƭ **TensorName**: `string`

#### 정의 위치[[tensorname.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:290](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L290)

___

### WhoAmI

Ƭ **WhoAmI**: [`WhoAmIApp`](interfaces/WhoAmIApp) \| [`WhoAmIOrg`](interfaces/WhoAmIOrg) \| [`WhoAmIUser`](interfaces/WhoAmIUser)

#### 정의 위치[[whoami.defined-in]]

[packages/hub/src/lib/who-am-i.ts:51](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/who-am-i.ts#L51)

## 변수

### DATASET\_EXPANDABLE\_KEYS

• `Const` **DATASET\_EXPANDABLE\_KEYS**: 읽기 전용 [``"author"``, ``"cardData"``, ``"citation"``, ``"createdAt"``, ``"disabled"``, ``"description"``, ``"downloads"``, ``"downloadsAllTime"``, ``"gated"``, ``"gitalyUid"``, ``"lastModified"``, ``"likes"``, ``"paperswithcode_id"``, ``"private"``, ``"sha"``, ``"tags"``]

#### 정의 위치[[datasetexpandablekeys.defined-in]]

[packages/hub/src/lib/list-datasets.ts:17](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-datasets.ts#L17)

___

### DATASET\_EXPAND\_KEYS

• `Const` **DATASET\_EXPAND\_KEYS**: 읽기 전용 [``"private"``, ``"downloads"``, ``"gated"``, ``"likes"``, ``"lastModified"``]

#### 정의 위치[[datasetexpandkeys.defined-in]]

[packages/hub/src/lib/list-datasets.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-datasets.ts#L9)

___

### DEFAULT\_REVISION

• `Const` **DEFAULT\_REVISION**: ``"main"``

#### 정의 위치[[defaultrevision.defined-in]]

[packages/hub/src/lib/snapshot-download.ts:13](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/snapshot-download.ts#L13)

___

### DIFFUSERS\_SAFETENSORS\_FILE

• `Const` **DIFFUSERS\_SAFETENSORS\_FILE**: ``"diffusion_pytorch_model.safetensors"``

#### 정의 위치[[diffuserssafetensorsfile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:21](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L21)

___

### DIFFUSERS\_SAFETENSORS\_INDEX\_FILE

• `Const` **DIFFUSERS\_SAFETENSORS\_INDEX\_FILE**: ``"diffusion_pytorch_model.safetensors.index.json"``

#### 정의 위치[[diffuserssafetensorsindexfile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:22](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L22)

___

### DIFFUSERS\_WEIGHTS\_SUBFOLDERS

• `Const` **DIFFUSERS\_WEIGHTS\_SUBFOLDERS**: 읽기 전용 [``"transformer"``, ``"unet"``]

#### 정의 위치[[diffusersweightssubfolders.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:23](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L23)

___

### HUB\_URL

• `Const` **HUB\_URL**: ``"https://huggingface.co"``

Hugging Face Hub의 기본 URL입니다.

#### 정의 위치[[huburl.defined-in]]

[packages/hub/src/consts.ts:4](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/consts.ts#L4)

___

### MODEL\_DERIVED\_FIELD\_TO\_API\_KEY

• `Const` **MODEL\_DERIVED\_FIELD\_TO\_API\_KEY**: `Record`\

#### 정의 위치[[modelderivedfieldtoapikey.defined-in]]

[packages/hub/src/lib/list-models.ts:46](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-models.ts#L46)

___

### MODEL\_EXPANDABLE\_KEYS

• `Const` **MODEL\_EXPANDABLE\_KEYS**: 읽기 전용 [``"author"``, ``"cardData"``, ``"config"``, ``"createdAt"``, ``"disabled"``, ``"downloads"``, ``"downloadsAllTime"``, ``"gated"``, ``"gitalyUid"``, ``"inferenceProviderMapping"``, ``"lastModified"``, ``"library_name"``, ``"likes"``, ``"model-index"``, ``"pipeline_tag"``, ``"private"``, ``"safetensors"``, ``"sha"``, ``"spaces"``, ``"tags"``, ``"transformersInfo"``]

#### 정의 위치[[modelexpandablekeys.defined-in]]

[packages/hub/src/lib/list-models.ts:18](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-models.ts#L18)

___

### MODEL\_EXPAND\_KEYS

• `Const` **MODEL\_EXPAND\_KEYS**: 읽기 전용 [``"pipeline_tag"``, ``"private"``, ``"gated"``, ``"downloads"``, ``"likes"``, ``"lastModified"``]

#### 정의 위치[[modelexpandkeys.defined-in]]

[packages/hub/src/lib/list-models.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-models.ts#L9)

___

### REGEX\_COMMIT\_HASH

• `Const` **REGEX\_COMMIT\_HASH**: `RegExp`

#### 정의 위치[[regexcommithash.defined-in]]

[packages/hub/src/lib/download-file-to-cache-dir.ts:16](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/download-file-to-cache-dir.ts#L16)

___

### REPO\_ID\_SEPARATOR

• `Const` **REPO\_ID\_SEPARATOR**: `string` = `"--"`

#### 정의 위치[[repoidseparator.defined-in]]

[packages/hub/src/lib/cache-management.ts:25](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L25)

___

### RE\_SAFETENSORS\_FILE

• `Const` **RE\_SAFETENSORS\_FILE**: `RegExp`

#### 정의 위치[[resafetensorsfile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:26](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L26)

___

### RE\_SAFETENSORS\_INDEX\_FILE

• `Const` **RE\_SAFETENSORS\_INDEX\_FILE**: `RegExp`

#### 정의 위치[[resafetensorsindexfile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:27](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L27)

___

### RE\_SAFETENSORS\_SHARD\_FILE

• `Const` **RE\_SAFETENSORS\_SHARD\_FILE**: `RegExp`

#### 정의 위치[[resafetensorsshardfile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:28](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L28)

___

### SAFETENSORS\_파일

• `Const` **SAFETENSORS\_FILE**: ``"model.safetensors"``

#### 정의 위치[[safetensorsfile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:17](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L17)

___

### SAFETENSORS\_INDEX\_FILE

• `Const` **SAFETENSORS\_INDEX\_FILE**: ``"model.safetensors.index.json"``

#### 정의 위치[[safetensorsindexfile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:18](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L18)

___

### SPACE\_EXPANDABLE\_KEYS

• `Const` **SPACE\_EXPANDABLE\_KEYS**: 읽기 전용 [``"author"``, ``"cardData"``, ``"datasets"``, ``"disabled"``, ``"gitalyUid"``, ``"lastModified"``, ``"createdAt"``, ``"likes"``, ``"private"``, ``"runtime"``, ``"sdk"``, ``"sha"``, ``"subdomain"``, ``"tags"``, ``"models"``]

#### 정의 위치[[spaceexpandablekeys.defined-in]]

[packages/hub/src/lib/list-spaces.ts:15](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-spaces.ts#L15)

___

### SPACE\_EXPAND\_KEYS

• `Const` **SPACE\_EXPAND\_KEYS**: 읽기 전용 [``"sdk"``, ``"likes"``, ``"private"``, ``"lastModified"``]

#### 정의 위치[[spaceexpandkeys.defined-in]]

[packages/hub/src/lib/list-spaces.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-spaces.ts#L9)

## 함수

### \_\_internal\_sha256

▸ **__internal_sha256**(`buffer`, `opts?`): `AsyncGenerator`\<`number`, `string`\>

#### 매개변수[[internalsha256.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `buffer` | `Blob` |
| `opts?` | `Object` |
| `opts.abortSignal?` | `AbortSignal` |
| `opts.useWebWorker?` | `boolean` \| \{ `minSize?`: `number` ; `poolSize?`: `number`  } |

#### 반환[[internalsha256.returns]]

`AsyncGenerator`\<`number`, `string`\>

hex 인코딩된 sha

**`Yields`**

progress (0-1)

#### 정의 위치[[internalsha256.defined-in]]

[packages/hub/src/utils/sha256.ts:72](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/utils/sha256.ts#L72)

___

### assertSafeShardFilename

▸ **assertSafeShardFilename**(`filename`): `void`

`weight_map` 파일 이름은 저장소 파일에서 가져오므로 공격자가 제어할 수 있습니다. 따라서 인덱스 자체의 디렉터리 내부에 있는 상대 경로로 유지되어야 합니다.

문자 그대로 `includes("..")` 검사만으로는 충분하지 않습니다. 파일명이 포함된 URL은 검사 *이후*에 WHATWG URL 파서에서 파싱되며, 해당 파서는 도트 세그먼트를 퍼센트 디코딩하기 때문입니다. `%2e%2e`(또는 `.%2e`, `%2E%2E`, …)는 이 파서에게 `..` 세그먼트로 인식되므로 저장소를 벗어날 수 있으며, 자격 증명이 첨부된 경우 다른 저장소의 `resolve` URL에 인증된 상태로 요청이 도달하게 됩니다.

`%252e%252e`와 같은 문제를 포착하기 위해) 검증 전에 반복적으로 디코딩하고, 단순한 상대 경로가 아닌 모든 것을 거부합니다.

#### 매개변수[[assertsafeshardfilename.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `filename` | `string` |

#### 반환[[assertsafeshardfilename.returns]]

`void`

#### 정의 위치[[assertsafeshardfilename.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:511](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L511)

___

### cancelJob

▸ **cancelJob**(`params`): `Promise`\<`ApiJob`\>

작업을 취소합니다.

#### 매개변수[[canceljob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[canceljob.returns]]

`Promise`\<`ApiJob`\>

#### 정의 위치[[canceljob.defined-in]]

[packages/hub/src/lib/jobs/cancel-job.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/cancel-job.ts#L10)

___

### checkRepoAccess

▸ **checkRepoAccess**(`params`): `Promise`\<`void`\>

리포지토리에 대한 읽기 접근 권한이 있는지 확인합니다.

액세스 권한이 없는 경우 [HubApiError](classes/HubApiError) 오류를 발생시킵니다. HubApiError.statusCode는 401, 403 또는 404입니다.

#### 매개변수[[checkrepoaccess.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation)  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[checkrepoaccess.returns]]

`Promise`\<`void`\>

#### 정의 위치[[checkrepoaccess.defined-in]]

[packages/hub/src/lib/check-repo-access.ts:13](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/check-repo-access.ts#L13)

___

### commit

▸ **commit**(`params`): `Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 매개변수[[commit.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | [`CommitParams`](modules#commitparams) |

#### 반환[[commit.returns]]

`Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

버킷 업로드의 경우 undefined, 그 외에는 CommitOutput

#### 정의 위치[[commit.defined-in]]

[packages/hub/src/lib/commit.ts:1031](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/commit.ts#L1031)

___

### commitIter

▸ **commitIter**(`params`): `AsyncGenerator`\<[`CommitProgressEvent`](modules#commitprogressevent), [`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

현재 commit에서 사용되는 내부 함수입니다.

나중에 노출하여 세부 조정된 진행 정보를 제공할 수 있습니다

CommitOutput은 버킷 커밋에 존재하지 않습니다

#### 매개변수[[commititer.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | [`CommitParams`](modules#commitparams) |

#### 반환[[commititer.returns]]

`AsyncGenerator`\<[`CommitProgressEvent`](modules#commitprogressevent), [`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 정의 위치[[commititer.defined-in]]

[packages/hub/src/lib/commit.ts:219](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/commit.ts#L219)

___

### commitIterBucket

▸ **commitIterBucket**(`params`): `AsyncGenerator`\<[`CommitProgressEvent`](modules#commitprogressevent)\>

#### 매개변수[[commititerbucket.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | [`CommitParams`](modules#commitparams) |

#### 반환[[commititerbucket.returns]]

`AsyncGenerator`\<[`CommitProgressEvent`](modules#commitprogressevent)\>

#### 정의 위치[[commititerbucket.defined-in]]

[packages/hub/src/lib/commit.ts:775](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/commit.ts#L775)

___

### computeNumOfParamsByDtypeSingleFile

▸ **computeNumOfParamsByDtypeSingleFile**(`header`, `quantConfig?`, `expertDtype?`): `Partial`\<`Record`\<[`Dtype`](modules#dtype), `number`\>\>

dtype별 매개변수를 파일 헤더 하나에 대해 합산하며, 양자화 패킹 계수를 적용하고 bookkeeping 텐서를 건너뜁니다.

#### 매개변수[[computenumofparamsbydtypesinglefile.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `header` | [`SafetensorsFileHeader`](modules#safetensorsfileheader) |
| `quantConfig?` | [`QuantizationConfig`](interfaces/QuantizationConfig) |
| `expertDtype?` | `string` |

#### 반환[[computenumofparamsbydtypesinglefile.returns]]

`Partial`\<`Record`\<[`Dtype`](modules#dtype), `number`\>\>

#### 정의 위치[[computenumofparamsbydtypesinglefile.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:1379](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L1379)

___

### copyFile

▸ **copyFile**(`params`): `Promise`\<`undefined`\>

소스 저장소/버킷에서 대상 버킷으로 단일 파일을 복사합니다.

소스 파일이 xet 기반인 경우 복사는 서버 측에서 수행되며(데이터 전송 없음), 작은 크기의 비-xet 저장소 파일(예: `config.json`)의 경우 해당 파일이 다운로드된 후 같은 커밋 내에서 대상 버킷에 다시 업로드됩니다.

xet으로 마이그레이션되지 않은 LFS 포인터 파일은 사전에 거부됩니다(그렇지 않으면 전체 LFS 블롭을 다운로드해야 합니다).

#### 매개변수[[copyfile.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `destination`: [`CopyDestination`](interfaces/CopyDestination) ; `source`: [`CopySource`](interfaces/CopySource)  } & `SharedParams` |

#### 반환[[copyfile.returns]]

`Promise`\<`undefined`\>

**`Example`**

```ts
await copyFile({
  source: {
    repo: { type: "model", name: "username/my-model" },
    path: "model.safetensors",
  },
  destination: {
    repo: { type: "bucket", name: "username/my-bucket" },
    path: "models/my-model/model.safetensors",
  },
  accessToken: "hf_...",
});
```

#### 정의 위치[[copyfile.defined-in]]

[packages/hub/src/lib/copy-files.ts:111](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/copy-files.ts#L111)

___

### copyFileIter

▸ **copyFileIter**(`params`): `AsyncGenerator`\<[`CopyProgressEvent`](interfaces/CopyProgressEvent), `undefined`\>

비 xet 소스 파일을 다운로드하는 동안 [CopyProgressEvent](interfaces/CopyProgressEvent)를 yield하는 [copyFile](modules#copyfile)의 async-iterator 변형입니다 (xet 기반 파일은 서버 측에서 복사되며 이벤트를 발생시키지 않습니다). 의미론은 [copyFile](modules#copyfile)을 참조하세요.

#### 매개변수[[copyfileiter.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `destination`: [`CopyDestination`](interfaces/CopyDestination) ; `source`: [`CopySource`](interfaces/CopySource)  } & `SharedParams` |

#### 반환[[copyfileiter.returns]]

`AsyncGenerator`\<[`CopyProgressEvent`](interfaces/CopyProgressEvent), `undefined`\>

**`Example`**

```ts
for await (const event of copyFileIter({ source, destination, accessToken })) {
  console.log(`downloaded ${event.path} (${event.downloaded}/${event.total})`);
}
```

#### 정의 위치[[copyfileiter.defined-in]]

[packages/hub/src/lib/copy-files.ts:144](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/copy-files.ts#L144)

___

### copyFiles

▸ **copyFiles**(`params`): `Promise`\<`undefined`\>

여러 파일(서로 다른 소스 저장소/버킷에서 가져온 경우 포함)을 단일 커밋으로 대상 버킷에 복사합니다.

xet 기반 소스 파일의 경우, 데이터 전송 없이 서버 측에서 복사가 수행됩니다. xet 기반이 아닌 소스 파일(일반적으로 작은 크기의 git 저장소 파일)의 경우, 해당 파일이 다운로드된 후 같은 커밋의 일부로 다시 업로드됩니다.

xet으로 마이그레이션되지 않은 LFS 포인터 파일은 사전에 거부됩니다.

#### 매개변수[[copyfiles.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `destination`: `BucketDesignation` ; `files`: [`CopyFilesEntry`](interfaces/CopyFilesEntry)[]  } & `SharedParams` |

#### 반환[[copyfiles.returns]]

`Promise`\<`undefined`\>

**`Example`**

```ts
await copyFiles({
  destination: { type: "bucket", name: "username/my-bucket" },
  files: [
    {
      source: {
        repo: { type: "bucket", name: "username/other-bucket" },
        path: "data.bin",
      },
      destinationPath: "data.bin",
    },
    {
      source: {
        repo: { type: "model", name: "username/my-model" },
        path: "model.safetensors",
      },
      destinationPath: "models/my-model/model.safetensors",
    },
  ],
  accessToken: "hf_...",
});
```

#### 정의 위치[[copyfiles.defined-in]]

[packages/hub/src/lib/copy-files.ts:199](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/copy-files.ts#L199)

___

### copyFilesIter

▸ **copyFilesIter**(`params`): `AsyncGenerator`\<[`CopyProgressEvent`](interfaces/CopyProgressEvent), `undefined`\>

비 xet 소스 파일을 다운로드하는 동안 [CopyProgressEvent](interfaces/CopyProgressEvent)를 yield하는 [copyFiles](modules#copyfiles)의 async-iterator 변형입니다 (xet 기반 파일은 서버 측에서 복사되며 이벤트를 발생시키지 않습니다). 의미론은 [copyFiles](modules#copyfiles)를 참조하세요.

#### 매개변수[[copyfilesiter.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `destination`: `BucketDesignation` ; `files`: [`CopyFilesEntry`](interfaces/CopyFilesEntry)[]  } & `SharedParams` |

#### 반환[[copyfilesiter.returns]]

`AsyncGenerator`\<[`CopyProgressEvent`](interfaces/CopyProgressEvent), `undefined`\>

#### 정의 위치[[copyfilesiter.defined-in]]

[packages/hub/src/lib/copy-files.ts:219](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/copy-files.ts#L219)

___

### copyFolder

▸ **copyFolder**(`params`): `Promise`\<`undefined`\>

소스 리포지토리/버킷에서 대상 버킷으로 폴더를 단일 커밋으로 재귀적으로 복사합니다.

파일별 경로는 [CopySource.path](interfaces/CopySource#path)를 기준으로 해석됩니다. [CopyDestination.path](interfaces/CopyDestination#path)가 소스 폴더를 유지하지 않는 한, 소스 폴더 자체는 대상에 보존되지 않습니다.

#### 매개변수[[copyfolder.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `destination`: `Omit`\<[`CopyDestination`](interfaces/CopyDestination), ``"path"``\> & \{ `path?`: `string`  } ; `source`: `Omit`\<[`CopySource`](interfaces/CopySource), ``"path"``\> & \{ `path?`: `string`  }  } & `SharedParams` |

#### 반환[[copyfolder.returns]]

`Promise`\<`undefined`\>

**`Example`**

```ts
// Copy an entire dataset under "datasets/my-dataset/" in the bucket
await copyFolder({
  source: { repo: { type: "dataset", name: "username/my-dataset" } },
  destination: {
    repo: { type: "bucket", name: "username/my-bucket" },
    path: "datasets/my-dataset/",
  },
  accessToken: "hf_...",
});

// Copy a subfolder
await copyFolder({
  source: {
    repo: { type: "bucket", name: "username/src-bucket" },
    path: "models/",
  },
  destination: {
    repo: { type: "bucket", name: "username/dst-bucket" },
    path: "backup/",
  },
  accessToken: "hf_...",
});
```

#### 정의 위치[[copyfolder.defined-in]]

[packages/hub/src/lib/copy-files.ts:277](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/copy-files.ts#L277)

___

### copyFolderIter

▸ **copyFolderIter**(`params`): `AsyncGenerator`\<[`CopyProgressEvent`](interfaces/CopyProgressEvent), `undefined`\>

비 xet 소스 파일을 다운로드하는 동안 [CopyProgressEvent](interfaces/CopyProgressEvent)를 yield하는 [copyFolder](modules#copyfolder)의 async-iterator 변형입니다 (xet 기반 파일은 서버 측에서 복사되며 이벤트를 발생시키지 않습니다). 의미론은 [copyFolder](modules#copyfolder)를 참조하세요.

#### 매개변수[[copyfolderiter.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `destination`: `Omit`\<[`CopyDestination`](interfaces/CopyDestination), ``"path"``\> & \{ `path?`: `string`  } ; `source`: `Omit`\<[`CopySource`](interfaces/CopySource), ``"path"``\> & \{ `path?`: `string`  }  } & `SharedParams` |

#### 반환[[copyfolderiter.returns]]

`AsyncGenerator`\<[`CopyProgressEvent`](interfaces/CopyProgressEvent), `undefined`\>

#### 정의 위치[[copyfolderiter.defined-in]]

[packages/hub/src/lib/copy-files.ts:297](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/copy-files.ts#L297)

___

### countCommits

▸ **countCommits**(`params`): `Promise`\<`number`\>

#### 매개변수[[countcommits.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[countcommits.returns]]

`Promise`\<`number`\>

#### 정의 위치[[countcommits.defined-in]]

[packages/hub/src/lib/count-commits.ts:7](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/count-commits.ts#L7)

___

### createBranch

▸ **createBranch**(`params`): `Promise`\<`void`\>

#### 매개변수[[createbranch.parameters]]

| 이름 | 유형 | 설명 |
| :------ | :------ | :------ |
| `params` | `Object` | - |
| `params.accessToken?` | `string` | - |
| `params.branch` | `string` | 생성할 브랜치의 이름 |
| `params.empty?` | `boolean` | … |
| `params.fetch?` | (`input`: `URL` \| `RequestInfo`, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> | [MDN 참고 자료](https://developer.mozilla.org/docs/Web/API/Window/fetch) |
| `params.hubUrl?` | `string` | - |
| `params.overwrite?` | `boolean` | 이 옵션은 이미 존재하는 브랜치를 덮어쓸 때 사용합니다. `overwrite`만 지정하고 `revision`/`empty`를 지정하지 않은 상태에서 해당 브랜치가 이미 존재하면 아무 동작도 수행하지 않습니다. |
| `params.repo` | [`RepoDesignation`](modules#repodesignation) | - |
| `params.revision?` | `string` | Revision에서 브랜치를 생성할 기준입니다. 기본값은 기본 브랜치입니다. 빈 브랜치를 생성하려면 empty: true를 사용하세요. |

#### 반환[[createbranch.returns]]

`Promise`\<`void`\>

#### 정의 위치[[createbranch.defined-in]]

[packages/hub/src/lib/create-branch.ts:6](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/create-branch.ts#L6)

___

### createCollection

▸ **createCollection**(`params`): `Promise`\<\{ `slug`: `string`  }\>

#### 매개변수[[createcollection.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `collection`: `ApiCreateCollectionPayload` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[createcollection.returns]]

`Promise`\<\{ `slug`: `string`  }\>

#### 정의 위치[[createcollection.defined-in]]

[packages/hub/src/lib/create-collection.ts:7](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/create-collection.ts#L7)

___

### createRepo

▸ **createRepo**(`params`): `Promise`\<\{ `id`: `string` ; `repoUrl`: `string`  }\>

#### 매개변수[[createrepo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `files?`: \{ `content`: `ArrayBuffer` \| `Blob` ; `path`: `string`  }[] ; `hardware?`: SpaceHardwareFlavor \| undefined ; `hubUrl?`: `string` ; `license?`: `string` ; `private?`: `boolean` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `resourceGroupId?`: `string` ; `sdk?`: SpaceSdk \| undefined ; `visibility?`: ``"public"`` \| ``"private"`` \| ``"protected"``  } & `CredentialsParams` |

#### 반환[[createrepo.returns]]

`Promise`\<\{ `id`: `string` ; `repoUrl`: `string`  }\>

#### 정의 위치[[createrepo.defined-in]]

[packages/hub/src/lib/create-repo.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/create-repo.ts#L9)

___

### createScheduledJob

▸ **createScheduledJob**(`params`): `Promise`\<`ApiScheduledJob`\>

예약 작업을 생성합니다.

#### 매개변수[[createscheduledjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `namespace`: `string`  } & CreateScheduledJobOptions & CredentialsParams |

#### 반환[[createscheduledjob.returns]]

`Promise`\<`ApiScheduledJob`\>

#### 정의 위치[[createscheduledjob.defined-in]]

[packages/hub/src/lib/jobs/create-scheduled-job.ts:11](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/create-scheduled-job.ts#L11)

___

### datasetInfo

▸ **datasetInfo**\<`T`\>(`params`): `Promise`\<[`DatasetEntry`](interfaces/DatasetEntry) & `Pick`\<`ApiDatasetInfo`, `T`\>\>

#### 형식 매개변수[[datasetinfo.type-parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `T` | extends ``"author"`` \| ``"cardData"`` \| ``"disabled"`` \| ``"gitalyUid"`` \| ``"createdAt"`` \| ``"tags"`` \| ``"paperswithcode_id"`` \| ``"sha"`` \| ``"citation"`` \| ``"description"`` \| ``"downloadsAllTime"`` = `never` |

#### 매개변수[[datasetinfo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `additionalFields?`: `T`[] ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `name`: `string` ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[datasetinfo.returns]]

`Promise`\<[`DatasetEntry`](interfaces/DatasetEntry) & `Pick`\<`ApiDatasetInfo`, `T`\>\>

#### 정의 위치[[datasetinfo.defined-in]]

[packages/hub/src/lib/dataset-info.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/dataset-info.ts#L9)

___

### deleteBranch

▸ **deleteBranch**(`params`): `Promise`\<`void`\>

#### 매개변수[[deletebranch.parameters]]

| 이름 | 유형 | 설명 |
| :------ | :------ | :------ |
| `params` | `Object` | - |
| `params.accessToken?` | `string` | - |
| `params.branch` | `string` | 삭제할 브랜치의 이름 |
| `params.fetch?` | (`input`: `URL` \| `RequestInfo`, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> | [MDN 참고 자료](https://developer.mozilla.org/docs/Web/API/Window/fetch) |
| `params.hubUrl?` | `string` | - |
| `params.repo` | [`RepoDesignation`](modules#repodesignation) | - |

#### 반환[[deletebranch.returns]]

`Promise`\<`void`\>

#### 정의 위치[[deletebranch.defined-in]]

[packages/hub/src/lib/delete-branch.ts:6](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/delete-branch.ts#L6)

___

### deleteCollection

▸ **deleteCollection**(`params`): `Promise`\<`void`\>

#### 매개변수[[deletecollection.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `slug`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[deletecollection.returns]]

`Promise`\<`void`\>

#### 정의 위치[[deletecollection.defined-in]]

[packages/hub/src/lib/delete-collection.ts:6](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/delete-collection.ts#L6)

___

### deleteFile

▸ **deleteFile**(`params`): `Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 매개변수[[deletefile.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `branch?`: `string` ; `commitDescription?`: `string` ; `commitTitle?`: `string` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `isPullRequest?`: `boolean` ; `parentCommit?`: `string` ; `path`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation)  } & `CredentialsParams` |

#### 반환[[deletefile.returns]]

`Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 정의 위치[[deletefile.defined-in]]

[packages/hub/src/lib/delete-file.ts:5](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/delete-file.ts#L5)

___

### deleteFiles

▸ **deleteFiles**(`params`): `Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 매개변수[[deletefiles.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `branch?`: `string` ; `commitDescription?`: `string` ; `commitTitle?`: `string` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `isPullRequest?`: `boolean` ; `parentCommit?`: `string` ; `paths`: `string`[] ; `repo`: [`RepoDesignation`](modules#repodesignation)  } & `CredentialsParams` |

#### 반환[[deletefiles.returns]]

`Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 정의 위치[[deletefiles.defined-in]]

[packages/hub/src/lib/delete-files.ts:5](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/delete-files.ts#L5)

___

### deleteRepo

▸ **deleteRepo**(`params`): `Promise`\<`void`\>

#### 매개변수[[deleterepo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation)  } & `CredentialsParams` |

#### 반환[[deleterepo.returns]]

`Promise`\<`void`\>

#### 정의 위치[[deleterepo.defined-in]]

[packages/hub/src/lib/delete-repo.ts:7](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/delete-repo.ts#L7)

___

### deleteScheduledJob

▸ **deleteScheduledJob**(`params`): `Promise`\<`void`\>

예약된 작업을 삭제합니다.

#### 매개변수[[deletescheduledjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[deletescheduledjob.returns]]

`Promise`\<`void`\>

#### 정의 위치[[deletescheduledjob.defined-in]]

[packages/hub/src/lib/jobs/delete-scheduled-job.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/delete-scheduled-job.ts#L9)

___

### downloadFile

▸ **downloadFile**(`params`): `Promise`\<`Blob` \| ``null``\>

#### 매개변수[[downloadfile.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `downloadInfo?`: [`FileDownloadInfoOutput`](interfaces/FileDownloadInfoOutput) ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `parallelDownloads?`: `boolean` \| [`ParallelDownloadOptions`](interfaces/ParallelDownloadOptions) ; `path`: `string` ; `raw?`: `boolean` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string` ; `xet?`: `boolean` \| \{ `readToken`: [`XetReadToken`](interfaces/XetReadToken)  }  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[downloadfile.returns]]

`Promise`\<`Blob` \| ``null``\>

null

#### 정의 위치[[downloadfile.defined-in]]

[packages/hub/src/lib/download-file.ts:13](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/download-file.ts#L13)

___

### downloadFileToCacheDir

▸ **downloadFileToCacheDir**(`params`): `Promise`\<`string`\>

local cache에 이미 존재하지 않는 경우 주어진 파일을 다운로드합니다.

#### 매개변수[[downloadfiletocachedir.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `cacheDir?`: `string` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `path`: `string` ; `raw?`: `boolean` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[downloadfiletocachedir.returns]]

`Promise`\<`string`\>

blob 객체에 대한 심볼릭 링크

#### 정의 위치[[downloadfiletocachedir.defined-in]]

[packages/hub/src/lib/download-file-to-cache-dir.ts:46](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/download-file-to-cache-dir.ts#L46)

___

### duplicateJob

▸ **duplicateJob**(`params`): `Promise`\<`ApiJob`\>

…

#### 매개변수[[duplicatejob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[duplicatejob.returns]]

`Promise`\<`ApiJob`\>

#### 정의 위치[[duplicatejob.defined-in]]

[packages/hub/src/lib/jobs/duplicate-job.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/duplicate-job.ts#L10)

___

### encodeShardFilename

▸ **encodeShardFilename**(`filename`): `string`

Defense in depth: 다운로드 URL은 문자열 보간으로 생성되므로, URL-safe라고 신뢰하기보다는 (이미 검증된) 파일名的 각 경로 세그먼트를 인코딩하세요.

#### 매개변수[[encodeshardfilename.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `filename` | `string` |

#### 반환[[encodeshardfilename.returns]]

`string`

#### 정의 위치[[encodeshardfilename.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:570](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L570)

___

### fileDownloadInfo

▸ **fileDownloadInfo**(`params`): `Promise`\<[`FileDownloadInfoOutput`](interfaces/FileDownloadInfoOutput) \| ``null``\>

#### 매개변수[[filedownloadinfo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `noContentDisposition?`: `boolean` ; `path`: `string` ; `raw?`: `boolean` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[filedownloadinfo.returns]]

`Promise`\<[`FileDownloadInfoOutput`](interfaces/FileDownloadInfoOutput) \| ``null``\>

null

#### 정의 위치[[filedownloadinfo.defined-in]]

[packages/hub/src/lib/file-download-info.ts:27](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/file-download-info.ts#L27)

___

### fileExists

▸ **fileExists**(`params`): `Promise`\<`boolean`\>

#### 매개변수[[fileexists.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `path`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[fileexists.returns]]

`Promise`\<`boolean`\>

#### 정의 위치[[fileexists.defined-in]]

[packages/hub/src/lib/file-exists.ts:7](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/file-exists.ts#L7)

___

### getBlobStat

▸ **getBlobStat**(`blobPath`, `blobStats`): `Promise`\<`Stats`\>

#### 매개변수[[getblobstat.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `blobPath` | `string` |
| `blobStats` | `Map`\<`string`, `Stats`\> |

#### 반환[[getblobstat.returns]]

`Promise`\<`Stats`\>

#### 정의 위치[[getblobstat.defined-in]]

[packages/hub/src/lib/cache-management.ts:254](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L254)

___

### getHFHubCachePath

▸ **getHFHubCachePath**(): `string`

#### 반환[[gethfhubcachepath.returns]]

`string`

#### 정의 위치[[gethfhubcachepath.defined-in]]

[packages/hub/src/lib/cache-management.ts:19](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L19)

___

### getJob

▸ **getJob**(`params`): `Promise`\<`ApiJob`\>

ID로 특정 작업을 가져옵니다.

#### 매개변수[[getjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[getjob.returns]]

`Promise`\<`ApiJob`\>

#### 정의 위치[[getjob.defined-in]]

[packages/hub/src/lib/jobs/get-job.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/get-job.ts#L10)

___

### getQuantizationMultiplier

▸ **getQuantizationMultiplier**(`tensorName`, `dtype`, `quantConfig?`, `expertDtype?`, `mlxQuantizedModules?`): `number`

양자화 방법에 따라 양자화 텐서의 매개변수 배수를 가져옵니다.

소수일 수 있습니다 — `packingFactor`를 참조하세요.

#### 매개변수[[getquantizationmultiplier.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `tensorName` | `string` |
| `dtype` | [`Dtype`](modules#dtype) |
| `quantConfig?` | [`QuantizationConfig`](interfaces/QuantizationConfig) |
| `expertDtype?` | `string` |
| `mlxQuantizedModules?` | `ReadonlySet`\<`string`\> |

#### 반환[[getquantizationmultiplier.returns]]

`number`

#### 정의 위치[[getquantizationmultiplier.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:1259](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L1259)

___

### getRepoFolderName

▸ **getRepoFolderName**(`«destructured»`): `string`

#### 매개변수[[getrepofoldername.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `«destructured»` | [`RepoId`](interfaces/RepoId) |

#### 반환[[getrepofoldername.returns]]

`string`

#### 정의 위치[[getrepofoldername.defined-in]]

[packages/hub/src/lib/cache-management.ts:27](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L27)

___

### getScheduledJob

▸ **getScheduledJob**(`params`): `Promise`\<`ApiScheduledJob`\>

ID로 특정 예약 작업을 가져옵니다.

#### 매개변수[[getscheduledjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[getscheduledjob.returns]]

`Promise`\<`ApiScheduledJob`\>

#### 정의 위치[[getscheduledjob.defined-in]]

[packages/hub/src/lib/jobs/get-scheduled-job.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/get-scheduled-job.ts#L10)

___

### globMatch

▸ **globMatch**(`pattern`, `str`): `boolean`

`*` 기준으로 패턴을 분할하여 `str` 내에 각 리터럴 세그먼트가 순서대로 나타나는지 확인하는 RegExp 없이 수행되는 Glob 매칭입니다. RegExp를 완전히 사용하지 않으므로 ReDoS 위험이 없으며, config.json의 공격자 제어 패턴으로 인한 SyntaxError도 방지됩니다.

#### 매개변수[[globmatch.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `pattern` | `string` |
| `str` | `string` |

#### 반환[[globmatch.returns]]

`boolean`

#### 정의 위치[[globmatch.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:1153](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L1153)

___

### isQuantizedTensor

▸ **isQuantizedTensor**(`tensorName`, `quantConfig?`, `mlxQuantizedModules?`): `boolean`

양자화 구성과 텐서 이름을 기반으로 텐서가 양자화되었는지 여부를 결정합니다.

Python의 transformers는 `modules_to_not_convert`에 대해 단순 부분 문자열 매칭을 사용하므로, `"lm_head"`와 같은 이름만으로는 `"model.lm_head.weight"`와 매칭되지 않습니다. 패턴에 `*`가 포함된 경우 유연성을 위해 적절한 glob 매칭으로 전환합니다.

#### 매개변수[[isquantizedtensor.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `tensorName` | `string` |
| `quantConfig?` | [`QuantizationConfig`](interfaces/QuantizationConfig) |
| `mlxQuantizedModules?` | `ReadonlySet`\<`string`\> |

#### 반환[[isquantizedtensor.returns]]

`boolean`

#### 정의 위치[[isquantizedtensor.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:1189](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L1189)

___

### listCollections

▸ **listCollections**(`params?`): `AsyncGenerator`\<`ApiCollectionInfo`\>

#### 매개변수[[listcollections.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params?` | \{ search?: \{ owner?: string[] \| undefined; item?: string[] \| undefined; q?: string \| undefined; } \| undefined; sort?: "lastModified" \| "trending" \| "upvotes" \| undefined; limit?: number \| undefined; hubUrl?: string \| undefined; fetch?: \{ ...; } \| undefined; } & Partial\<...\> |

#### 반환[[listcollections.returns]]

`AsyncGenerator`\<`ApiCollectionInfo`\>

#### 정의 위치[[listcollections.defined-in]]

[packages/hub/src/lib/list-collections.ts:12](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-collections.ts#L12)

___

### listCommits

▸ **listCommits**(`params`): `AsyncGenerator`\<[`CommitData`](interfaces/CommitData)\>

#### 매개변수[[listcommits.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `batchSize?`: `number` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[listcommits.returns]]

`AsyncGenerator`\<[`CommitData`](interfaces/CommitData)\>

#### 정의 위치[[listcommits.defined-in]]

[packages/hub/src/lib/list-commits.ts:17](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-commits.ts#L17)

___

### listDatasets

▸ **listDatasets**\<`T`\>(`params?`): `AsyncGenerator`\<[`DatasetEntry`](interfaces/DatasetEntry) & `Pick`\<`ApiDatasetInfo`, `T`\>\>

#### 형식 매개변수[[listdatasets.type-parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `T` | extends ``"author"`` \| ``"cardData"`` \| ``"disabled"`` \| ``"gitalyUid"`` \| ``"createdAt"`` \| ``"tags"`` \| ``"paperswithcode_id"`` \| ``"sha"`` \| ``"citation"`` \| ``"description"`` \| ``"downloadsAllTime"`` = `never` |

#### 매개변수[[listdatasets.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params?` | \{ search?: \{ query?: string \| undefined; owner?: string \| undefined; tags?: string[] \| undefined; } \| undefined; hubUrl?: string \| undefined; additionalFields?: T[] \| undefined; limit?: number \| undefined; sort?: "id" \| ... 8 more ... \| undefined; fetch?: \{ ...; } \| undefined; } & Partial\<...\> |

#### 반환[[listdatasets.returns]]

`AsyncGenerator`\<[`DatasetEntry`](interfaces/DatasetEntry) & `Pick`\<`ApiDatasetInfo`, `T`\>\>

#### 정의 위치[[listdatasets.defined-in]]

[packages/hub/src/lib/list-datasets.ts:47](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-datasets.ts#L47)

___

### listFiles

▸ **listFiles**(`params`): `AsyncGenerator`\<[`ListFileEntry`](interfaces/ListFileEntry)\>

폴더의 파일 목록을 표시합니다. 디렉터리의 모든 파일을 나열하려면 `true`로 params.recursive를 설정하고 호출합니다.

#### 매개변수[[listfiles.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `expand?`: `boolean` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `path?`: `string` ; `recursive?`: `boolean` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[listfiles.returns]]

`AsyncGenerator`\<[`ListFileEntry`](interfaces/ListFileEntry)\>

#### 정의 위치[[listfiles.defined-in]]

[packages/hub/src/lib/list-files.ts:53](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-files.ts#L53)

___

### listJobHardware

▸ **listJobHardware**(`params?`): `Promise`\<`ApiJobHardware`[]\>

작업을 위한 사용 가능한 하드웨어 목록을 가져옵니다. 이 엔드포인트는 공개되어 있으며 인증이 필요하지 않지만, 인증은 선택 사항입니다.

#### 매개변수[[listjobhardware.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params?` | \{ hubUrl?: string \| undefined; fetch?: \{ (input: URL \| RequestInfo, init?: RequestInit \| undefined): Promise\; (input: string \| ... 1 more ... \| Request, init?: RequestInit \| undefined): Promise\<...\>; } \| undefined; } & Partial\<...\> |

#### 반환[[listjobhardware.returns]]

`Promise`\<`ApiJobHardware`[]\>

#### 정의 위치[[listjobhardware.defined-in]]

[packages/hub/src/lib/jobs/list-job-hardware.ts:11](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/list-job-hardware.ts#L11)

___

### listJobs

▸ **listJobs**(`params`): `Promise`\<`ApiJob`[]\>

네임스페이스(사용자 또는 조직)의 작업을 나열합니다.

#### 매개변수[[listjobs.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[listjobs.returns]]

`Promise`\<`ApiJob`[]\>

#### 정의 위치[[listjobs.defined-in]]

[packages/hub/src/lib/jobs/list-jobs.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/list-jobs.ts#L10)

___

### listModels

▸ **listModels**\<`T`\>(`params?`): `AsyncGenerator`\<[`ModelEntry`](interfaces/ModelEntry) & [`ResolveModelAdditionalFields`](modules#resolvemodeladditionalfields)\<`T`\>\>

#### 형식 매개변수[[listmodels.type-parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `T` | extends [`ModelAdditionalField`](modules#modeladditionalfield) = `never` |

#### 매개변수[[listmodels.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params?` | \{ search?: \{ query?: string \| undefined; owner?: string \| undefined; task?: "other" \| "text-classification" \| "token-classification" \| "table-question-answering" \| "question-answering" \| ... 52 more ... \| undefined; tags?: string[] \| undefined; inferenceProviders?: string[] \| undefined; apps?: string[] \| undefined; ... |

#### 반환[[listmodels.returns]]

`AsyncGenerator`\<[`ModelEntry`](interfaces/ModelEntry) & [`ResolveModelAdditionalFields`](modules#resolvemodeladditionalfields)\<`T`\>\>

#### 정의 위치[[listmodels.defined-in]]

[packages/hub/src/lib/list-models.ts:68](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-models.ts#L68)

___

### listScheduledJobs

▸ **listScheduledJobs**(`params`): `Promise`\<`ApiScheduledJob`[]\>

네임스페이스의 예약된 작업을 나열합니다.

#### 매개변수[[listscheduledjobs.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[listscheduledjobs.returns]]

`Promise`\<`ApiScheduledJob`[]\>

#### 정의 위치[[listscheduledjobs.defined-in]]

[packages/hub/src/lib/jobs/list-scheduled-jobs.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/list-scheduled-jobs.ts#L10)

___

### listSpaces

▸ **listSpaces**\<`T`\>(`params?`): `AsyncGenerator`\<[`SpaceEntry`](interfaces/SpaceEntry) & `Pick`\<`ApiSpaceInfo`, `T`\>\>

#### 형식 매개변수[[listspaces.type-parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `T` | extends ``"models"`` \| ``"datasets"`` \| ``"author"`` \| ``"cardData"`` \| ``"disabled"`` \| ``"gitalyUid"`` \| ``"createdAt"`` \| ``"tags"`` \| ``"sha"`` \| ``"subdomain"`` \| ``"runtime"`` = `never` |

#### 매개변수[[listspaces.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params?` | \{ search?: \{ query?: string \| undefined; owner?: string \| undefined; tags?: string[] \| undefined; } \| undefined; hubUrl?: string \| undefined; fetch?: \{ (input: URL \| RequestInfo, init?: RequestInit \| undefined): Promise\<...\>; (input: string \| ... 1 more ... \| Request, init?: RequestInit \| undefined): Promise\<...\>; }... |

#### 반환[[listspaces.returns]]

`AsyncGenerator`\<[`SpaceEntry`](interfaces/SpaceEntry) & `Pick`\<`ApiSpaceInfo`, `T`\>\>

#### 정의 위치[[listspaces.defined-in]]

[packages/hub/src/lib/list-spaces.ts:44](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/list-spaces.ts#L44)

___

### matchesCompressedTensorsTarget

▸ **matchesCompressedTensorsTarget**(`target`, `moduleName`): `boolean`

압축된 텐서 대상과 모듈 이름을 일치시킵니다.

Targets는 정확한 모듈 이름, 클래스 이름(예: `"Linear"`, 텐서 이름에서 해석할 수 없으므로 무시됨), 또는 `re:` 접두사가 붙은 Python 정규식입니다. config.json에서 공격자 제어 RegExp를 평가하는 것을 방지하기 위해(ReDoS, SyntaxError — globMatch 참조), 일반적인 정규식 부분집합(`.*` 와일드카드, `^`/`$` 앵커, `\.` 이스케이프)을 globMatch로 변환하고, 기타 정규식 문법을 사용하는 targets는 일치하지 않는 것으로 처리합니다.

#### 매개변수[[matchescompressedtensorstarget.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `target` | `string` |
| `moduleName` | `string` |

#### 반환[[matchescompressedtensorstarget.returns]]

`boolean`

#### 정의 위치[[matchescompressedtensorstarget.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:1231](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L1231)

___

### modelInfo

▸ **modelInfo**\<`T`\>(`params`): `Promise`\<[`ModelEntry`](interfaces/ModelEntry) & [`ResolveModelAdditionalFields`](modules#resolvemodeladditionalfields)\<`T`\>\>

#### 형식 매개변수[[modelinfo.type-parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `T` | extends [`ModelAdditionalField`](modules#modeladditionalfield) = `never` |

#### 매개변수[[modelinfo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `additionalFields?`: `T`[] ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `name`: `string` ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[modelinfo.returns]]

`Promise`\<[`ModelEntry`](interfaces/ModelEntry) & [`ResolveModelAdditionalFields`](modules#resolvemodeladditionalfields)\<`T`\>\>

#### 정의 위치[[modelinfo.defined-in]]

[packages/hub/src/lib/model-info.ts:16](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/model-info.ts#L16)

___

### oauthHandleRedirect

▸ **oauthHandleRedirect**(`opts?`): `Promise`\<[`OAuthResult`](interfaces/OAuthResult)\>

OAuth 제공자가 앱으로 리디렉션한 후에 호출합니다.

URL의 쿼리 매개변수에 oauth 코드가 포함된 경우 `oauthHandleRedirect`를 호출하고, 그렇지 않으면 `false`를 반환하는 헬퍼 함수 [oauthHandleRedirectIfPresent](modules#oauthhandleredirectifpresent)도 있습니다.

#### 매개변수[[oauthhandleredirect.parameters]]

| 이름 | 유형 | 설명 |
| :------ | :------ | :------ |
| `opts?` | `Object` | - |
| `opts.codeVerifier?` | `string` | oauthLoginUrl에서 생성된 codeVerifier **`Default`** ```ts localStorage.getItem("huggingface.co:oauth:code_verifier") ``` |
| `opts.hubUrl?` | `string` | Hub의 URL입니다. 기본값은 [HUB_URL](modules#hub_url)입니다. |
| `opts.nonce?` | `string` | oauthLoginUrl에서 생성된 nonce **`Default`** ```ts localStorage.getItem("huggingface.co:oauth:nonce") ``` |
| `opts.redirectedUrl?` | `string` | 분석할 URL입니다. **`Default`** ```ts window.location.href ``` |

#### 반환[[oauthhandleredirect.returns]]

`Promise`\<[`OAuthResult`](interfaces/OAuthResult)\>

#### 정의 위치[[oauthhandleredirect.defined-in]]

[packages/hub/src/lib/oauth-handle-redirect.ts:123](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/oauth-handle-redirect.ts#L123)

___

### oauthHandleRedirectIfPresent

▸ **oauthHandleRedirectIfPresent**(`opts?`): `Promise`\<[`OAuthResult`](interfaces/OAuthResult) \| ``false``\>

OAuth 제공자가 앱으로 리디렉션한 후에 호출합니다.

URL의 쿼리 파라미터에 oauth 코드가 없으면 false를 반환하고, 그렇지 않으면 [oauthHandleRedirect](modules#oauthhandleredirect)를 호출합니다.

앱에 따라 [oauthHandleRedirect](modules#oauthhandleredirect)를 직접 호출하는 것이 더 적합할 수 있습니다.

#### 매개변수[[oauthhandleredirectifpresent.parameters]]

| 이름 | 유형 | 설명 |
| :------ | :------ | :------ |
| `opts?` | `Object` | - |
| `opts.codeVerifier?` | `string` | oauthLoginUrl에서 생성된 codeVerifier **`Default`** ```ts localStorage.getItem("huggingface.co:oauth:code_verifier") ``` |
| `opts.hubUrl?` | `string` | Hub의 URL입니다. 기본값은 [HUB_URL](modules#hub_url)입니다. |
| `opts.nonce?` | `string` | oauthLoginUrl에서 생성된 nonce **`Default`** ```ts localStorage.getItem("huggingface.co:oauth:nonce") ``` |
| `opts.redirectedUrl?` | `string` | 분석할 URL입니다. **`Default`** ```ts window.location.href ``` |

#### 반환[[oauthhandleredirectifpresent.returns]]

`Promise`\<[`OAuthResult`](interfaces/OAuthResult) \| ``false``\>

#### 정의 위치[[oauthhandleredirectifpresent.defined-in]]

[packages/hub/src/lib/oauth-handle-redirect.ts:293](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/oauth-handle-redirect.ts#L293)

___

### oauthLoginUrl

▸ **oauthLoginUrl**(`opts?`): `Promise`\<`string`\>

"Sign in with Hub"를 사용하여 사용자를 인증하고 oauth 사용자 정보/액세스 토큰을 가져옵니다.

리다이렉트할 URL을 반환합니다. 사용자가 앱으로 리다이렉트된 후, `oauthHandleRedirect`를 호출하여 oauth 사용자 정보/액세스 토큰을 가져옵니다.

OAuth가 활성화된 정적 Space 내부에서 호출되면 Space에서 설정을 로드하고, 그렇지 않으면 OAuth App의 클라이언트 ID를 최소한 지정해야 합니다.

#### 매개변수[[oauthloginurl.parameters]]

| 이름 | 유형 | 설명 |
| :------ | :------ | :------ |
| `opts?` | `Object` | - |
| `opts.clientId?` | `string` | OAuth 클라이언트 ID. 정적 Spaces의 경우, README.md의 메타데이터에 `hf_oauth: true`가 존재하면 이 값을 생략할 수 있으며 Space 설정에서 로드됩니다. 다른 Spaces의 경우, README.md의 메타데이터에 `hf_oauth: true`가 존재하면 백엔드에서 OAUTH_CLIENT_ID 환경 변수로 사용할 수 있습니다. 또한 https://huggingface.co/settings/connected-applications에서 개발자 애플리케이션을 생성하여 해당 클라이언트 ID를 사용할 수도 있습니다. |
| `opts.hubUrl?` | `string` | - |
| `opts.localStorage?` | `Object` | 제공된 경우, localStorage를 사용하는 대신 OAuth 플로우에 사용된 code verifier와 nonce로 채워집니다. `oauthHandleRedirectIfPresent` 또는 `oauthHandleRedirect`를 호출할 때 동일한 값을 제공해야 합니다. |
| `opts.localStorage.codeVerifier?` | `string` | - |
| `opts.localStorage.nonce?` | `string` | - |
| `opts.redirectUrl?` | `string` | Redirect URI, 기본값은 현재 URL입니다. Spaces의 경우 Space 내의 모든 URL이 허용됩니다. Developer Applications의 경우, https://huggingface.co/settings/connected-applications에서 허용된 redirect URI 목록에 원하는 URL을 추가할 수 있습니다. |
| `opts.scopes?` | `string` | OAuth scope, 공백으로 구분된 scope 목록입니다. 정적 Spaces의 경우, README.md의 메타데이터에 `hf_oauth: true`가 존재하는 한 이 값을 생략할 수 있으며, Space config에서 로드됩니다. 다른 Spaces의 경우, README.md의 메타데이터에 `hf_oauth: true`가 존재하는 한 백엔드에서 OAUTH_SCOPES 환경 변수로 사용할 수 있습니다. 기본값은 "openid profile"입니다. https://huggingface.co/settings/connected-applications에서 Developer Application을 생성하여 해당 scope를 사용할 수도 있습니다. 사용 가능한 scope 목록은 https://huggingface.co/docs/hub/oauth를 참고하세요. |
| `opts.state?` | `string` | 리다이렉트 후 `oauthLogin` 호출 시 반환되는 OAuth 제공자에게 전달할 상태입니다. |

#### 반환[[oauthloginurl.returns]]

`Promise`\<`string`\>

**`Example`**

```ts
import { oauthLoginUrl, oauthHandleRedirectIfPresent } from "@huggingface/hub";

const oauthResult = await oauthHandleRedirectIfPresent();

if (!oauthResult) {
  // If the user is not logged in, redirect to the login page
  window.location.href = await oauthLoginUrl();
}

// You can use oauthResult.accessToken, oauthResult.accessTokenExpiresAt and oauthResult.userInfo
console.log(oauthResult);
```

(이론적으로 `hubUrl`을 변경하여 PKCE와 OpenID Connect를 지원하는 모든 OAuth 제공자에서 사용자 인증에 이 함수를 사용할 수 있지만, 현재는 Hugging Face Hub에서만 테스트되었습니다.)

#### 정의 위치[[oauthloginurl.defined-in]]

[packages/hub/src/lib/oauth-login-url.ts:31](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/oauth-login-url.ts#L31)

___

### parseRepoType

▸ **parseRepoType**(`type`): [`RepoType`](modules#repotype)

#### 매개변수[[parserepotype.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `type` | `string` |

#### 반환[[parserepotype.returns]]

[`RepoType`](modules#repotype)

#### 정의 위치[[parserepotype.defined-in]]

[packages/hub/src/lib/cache-management.ts:264](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L264)

___

### parseSafetensorsMetadata

▸ **parseSafetensorsMetadata**(`params`): `Promise`\<`SetRequired`\<[`SafetensorsParseFromRepo`](modules#safetensorsparsefromrepo), ``"parameterCount"``\>\>

Hugging Face에 호스팅된 모델의 model.safetensors.index.json 또는 model.safetensors를 스마트 레인지 요청을 사용하여 분석하여 메타데이터를 추출합니다.

#### 매개변수[[parsesafetensorsmetadata.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `computeParametersCount`: ``true`` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `library?`: `string` ; `path?`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string` ; `useSafetensorsMetadataEndpoint?`: `boolean`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[parsesafetensorsmetadata.returns]]

`Promise`\<`SetRequired`\<[`SafetensorsParseFromRepo`](modules#safetensorsparsefromrepo), ``"parameterCount"``\>\>

#### 정의 위치[[parsesafetensorsmetadata.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:738](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L738)

▸ **parseSafetensorsMetadata**(`params`): `Promise`\<[`SafetensorsParseFromRepo`](modules#safetensorsparsefromrepo)\>

#### 매개변수[[parsesafetensorsmetadata.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `computeParametersCount?`: `boolean` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `library?`: `string` ; `path?`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string` ; `useSafetensorsMetadataEndpoint?`: `boolean`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[parsesafetensorsmetadata.returns]]

`Promise`\<[`SafetensorsParseFromRepo`](modules#safetensorsparsefromrepo)\>

#### 정의 위치[[parsesafetensorsmetadata.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:775](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L775)

___

### parseSafetensorsShardFilename

▸ **parseSafetensorsShardFilename**(`filename`): [`SafetensorsShardFileInfo`](interfaces/SafetensorsShardFileInfo) \| ``null``

#### 매개변수[[parsesafetensorsshardfilename.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `filename` | `string` |

#### 반환[[parsesafetensorsshardfilename.returns]]

[`SafetensorsShardFileInfo`](interfaces/SafetensorsShardFileInfo) \| ``null``

#### 정의 위치[[parsesafetensorsshardfilename.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:36](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L36)

___

### parseTotalParameters

▸ **parseTotalParameters**(`value`, `computedTotal?`): `number` \| `undefined`

`total_parameters` 단축키를 헤더/인덱스 메타데이터에서 읽습니다. 이는 자체 보고된 값이며, Hub는 이를 그대로 표시하여 위의 헤더 검증을 우회합니다. 따라서 계산된 값이 있는 경우 해당 값으로 상한을 설정합니다(두 값이 일치하는 잘 형성된 파일의 경우 이는 아무런 효과가 없습니다).

#### 매개변수[[parsetotalparameters.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `value` | `undefined` \| `string` \| `number` |
| `computedTotal?` | `number` |

#### 반환[[parsetotalparameters.returns]]

`number` \| `undefined`

#### 정의 위치[[parsetotalparameters.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:699](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L699)

___

### pathsInfo

▸ **pathsInfo**(`params`): `Promise`\<[`PathInfo`](interfaces/PathInfo) & \{ `lastCommit`: [`CommitInfo`](interfaces/CommitInfo) ; `securityFileStatus`: [`SecurityFileStatus`](interfaces/SecurityFileStatus)  }[]\>

#### 매개변수[[pathsinfo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `expand`: ``true`` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `paths`: `string`[] ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[pathsinfo.returns]]

`Promise`\<[`PathInfo`](interfaces/PathInfo) & \{ `lastCommit`: [`CommitInfo`](interfaces/CommitInfo) ; `securityFileStatus`: [`SecurityFileStatus`](interfaces/SecurityFileStatus)  }[]\>

#### 정의 위치[[pathsinfo.defined-in]]

[packages/hub/src/lib/paths-info.ts:51](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/paths-info.ts#L51)

▸ **pathsInfo**(`params`): `Promise`\<[`PathInfo`](interfaces/PathInfo)[]\>

#### 매개변수[[pathsinfo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `expand?`: `boolean` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `paths`: `string`[] ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[pathsinfo.returns]]

`Promise`\<[`PathInfo`](interfaces/PathInfo)[]\>

#### 정의 위치[[pathsinfo.defined-in]]

[packages/hub/src/lib/paths-info.ts:64](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/paths-info.ts#L64)

___

### relativeUnderFolder

▸ **relativeUnderFolder**(`filePath`, `folderPath`): `string`

`filePath`의 `folderPath`에 대한 상대 경로를 계산합니다. 복사 중인 폴더 아래에 있는 소스 경로를 새 접두사 아래에 있는 대상 경로로 매핑하는 데 사용됩니다.

#### 매개변수[[relativeunderfolder.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `filePath` | `string` |
| `folderPath` | `string` |

#### 반환[[relativeunderfolder.returns]]

`string`

#### 정의 위치[[relativeunderfolder.defined-in]]

[packages/hub/src/lib/copy-files.ts:558](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/copy-files.ts#L558)

___

### repoExists

▸ **repoExists**(`params`): `Promise`\<`boolean`\>

#### 매개변수[[repoexists.parameters]]

| 이름 | 유형 | 설명 |
| :------ | :------ | :------ |
| `params` | `Object` | - |
| `params.accessToken?` | `string` | - |
| `params.fetch?` | (`input`: `URL` \| `RequestInfo`, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> | 기본 함수 대신 사용할 커스텀 fetch 함수입니다. 예를 들어 프록시를 사용하거나 헤더를 수정하는 데 사용할 수 있습니다. |
| `params.hubUrl?` | `string` | - |
| `params.repo` | [`RepoDesignation`](modules#repodesignation) | - |
| `params.revision?` | `string` | 브랜치 이름, 태그 또는 커밋 해시일 수 있는 선택적 Git 리비전 ID입니다. |

#### 반환[[repoexists.returns]]

`Promise`\<`boolean`\>

#### 정의 위치[[repoexists.defined-in]]

[packages/hub/src/lib/repo-exists.ts:6](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/repo-exists.ts#L6)

___

### resumeScheduledJob

▸ **resumeScheduledJob**(`params`): `Promise`\<`void`\>

예약된 작업을 재개합니다.

#### 매개변수[[resumescheduledjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[resumescheduledjob.returns]]

`Promise`\<`void`\>

#### 정의 위치[[resumescheduledjob.defined-in]]

[packages/hub/src/lib/jobs/resume-scheduled-job.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/resume-scheduled-job.ts#L9)

___

### runJob

▸ **runJob**(`params`): `Promise`\<`ApiJob`\>

새 작업을 실행합니다.

#### 매개변수[[runjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `namespace`: `string`  } & CreateJobOptions & CredentialsParams |

#### 반환[[runjob.returns]]

`Promise`\<`ApiJob`\>

#### 정의 위치[[runjob.defined-in]]

[packages/hub/src/lib/jobs/run-job.ts:12](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/run-job.ts#L12)

___

### runScheduledJob

▸ **runScheduledJob**(`params`): `Promise`\<`ApiJob` \| ``null``\>

예약된 작업을 즉시 실행하도록 트리거합니다. 트리거된 작업을 반환하며, 이미 다른 인스턴스가 실행 중이면 null을 반환합니다.

#### 매개변수[[runscheduledjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[runscheduledjob.returns]]

`Promise`\<`ApiJob` \| ``null``\>

#### 정의 위치[[runscheduledjob.defined-in]]

[packages/hub/src/lib/jobs/run-scheduled-job.ts:11](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/run-scheduled-job.ts#L11)

___

### scanCacheDir

▸ **scanCacheDir**(`cacheDir?`): `Promise`\<[`HFCacheInfo`](interfaces/HFCacheInfo)\>

#### 매개변수[[scancachedir.parameters]]

| 이름 | 유형 | 기본값 |
| :------ | :------ | :------ |
| `cacheDir` | `undefined` \| `string` | `undefined` |

#### 반환[[scancachedir.returns]]

`Promise`\<[`HFCacheInfo`](interfaces/HFCacheInfo)\>

#### 정의 위치[[scancachedir.defined-in]]

[packages/hub/src/lib/cache-management.ts:72](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L72)

___

### scanCachedRepo

▸ **scanCachedRepo**(`repoPath`): `Promise`\<[`CachedRepoInfo`](interfaces/CachedRepoInfo)\>

#### 매개변수[[scancachedrepo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `repoPath` | `string` |

#### 반환[[scancachedrepo.returns]]

`Promise`\<[`CachedRepoInfo`](interfaces/CachedRepoInfo)\>

#### 정의 위치[[scancachedrepo.defined-in]]

[packages/hub/src/lib/cache-management.ts:118](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L118)

___

### scanRefsDir

▸ **scanRefsDir**(`refsPath`, `refsByHash`): `Promise`\<`void`\>

#### 매개변수[[scanrefsdir.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `refsPath` | `string` |
| `refsByHash` | `Map`\<`string`, `string`[]\> |

#### 반환[[scanrefsdir.returns]]

`Promise`\<`void`\>

#### 정의 위치[[scanrefsdir.defined-in]]

[packages/hub/src/lib/cache-management.ts:210](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L210)

___

### scanSnapshotDir

▸ **scanSnapshotDir**(`revisionPath`, `cachedFiles`, `blobStats`): `Promise`\<`void`\>

#### 매개변수[[scansnapshotdir.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `revisionPath` | `string` |
| `cachedFiles` | [`CachedFileInfo`](interfaces/CachedFileInfo)[] |
| `blobStats` | `Map`\<`string`, `Stats`\> |

#### 반환[[scansnapshotdir.returns]]

`Promise`\<`void`\>

#### 정의 위치[[scansnapshotdir.defined-in]]

[packages/hub/src/lib/cache-management.ts:227](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/cache-management.ts#L227)

___

### snapshotDownload

▸ **snapshotDownload**(`params`): `Promise`\<`string`\>

지정된 리비전의 저장소 전체를 [getHFHubCachePath](modules#gethfhubcachepath) 캐시 디렉터리에 다운로드합니다. [scanCachedRepo](modules#scancachedrepo)를 사용하여 모든 캐시된 저장소를 나열할 수 있습니다.

#### 매개변수[[snapshotdownload.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `cacheDir?`: `string` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[snapshotdownload.returns]]

`Promise`\<`string`\>

**`Remarks`**

내부적으로 [downloadFileToCacheDir](modules#downloadfiletocachedir)를 사용합니다.

#### 정의 위치[[snapshotdownload.defined-in]]

[packages/hub/src/lib/snapshot-download.ts:20](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/snapshot-download.ts#L20)

___

### spaceInfo

▸ **spaceInfo**\<`T`\>(`params`): `Promise`\<[`SpaceEntry`](interfaces/SpaceEntry) & `Pick`\<`ApiSpaceInfo`, `T`\>\>

#### 형식 매개변수[[spaceinfo.type-parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `T` | extends ``"models"`` \| ``"datasets"`` \| ``"author"`` \| ``"cardData"`` \| ``"disabled"`` \| ``"gitalyUid"`` \| ``"createdAt"`` \| ``"tags"`` \| ``"sha"`` \| ``"subdomain"`` \| ``"runtime"`` = `never` |

#### 매개변수[[spaceinfo.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `additionalFields?`: `T`[] ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `name`: `string` ; `revision?`: `string`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[spaceinfo.returns]]

`Promise`\<[`SpaceEntry`](interfaces/SpaceEntry) & `Pick`\<`ApiSpaceInfo`, `T`\>\>

#### 정의 위치[[spaceinfo.defined-in]]

[packages/hub/src/lib/space-info.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/space-info.ts#L10)

___

### streamJobEvents

▸ **streamJobEvents**(`params`): `AsyncGenerator`\<`string`, `void`, `unknown`\>

Server-Sent Events(SSE)를 사용하여 스트림 작업 이벤트를 전송합니다. 이벤트 청크의 비동기 반복 가능 객체를 반환합니다.

#### 매개변수[[streamjobevents.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[streamjobevents.returns]]

`AsyncGenerator`\<`string`, `void`, `unknown`\>

#### 정의 위치[[streamjobevents.defined-in]]

[packages/hub/src/lib/jobs/stream-job-events.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/stream-job-events.ts#L10)

___

### streamJobLogs

▸ **streamJobLogs**(`params`): `AsyncGenerator`\<\{ `message`: `string` ; `timestamp`: `Date`  }, `void`, `unknown`\>

Server-Sent Events(SSE)를 사용하여 스트림 작업 로그를 전송합니다. 로그 청크의 비동기 반복 가능 객체를 반환합니다.

#### 매개변수[[streamjoblogs.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[streamjoblogs.returns]]

`AsyncGenerator`\<\{ `message`: `string` ; `timestamp`: `Date`  }, `void`, `unknown`\>

#### 정의 위치[[streamjoblogs.defined-in]]

[packages/hub/src/lib/jobs/stream-job-logs.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/stream-job-logs.ts#L10)

___

### streamJobMetrics

▸ **streamJobMetrics**(`params`): `AsyncGenerator`\<`string`, `void`, `unknown`\>

Server-Sent Events(SSE)를 사용하여 스트림 작업 메트릭을 스트리밍합니다. 메트릭 청크의 비동기 반복 가능 객체를 반환합니다.

#### 매개변수[[streamjobmetrics.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[streamjobmetrics.returns]]

`AsyncGenerator`\<`string`, `void`, `unknown`\>

#### 정의 위치[[streamjobmetrics.defined-in]]

[packages/hub/src/lib/jobs/stream-job-metrics.ts:10](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/stream-job-metrics.ts#L10)

___

### streamJson

▸ **streamJson**(`source`, `options?`): `AsyncGenerator`\<[`JsonStreamEvent`](modules#jsonstreamevent), `void`, `undefined`\>

#### 매개변수[[streamjson.parameters]]

| 이름 | 유형 | 설명 |
| :------ | :------ | :------ |
| `source` | `ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\> \| `AsyncIterable`\<`Uint8Array`\<`ArrayBufferLike`\>, `any`, `any`\> | - |
| `options?` | `Object` | - |
| `options.maxDepth?` | `number` | 최대 객체/배열 중첩 깊이. **`Default`** ```ts 1_000 ``` |
| `options.maxTokenLength?` | `number` | 단일 문자열/숫자 토큰의 최대 길이(문자 단위). **`Default`** ```ts 16_000_000 ``` |

#### 반환[[streamjson.returns]]

`AsyncGenerator`\<[`JsonStreamEvent`](modules#jsonstreamevent), `void`, `undefined`\>

#### 정의 위치[[streamjson.defined-in]]

[packages/hub/src/utils/streamJson.ts:123](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/utils/streamJson.ts#L123)

___

### suspendScheduledJob

▸ **suspendScheduledJob**(`params`): `Promise`\<`void`\>

Suspend (tN)예약된 작업을 일시 중지합니다.

#### 매개변수[[suspendscheduledjob.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string` ; `jobId`: `string` ; `namespace`: `string`  } & `CredentialsParams` |

#### 반환[[suspendscheduledjob.returns]]

`Promise`\<`void`\>

#### 정의 위치[[suspendscheduledjob.defined-in]]

[packages/hub/src/lib/jobs/suspend-scheduled-job.ts:9](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/jobs/suspend-scheduled-job.ts#L9)

___

### uploadFile

▸ **uploadFile**(`params`): `Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 매개변수[[uploadfile.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `abortSignal?`: `AbortSignal` ; `branch?`: `string` ; `commitDescription?`: `string` ; `commitTitle?`: `string` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `file`: `URL` \| [`CommitEditFileParams`](interfaces/CommitEditFileParams) \| `File` \| \{ `content`: [`ContentSource`](modules#contentsource) ; `path`: `string`  } ; `hubUrl?`: `string` ; `isPullRequest?`: `boolean` ; `parentCommit?`: `string` ; `rangeEditCache?`: [`RangeEditCache`](modules#rangeeditcache) ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `useWebWorkers?`: `boolean` \| \{ `minSize?`: `number` ; `poolSize?`: `number`  } ; `useXet?`: `boolean`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[uploadfile.returns]]

`Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 정의 위치[[uploadfile.defined-in]]

[packages/hub/src/lib/upload-file.ts:39](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/upload-file.ts#L39)

___

### uploadFiles

▸ **uploadFiles**(`params`): `Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 매개변수[[uploadfiles.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `abortSignal?`: `AbortSignal` ; `branch?`: `string` ; `commitDescription?`: `string` ; `commitTitle?`: `string` ; `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `files`: (`URL` \| [`CommitEditFileParams`](interfaces/CommitEditFileParams) \| `File` \| \{ `content`: [`ContentSource`](modules#contentsource) ; `path`: `string`  })[] ; `hubUrl?`: `string` ; `isPullRequest?`: `boolean` ; `maxFolderDepth?`: `number` ; `parentCommit?`: `string` ; `rangeEditCache?`: [`RangeEditCache`](modules#rangeeditcache) ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `useWebWorkers?`: `boolean` \| \{ `minSize?`: `number` ; `poolSize?`: `number`  } ; `useXet?`: `boolean`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[uploadfiles.returns]]

`Promise`\<[`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 정의 위치[[uploadfiles.defined-in]]

[packages/hub/src/lib/upload-files.ts:6](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/upload-files.ts#L6)

___

### uploadFilesWithProgress

▸ **uploadFilesWithProgress**(`params`): `AsyncGenerator`\<[`CommitProgressEvent`](modules#commitprogressevent), [`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

진행 상황 표시와 함께 업로드

모델, 데이터셋 및 스페이스 업로드의 진행 이벤트에는 XMLHttpRequest가 사용 가능해야 합니다. 모델, 데이터셋 및 스페이스의 해싱 진행 이벤트를 사용하려면 useWebWorkers를 true로 설정하세요.

#### 매개변수[[uploadfileswithprogress.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `abortSignal?`: `AbortSignal` ; `branch?`: `string` ; `commitDescription?`: `string` ; `commitTitle?`: `string` ; `files`: (`URL` \| [`CommitEditFileParams`](interfaces/CommitEditFileParams) \| `File` \| \{ `content`: [`ContentSource`](modules#contentsource) ; `path`: `string`  })[] ; `hubUrl?`: `string` ; `isPullRequest?`: `boolean` ; `maxFolderDepth?`: `number` ; `parentCommit?`: `string` ; `rangeEditCache?`: [`RangeEditCache`](modules#rangeeditcache) ; `repo`: [`RepoDesignation`](modules#repodesignation) ; `useWebWorkers?`: `boolean` \| \{ `minSize?`: `number` ; `poolSize?`: `number`  } ; `useXet?`: `boolean`  } & `Partial`\<`CredentialsParams`\> |

#### 반환[[uploadfileswithprogress.returns]]

`AsyncGenerator`\<[`CommitProgressEvent`](modules#commitprogressevent), [`CommitOutput`](interfaces/CommitOutput) \| `undefined`\>

#### 정의 위치[[uploadfileswithprogress.defined-in]]

[packages/hub/src/lib/upload-files-with-progress.ts:21](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/upload-files-with-progress.ts#L21)

___

### validateTensorEntry

▸ **validateTensorEntry**(`path`, `tensorName`, `info`, `fileSizeBytes`): `void`

헤더의 텐서 항목 하나를 검증합니다: 차원은 `MAX_TENSOR_DIM` 이하의 유한한 정수여야 하고, `data_offsets`가 적절해야 하며, 파일 크기가 알려진 경우 선언된 바이트 범위가 파일 내에 포함되어야 합니다. `data_offsets`를 `shape * dtype size` 대신 검사하는 이유는 두 값이 정합적으로 다를 수 있기(패딩) 때문입니다. 따라서 오프셋은 포맷이 제공하는 유일한 기준 진실입니다.

#### 매개변수[[validatetensorentry.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `path` | `string` |
| `tensorName` | `string` |
| `info` | [`TensorInfo`](interfaces/TensorInfo) |
| `fileSizeBytes` | `undefined` \| `number` |

#### 반환[[validatetensorentry.returns]]

`void`

#### 정의 위치[[validatetensorentry.defined-in]]

[packages/hub/src/lib/parse-safetensors-metadata.ts:246](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/parse-safetensors-metadata.ts#L246)

___

### whoAmI

▸ **whoAmI**(`params`): `Promise`\<[`WhoAmI`](modules#whoami) & \{ `auth`: [`AuthInfo`](interfaces/AuthInfo)  }\>

#### 매개변수[[whoami.parameters]]

| 이름 | 유형 |
| :------ | :------ |
| `params` | \{ `fetch?`: (`input`: URL \| RequestInfo, `init?`: `RequestInit`) => `Promise`\<`Response`\>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`\> ; `hubUrl?`: `string`  } & `CredentialsParams` |

#### 반환[[whoami.returns]]

`Promise`\<[`WhoAmI`](modules#whoami) & \{ `auth`: [`AuthInfo`](interfaces/AuthInfo)  }\>

#### 정의 위치[[whoami.defined-in]]

[packages/hub/src/lib/who-am-i.ts:62](https://github.com/huggingface/huggingface.js/blob/main/packages/hub/src/lib/who-am-i.ts#L62)

