# `HfHub.Constants`
[🔗](https://github.com/North-Shore-AI/hf_hub_ex/blob/v0.3.1/lib/hf_hub/constants.ex#L1)

Constants for HuggingFace Hub operations.

Provides file names, headers, timeouts, and other constants matching
Python's `huggingface_hub.constants` module.

# `config_name`

```elixir
@spec config_name() :: String.t()
```

Model configuration filename

# `default_download_timeout`

```elixir
@spec default_download_timeout() :: pos_integer()
```

Default timeout for downloads

# `default_endpoint`

```elixir
@spec default_endpoint() :: String.t()
```

Default HuggingFace Hub endpoint

# `default_etag_timeout`

```elixir
@spec default_etag_timeout() :: pos_integer()
```

Default timeout for ETag requests

# `default_request_timeout`

```elixir
@spec default_request_timeout() :: pos_integer()
```

Default timeout for general requests

# `default_revision`

```elixir
@spec default_revision() :: String.t()
```

Default git revision

# `download_chunk_size`

```elixir
@spec download_chunk_size() :: pos_integer()
```

Download chunk size (10 MB)

# `flax_weights_name`

```elixir
@spec flax_weights_name() :: String.t()
```

Flax/JAX model weights filename

# `header_x_linked_etag`

```elixir
@spec header_x_linked_etag() :: String.t()
```

Header for linked ETag

# `header_x_linked_size`

```elixir
@spec header_x_linked_size() :: String.t()
```

Header for linked file size

# `header_x_repo_commit`

```elixir
@spec header_x_repo_commit() :: String.t()
```

Header for commit hash in responses

# `pytorch_weights_name`

```elixir
@spec pytorch_weights_name() :: String.t()
```

PyTorch model weights filename

# `repo_id_separator`

```elixir
@spec repo_id_separator() :: String.t()
```

Separator used in repo IDs for cache directories

# `repo_type_dataset`

```elixir
@spec repo_type_dataset() :: String.t()
```

Dataset repository type

# `repo_type_model`

```elixir
@spec repo_type_model() :: String.t()
```

Model repository type

# `repo_type_space`

```elixir
@spec repo_type_space() :: String.t()
```

Space repository type

# `repo_type_url_prefix`

```elixir
@spec repo_type_url_prefix(:model | :dataset | :space) :: String.t()
```

Returns the URL prefix for a repository type.

Models have no prefix; datasets use "datasets/"; spaces use "spaces/".

# `repo_types`

```elixir
@spec repo_types() :: [:model | :dataset | :space]
```

All supported repository types

# `repocard_name`

```elixir
@spec repocard_name() :: String.t()
```

Repository README card filename

# `safetensors_index_file`

```elixir
@spec safetensors_index_file() :: String.t()
```

Safetensors index file for sharded models

# `safetensors_max_header_length`

```elixir
@spec safetensors_max_header_length() :: pos_integer()
```

Maximum safetensors header length (25 MB)

# `safetensors_single_file`

```elixir
@spec safetensors_single_file() :: String.t()
```

Safetensors single file model

# `tf2_weights_name`

```elixir
@spec tf2_weights_name() :: String.t()
```

TensorFlow 2.x model weights filename

---

*Consult [api-reference.md](api-reference.md) for complete listing*
