Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
22f6692
Port ESMC + ESMFold2 model code from fork onto v5 main (baseline, una…
Rocketknight1 Jun 2, 2026
49c7a4a
Strip vendored Triton kernels + set_kernel_backend selector from esmf…
Rocketknight1 Jun 2, 2026
39f5331
Remove vendored distributed/ (2D context-parallel) stack from esmfold2
Rocketknight1 Jun 2, 2026
88701d2
Refactor ESMC attention onto the v5 ALL_ATTENTION_FUNCTIONS interface
Rocketknight1 Jun 2, 2026
a42a910
Remove transformer_engine dependency from ESMC (pure-PyTorch only)
Rocketknight1 Jun 2, 2026
3c1c65b
Modernize ESMC rotary to the standard (cos, sin) + apply_rotary_pos_e…
Rocketknight1 Jun 2, 2026
abfe0a0
Add modular_esmc.py; generate modeling_esmc.py from it
Rocketknight1 Jun 3, 2026
a1d91a7
Fix ESMC checkpoint loading + bidirectional attention (verified vs fo…
Rocketknight1 Jun 3, 2026
091ec18
Fix ESMCTokenizer docstring example + add tokenizer tests
Rocketknight1 Jun 3, 2026
cce0178
Drop vestigial vocab_file entry from ESMCTokenizer VOCAB_FILES_NAMES
Rocketknight1 Jun 3, 2026
33afd38
Add ESMC model tests + make _init_weights cover all modules
Rocketknight1 Jun 3, 2026
6bd3270
Add ESMC docs + resolve auto_docstring checkpoint for the classificat…
Rocketknight1 Jun 3, 2026
52c9519
Remove the SAE (esmc_sae) from ESMC — deferred to a follow-up PR
Rocketknight1 Jun 3, 2026
f42978a
Normalize ESMC docstrings to satisfy check_docstrings
Rocketknight1 Jun 3, 2026
e082193
Get ESMFold2 importing: add __all__ + load ESMC via the Auto registry
Rocketknight1 Jun 3, 2026
4a435e0
Drop the experimental ESMFold2 variant + esmfold2_v2 mapping (release…
Rocketknight1 Jun 3, 2026
5e656ab
Remove TransformerEngine fp8 path from ESMFold2
Rocketknight1 Jun 3, 2026
7676ea1
Route ESMFold2 plain self-attention through the v5 attention interface
Rocketknight1 Jun 3, 2026
0a22192
Convert ESMFold2Config to the v5 @strict / PreTrainedConfig style
Rocketknight1 Jun 3, 2026
e4ea090
Add ESMFold2 tests + sub-config model_types
Rocketknight1 Jun 3, 2026
9bc2602
Add ESMFold2 model doc page
Rocketknight1 Jun 3, 2026
47d0099
Ruff-format the ESMFold2 fork files (deferred style sweep)
Rocketknight1 Jun 3, 2026
d442c1e
Convert ESMCConfig to the v5 @strict / @auto_docstring style
Rocketknight1 Jun 3, 2026
da35ca4
Fix ESMFold2 integration test: ubiquitin + correct 0-1 pLDDT/pTM scale
Rocketknight1 Jun 3, 2026
3e03361
Make ESMFold2 dtype-honest: drop in-model autocast, support from_pret…
Rocketknight1 Jun 4, 2026
99b0b49
Apply make fix-repo sweep + bf16 ESMFold2 usage example
Rocketknight1 Jun 4, 2026
870be2c
Keep ESMFold2 sub-configs internal (drop their model_types)
Rocketknight1 Jun 4, 2026
203e73e
Add kernel, update docs
Rocketknight1 Jun 5, 2026
1520d00
Some cleanup
Rocketknight1 Jun 5, 2026
60de6ca
More cleanup
Rocketknight1 Jun 5, 2026
2fd1060
dtype cleanups to make outputs match the original fork
Rocketknight1 Jun 8, 2026
784ece7
More chasing dtypes
Rocketknight1 Jun 9, 2026
fbe1db0
More bf16 to match the original + bump speed
Rocketknight1 Jun 9, 2026
0bba9d7
Remove more float upcasts for speeds + closer fork match
Rocketknight1 Jun 9, 2026
17d93c0
Remove more float upcasts for speeds + closer fork match
Rocketknight1 Jun 9, 2026
8f5b306
More trunk norm matching
Rocketknight1 Jun 9, 2026
561dfc5
Big general cleanup, no more _common.py, lots of repo standardization
Rocketknight1 Jun 12, 2026
bbf8d8d
Remove a lot of redundant dtype casts now that we no longer need them
Rocketknight1 Jun 12, 2026
e7d8a17
Rename a lot of config attributes to the standard ones
Rocketknight1 Jun 12, 2026
5c436c4
Modular cleanup, use standard output types
Rocketknight1 Jun 12, 2026
61d175f
More modular cleanup
Rocketknight1 Jun 12, 2026
af1a479
More modular cleanup
Rocketknight1 Jun 12, 2026
58610a4
More modular cleanup
Rocketknight1 Jun 12, 2026
e975f64
Even more modular cleanup
Rocketknight1 Jun 15, 2026
f0c8b77
No more modular ESMFold2
Rocketknight1 Jun 15, 2026
7837559
Dead code cleanup
Rocketknight1 Jun 15, 2026
682ff80
No more apply_torch_compile
Rocketknight1 Jun 15, 2026
1a2c984
Simplify the obvious einsums but leave the very messy ones
Rocketknight1 Jun 15, 2026
ad9abd2
Config cleanup, stop passing naked kwargs around
Rocketknight1 Jun 15, 2026
4b0e39d
Small docs cleanups
Rocketknight1 Jun 17, 2026
206e06e
Get rid of CPU-only path that we don't need
Rocketknight1 Jun 17, 2026
2e4e470
Test cleanup
Rocketknight1 Jun 17, 2026
7c7d8c8
Doc dates
Rocketknight1 Jun 17, 2026
a76c930
Comments cleanup
Rocketknight1 Jun 18, 2026
3579775
Re-add the kernel after rebase
Rocketknight1 Jun 22, 2026
8a2e3bc
Fix dates
Rocketknight1 Jun 22, 2026
6667c24
Push ESMC fixes
Rocketknight1 Jun 25, 2026
1ccebba
Fix the tokenizer to match Llama
Rocketknight1 Jun 25, 2026
e9afa19
Make the token classifier generic, attention cleanup, big modular red…
Rocketknight1 Jun 25, 2026
c884d5e
Import the sequence classifier
Rocketknight1 Jun 25, 2026
284ad3d
More review fixes
Rocketknight1 Jun 30, 2026
425ba1b
make fix-repo
Rocketknight1 Jun 30, 2026
db59333
tokenizer fixup
Rocketknight1 Jun 30, 2026
852145b
Remove FA2 for esmfold2, lift some constants into the config
Rocketknight1 Jul 1, 2026
7612e47
Big refactor to address reviewer comments
Rocketknight1 Jul 1, 2026
96b5089
Bundle args together, drop some dead args
Rocketknight1 Jul 2, 2026
3faf471
date fixup for CI
Rocketknight1 Jul 2, 2026
9a48a84
date fixup for CI
Rocketknight1 Jul 2, 2026
111a3eb
Move more stuff to config, merge more swiglus
Rocketknight1 Jul 3, 2026
78df1b0
Cleaning up some constants
Rocketknight1 Jul 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/source/en/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@
title: Ernie4_5_MoE
- local: model_doc/esm
title: ESM
- local: model_doc/esmc
title: ESMC
- local: model_doc/esmfold2
title: ESMFold2
- local: model_doc/eurobert
title: EuroBERT
- local: model_doc/exaone4
Expand Down
102 changes: 102 additions & 0 deletions docs/source/en/model_doc/esmc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!--Copyright 2026 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.

-->
*This model was contributed to Hugging Face Transformers on 2026-07-02.*

# ESMC

## Overview

ESMC (ESM Cambrian) is a family of protein language models released by [BioHub](https://biohub.org/).
It is a bidirectional Transformer encoder trained with a masked-language-modelling objective over amino-acid sequences.
Like [ESM-2](./esm), ESMC produces per-residue representations that are useful for downstream protein modelling tasks.

ESMC is suitable for fine-tuning on protein classification or token classification tasks. It is also used as the
backbone of [ESMFold2](./esmfold2), where it generates representations that are used as input to the folding head.

Pre-trained checkpoints are available on the Hugging Face Hub:

- [`biohub/ESMC-300M`](https://huggingface.co/biohub/ESMC-300M)
- [`biohub/ESMC-600M`](https://huggingface.co/biohub/ESMC-600M)
- [`biohub/ESMC-6B`](https://huggingface.co/biohub/ESMC-6B)

## Usage example

ESMC is registered with the auto classes (`AutoModel`, `AutoModelForMaskedLM`,
`AutoModelForSequenceClassification`, `AutoModelForTokenClassification`).

<hfoptions id="usage">
<hfoption id="Pipeline">

```python
import torch
from transformers import pipeline

extractor = pipeline(
task="feature-extraction",
model="biohub/ESMC-300M",
)
# Per-residue representations of shape (batch, sequence_length, hidden_size).
representations = extractor("MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ", return_tensors="pt")
```

</hfoption>
<hfoption id="AutoModel">

```python
import torch
from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("biohub/ESMC-300M")
model = AutoModel.from_pretrained("biohub/ESMC-300M")

inputs = tokenizer("MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ", return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)

# Per-residue representations of shape (batch, sequence_length, hidden_size).
representations = outputs.last_hidden_state
```

</hfoption>
</hfoptions>

## ESMCConfig

[[autodoc]] ESMCConfig

## ESMCTokenizer

[[autodoc]] ESMCTokenizer

## ESMCModel

[[autodoc]] ESMCModel
- forward

## ESMCForMaskedLM

[[autodoc]] ESMCForMaskedLM
- forward

## ESMCForSequenceClassification

[[autodoc]] ESMCForSequenceClassification
- forward

## ESMCForTokenClassification

[[autodoc]] ESMCForTokenClassification
- forward
84 changes: 84 additions & 0 deletions docs/source/en/model_doc/esmfold2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!--Copyright 2026 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.

-->
*This model was contributed to Hugging Face Transformers on 2026-07-02.*

# ESMFold2

## Overview

ESMFold2 is an all-atom protein structure prediction model. It predicts 3D coordinates and per-residue confidence
(pLDDT, PAE, PDE) directly from an amino-acid sequence, using the [ESMC](./esmc) protein language model as its
backbone. The architecture combines a sliding-window atom encoder with 3D rotary position embeddings, a pairwise
folding trunk applied iteratively, a diffusion-based structure head, and a confidence head.

The model checkpoints are available on the Hugging Face Hub at
[`biohub/ESMFold2`](https://huggingface.co/biohub/ESMFold2) and [`biohub/ESMFold2-Fast`](https://huggingface.co/biohub/ESMFold2-Fast)

## Usage example

```python
import torch

from transformers import ESMFold2Model

# The ESMC backbone is bundled in the checkpoint and loaded with the model.
# bf16 is the recommended inference precision.
model = ESMFold2Model.from_pretrained("biohub/ESMFold2", dtype=torch.bfloat16).cuda().eval()

pdb_string = model.infer_protein_as_pdb("MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ")
with open("prediction.pdb", "w") as f:
f.write(pdb_string)
```

`infer_protein` returns the raw outputs (atom coordinates, distogram logits and confidence metrics) as an
[`~models.esmfold2.modeling_esmfold2.ESMFold2Output`] if you need them instead of a PDB string. You may get
slightly different predictions if you run the same sequence multiple times. Set a manual seed if you want exactly
reproducible structures.

## Faster inference with a fused kernel

The folding trunk's dominant cost is the triangle-multiplication update. Passing `use_kernels=True` to
[`~PreTrainedModel.from_pretrained`] swaps it for a fused Triton kernel loaded from the Hub via the
[`kernels`](https://github.com/huggingface/kernels) library, leaving the prediction unchanged. It is inference-only and
CUDA-only; on CPU or without the kernel installed the model transparently falls back to the pure-PyTorch implementation.
Make sure the model is on a CUDA device when kernelization happens (e.g. with `device_map`).

```python
import torch

from transformers import ESMFold2Model

model = ESMFold2Model.from_pretrained(
"biohub/ESMFold2", dtype=torch.bfloat16, device_map="cuda", use_kernels=True
).eval()

pdb_string = model.infer_protein_as_pdb("MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ")
```

## ESMFold2Config

[[autodoc]] ESMFold2Config

## ESMFold2PreTrainedModel

[[autodoc]] ESMFold2PreTrainedModel

## ESMFold2Model

[[autodoc]] ESMFold2Model
- forward
- infer_protein
- infer_protein_as_pdb
67 changes: 67 additions & 0 deletions src/transformers/conversion_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,73 @@ def _build_checkpoint_conversion_mapping():
"rotary_embeddings.inv_freq",
),
],
"esmc": [
WeightRenaming(r"embed\.", "embed_tokens."),
WeightRenaming(r"transformer\.blocks", "layers"),
# The negative lookbehinds anchor the *reverse* search to the final encoder
# norm only (they are stripped from the forward replacement), so saving does
# not rewrite the "norm" inside ``input_layernorm`` / ``post_attention_layernorm``.
WeightRenaming(r"transformer\.norm\.", r"(?<!layer)(?<!_)norm\."),
WeightRenaming(r"attn\.layernorm_qkv\.layer_norm_weight", "input_layernorm.weight"),
WeightRenaming(r"attn\.layernorm_qkv\.layer_norm_bias", "input_layernorm.bias"),
WeightRenaming(r"attn\.q_ln", "self_attn.q_norm"),
WeightRenaming(r"attn\.k_ln", "self_attn.k_norm"),
WeightRenaming(r"attn\.out_proj", "self_attn.o_proj"),
WeightRenaming(r"ffn\.layer_norm_weight", "post_attention_layernorm.weight"),
WeightRenaming(r"ffn\.layer_norm_bias", "post_attention_layernorm.bias"),
WeightRenaming(r"ffn\.fc2_weight", "mlp.down_proj.weight"),
WeightConverter(
source_patterns=["attn.layernorm_qkv.weight"],
target_patterns=[
"self_attn.q_proj.weight",
"self_attn.k_proj.weight",
"self_attn.v_proj.weight",
],
operations=[Chunk(dim=0)],
),
WeightConverter(
source_patterns=["ffn.fc1_weight"],
target_patterns=[
"mlp.gate_proj.weight",
"mlp.up_proj.weight",
],
operations=[Chunk(dim=0)],
),
],
"ESMCForMaskedLM": [
WeightRenaming(r"lm_head\.0\.", "lm_head.dense."),
WeightRenaming(r"lm_head\.2\.", "lm_head.layer_norm."),
WeightRenaming(r"lm_head\.3\.", "lm_head.decoder."),
],
"esmfold2": [
# TODO(temporary): the published ESMFold2 checkpoint predates the SwiGLU consolidation
# and still stores those blocks under their old per-module names. Drop this whole entry
# once the merged ESMFold2+ESMC checkpoint is regenerated with the canonical `w12`/`w3`.
WeightRenaming(r"\.w_up\.", ".w12."), # SwiGLU-FFN (atom transformer)
WeightRenaming(r"\.w_down\.", ".w3."),
WeightRenaming(r"\.lin_swish\.", ".ffn.w12."), # ConditionedTransitionBlock
WeightRenaming(r"\.lin_out\.", ".ffn.w3."),
# TODO(temporary): checkpoint predates the SWA attention q/k/v projection split (M19);
# it packed q/k/v into a single ``Wqkv``. Drop once the merged checkpoint is regenerated
# with split projections. (The pair-bias attention keeps its packed ``kv_proj`` for now:
# splitting it too would clash with these q/k/v names under the bidirectional converter.)
WeightConverter(
source_patterns=["attn.Wqkv.weight"],
target_patterns=["attn.q_proj.weight", "attn.k_proj.weight", "attn.v_proj.weight"],
operations=[Chunk(dim=0)],
),
# TODO(temporary): checkpoint predates de-Sequentializing the nn.Sequential blocks (M26)
# into named submodules. Drop this whole group after the merged checkpoint is regenerated.
WeightRenaming(r"output_mlp\.0\.", "output_fc1."), # SingleToPair (Linear, GELU, Linear)
WeightRenaming(r"output_mlp\.2\.", "output_fc2."),
WeightRenaming(r"adaln_modulation\.1\.", "adaln_linear."), # SWAAtomBlock (SiLU, Linear)
WeightRenaming(r"base_z_linear\.0\.", "base_z_input_norm."), # LM shim (Norm, Linear)
WeightRenaming(r"base_z_linear\.1\.", "base_z_proj."),
WeightRenaming(r"base_z_mlp\.0\.", "base_z_to_pair."), # LM shim (SingleToPair, Norm)
WeightRenaming(r"base_z_mlp\.1\.", "base_z_output_norm."),
WeightRenaming(r"compute_bias\.0\.", "bias_norm."), # MSAPairWeightedAveraging (Norm, Linear)
WeightRenaming(r"compute_bias\.1\.", "bias_proj."),
],
"dinov3_convnext": [WeightRenaming(r"(?<!model\.)stages", r"model.stages")],
"dinov3_vit": [WeightRenaming(r"(?<!model\.)layer.", r"model.layer.")],
"timesfm2_5": [
Expand Down
9 changes: 9 additions & 0 deletions src/transformers/integrations/hub_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ def _build_kernel_mapping() -> dict:
trust_remote_code=True,
),
},
"ESMFold2TriangleMultiplication": {
"cuda": {
Mode.INFERENCE: LayerRepository(
repo_id="Rocketknight1/esmfold2-trimul-kernel",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to port to kernels community? Lemme nudge internally if you need help check the kernels channel #kernels

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was a placeholder location while I was working on the PR! We should definitely move this before merging

layer_name="ESMFold2TriangleMultiplication",
version=1,
),
},
},
"SwiGLUMLP": {
"cuda": {
Mode.INFERENCE | Mode.TORCH_COMPILE: LayerRepository(
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
from .ernie4_5_moe import *
from .ernie4_5_vl_moe import *
from .esm import *
from .esmc import *
from .esmfold2 import *
from .evolla import *
from .exaone4 import *
from .exaone4_5 import *
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/models/auto/auto_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@
("ernie4_5_vl_moe_text", "Ernie4_5_VLMoeTextConfig"),
("ernie4_5_vl_moe_vision", "Ernie4_5_VLMoeVisionConfig"),
("esm", "EsmConfig"),
("esmc", "ESMCConfig"),
("esmfold2", "ESMFold2Config"),
("eurobert", "EuroBertConfig"),
("evolla", "EvollaConfig"),
("exaone4", "Exaone4Config"),
Expand Down
5 changes: 5 additions & 0 deletions src/transformers/models/auto/modeling_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ class _BaseModelWithGenerate(PreTrainedModel, GenerationMixin):
("ernie4_5_moe", "Ernie4_5_MoeModel"),
("ernie4_5_vl_moe", "Ernie4_5_VLMoeModel"),
("esm", "EsmModel"),
("esmc", "ESMCModel"),
("esmfold2", "ESMFold2Model"),
("eurobert", "EuroBertModel"),
("evolla", "EvollaModel"),
("exaone4", "Exaone4Model"),
Expand Down Expand Up @@ -1145,6 +1147,7 @@ class _BaseModelWithGenerate(PreTrainedModel, GenerationMixin):
("electra", "ElectraForMaskedLM"),
("ernie", "ErnieForMaskedLM"),
("esm", "EsmForMaskedLM"),
("esmc", "ESMCForMaskedLM"),
("eurobert", "EuroBertForMaskedLM"),
("flaubert", "FlaubertWithLMHeadModel"),
("fnet", "FNetForMaskedLM"),
Expand Down Expand Up @@ -1339,6 +1342,7 @@ class _BaseModelWithGenerate(PreTrainedModel, GenerationMixin):
("electra", "ElectraForSequenceClassification"),
("ernie", "ErnieForSequenceClassification"),
("esm", "EsmForSequenceClassification"),
("esmc", "ESMCForSequenceClassification"),
("eurobert", "EuroBertForSequenceClassification"),
("exaone4", "Exaone4ForSequenceClassification"),
("falcon", "FalconForSequenceClassification"),
Expand Down Expand Up @@ -1568,6 +1572,7 @@ class _BaseModelWithGenerate(PreTrainedModel, GenerationMixin):
("electra", "ElectraForTokenClassification"),
("ernie", "ErnieForTokenClassification"),
("esm", "EsmForTokenClassification"),
("esmc", "ESMCForTokenClassification"),
("eurobert", "EuroBertForTokenClassification"),
("exaone4", "Exaone4ForTokenClassification"),
("falcon", "FalconForTokenClassification"),
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/models/auto/tokenization_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
("emu3", "GPT2Tokenizer" if is_tokenizers_available() else None),
("ernie", "BertTokenizer" if is_tokenizers_available() else None),
("esm", "EsmTokenizer"),
("esmc", "ESMCTokenizer" if is_tokenizers_available() else None),
("esmfold2", "ESMCTokenizer" if is_tokenizers_available() else None),
("falcon_mamba", "GPTNeoXTokenizer" if is_tokenizers_available() else None),
("fastspeech2_conformer", "FastSpeech2ConformerTokenizer" if is_g2p_en_available() else None),
("flaubert", "FlaubertTokenizer"),
Expand Down
28 changes: 28 additions & 0 deletions src/transformers/models/esmc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2026 Biohub. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

from ...utils import _LazyModule
from ...utils.import_utils import define_import_structure


if TYPE_CHECKING:
from .configuration_esmc import *
from .modeling_esmc import *
from .tokenization_esmc import *
else:
import sys

_file = globals()["__file__"]
sys.modules[__name__] = _LazyModule(__name__, _file, define_import_structure(_file), module_spec=__spec__)
Loading
Loading