Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for nomic-ai/nomic-embed-text-v1.5 model #1874

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
65ad74a
Add nomic-bert config
bhavika May 24, 2024
34f8121
Add config
bhavika May 29, 2024
d55166c
Change opset
bhavika May 29, 2024
eb0f281
Fix typos
bhavika May 29, 2024
e93e359
Merge branch 'huggingface:main' into nomicbert
bhavika May 29, 2024
7b384c8
Merge branch 'nomicbert'
bhavika May 29, 2024
2570a3c
Add test
bhavika Jun 6, 2024
150739f
Add to config
bhavika Jun 8, 2024
985703b
Add nomic-bert to supported architectures
bhavika Jun 25, 2024
82a788f
Add test for exporter
bhavika Jun 26, 2024
06cf77e
Merge branch 'huggingface:main' into main
bhavika Jun 26, 2024
1cadbd3
remove test file
bhavika Jun 26, 2024
977fdbf
Add nomic-bert as a supported arch in test
bhavika Jun 26, 2024
0b7d459
Add nomic-bert to large models tests
bhavika Jun 26, 2024
bf23abf
Merge branch 'huggingface:main' into main
bhavika Jun 27, 2024
9a6cd59
Merge branch 'huggingface:main' into nomicbert
bhavika Jun 27, 2024
e10b3e1
Stray space
bhavika Jun 27, 2024
773c567
Merge remote-tracking branch 'refs/remotes/origin/nomicbert' into nom…
bhavika Jun 27, 2024
4004ec6
Merge remote-tracking branch 'origin/main' into nomicbert
bhavika Jun 27, 2024
506735b
grammar
bhavika Jul 13, 2024
0dea6cd
Add nomic-bert repo
bhavika Jul 13, 2024
f906442
minor grammar fix
bhavika Jul 13, 2024
5ca630e
Remove nomic-bert from tests because we dont have a small version
bhavika Jul 15, 2024
801787b
Add nomic-bert to unsuppored list
bhavika Jul 15, 2024
b25bf32
Remove from unsupported
bhavika Jul 15, 2024
fe38265
Update tests to exclude nomic in tests
bhavika Jul 17, 2024
7f6a562
Modify test-custom-model
bhavika Jul 17, 2024
3fe0e46
Remove debugging statement
bhavika Jul 17, 2024
6252618
Formatting
bhavika Jul 17, 2024
ac533ca
Merge branch 'main' into nomicbert
bhavika Jul 17, 2024
dc948c6
Formatting with black
bhavika Jul 19, 2024
1b26f3f
Ruff formatting
bhavika Aug 4, 2024
35f5ea2
Remove nomic-bert as a supported arch
bhavika Aug 4, 2024
0b6aa14
Fix formatting
bhavika Sep 22, 2024
cdbf5f2
Merge branch 'huggingface:main' into nomicbert
bhavika Oct 21, 2024
974e625
Run black
bhavika Oct 21, 2024
955fb15
Remove test file
bhavika Oct 21, 2024
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: 2 additions & 2 deletions optimum/commands/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def run(self):
"Platform": platform.platform(),
"Python version": platform.python_version(),
"Huggingface_hub version": huggingface_hub.__version__,
"PyTorch version (GPU?)": f"{pt_version} (cuda availabe: {pt_cuda_available})",
"Tensorflow version (GPU?)": f"{tf_version} (cuda availabe: {tf_cuda_available})",
"PyTorch version (GPU?)": f"{pt_version} (cuda available: {pt_cuda_available})",
"Tensorflow version (GPU?)": f"{tf_version} (cuda available: {tf_cuda_available})",
}

print("\nCopy-and-paste the text below in your GitHub issue:\n")
Expand Down
4 changes: 4 additions & 0 deletions optimum/exporters/onnx/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def inputs(self) -> Dict[str, Dict[int, str]]:
}


class NomicBertOnnxConfig(BertOnnxConfig):
DEFAULT_ONNX_OPSET = 14


class AlbertOnnxConfig(BertOnnxConfig):
DEFAULT_ONNX_OPSET = 11

Expand Down
1 change: 1 addition & 0 deletions optimum/exporters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ class TasksManager:
"text2text-generation-with-past",
onnx="M2M100OnnxConfig",
),
"nomic-bert": supported_tasks_mapping("feature-extraction", onnx="NomicBertOnnxConfig"),
"nystromformer": supported_tasks_mapping(
"feature-extraction",
"fill-mask",
Expand Down
1 change: 1 addition & 0 deletions optimum/utils/normalized_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ class NormalizedConfigManager:
"mpt": MPTNormalizedTextConfig,
"mt5": T5LikeNormalizedTextConfig,
"m2m-100": BartLikeNormalizedTextConfig,
"nomic-bert": NormalizedTextConfig,
"nystromformer": NormalizedTextConfig,
"opt": NormalizedTextConfig,
"pegasus": BartLikeNormalizedTextConfig,
Expand Down
Loading