-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Cohere Model Release #29622
Merged
Merged
Cohere Model Release #29622
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6e73900
Cohere Model Release (#1)
saurabhdash2512 67c4a9b
Remove unnecessary files and code (#2)
saurabhdash2512 0bc7cf9
Delete cohere-model directory (#3)
saurabhdash2512 f964504
Make Fix (#5)
saurabhdash2512 9c867c5
Pr fixes (#6)
ahmetustun 04d96fd
Merge branch 'huggingface:main' into main
saurabhdash2512 115f198
Tokenizer test (#8)
ahmetustun cacb8ae
Adding Docs and other minor changes (#7)
saurabhdash2512 d959443
Merge branch 'huggingface:main' into main
saurabhdash2512 82a0f3b
Add modeling tests (#9)
saurabhdash2512 ef6ed3d
Smol Fix (#11)
saurabhdash2512 aa2f878
Merge branch 'huggingface:main' into main
saurabhdash2512 c86b184
tokenization tests are fixed
ahmetustun 09cd02f
Merge branch 'main' into tokenization_tests
ahmetustun e7567ca
format fixes
ahmetustun cf86bba
Merge pull request #12 from saurabhdash2512/tokenization_tests
ahmetustun 62822c8
fix pr doc tests
ahmetustun 43ae26e
fix pr doc tests
ahmetustun aeac596
Merge branch 'tokenization_tests'
ahmetustun d1dd3e1
fix pr doc tests
ahmetustun 6faf117
fix pr style check
ahmetustun c841cc7
small changes in cohere.md
saurabhdash2512 966ec9c
FIX: Address final comments for transformers integration (#13)
younesbelkada aeb5908
Merge branch 'huggingface:main' into main
saurabhdash2512 bb7f728
fix modeling cohere (#14)
younesbelkada 24a2227
Update chat templates to use the new API (#15)
Rocketknight1 24a746e
Merge branch 'huggingface:main' into main
saurabhdash2512 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -310,6 +310,8 @@ | |
title: CodeGen | ||
- local: model_doc/code_llama | ||
title: CodeLlama | ||
- local: model_doc/cohere | ||
title: Cohere | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The cohere doc page is missing |
||
- local: model_doc/convbert | ||
title: ConvBERT | ||
- local: model_doc/cpm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
clvp, | ||
code_llama, | ||
codegen, | ||
cohere, | ||
conditional_detr, | ||
convbert, | ||
convnext, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -106,6 +106,12 @@ | |||||
), | ||||||
), | ||||||
("canine", ("CanineTokenizer", None)), | ||||||
( | ||||||
"cohere", | ||||||
( | ||||||
"CohereTokenizerFast" if is_tokenizers_available() else None, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
), | ||||||
), | ||||||
("chinese_clip", ("BertTokenizer", "BertTokenizerFast" if is_tokenizers_available() else None)), | ||||||
( | ||||||
"clap", | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 2024 Cohere and The HuggingFace Inc. 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. | ||
from typing import TYPE_CHECKING | ||
|
||
from ...utils import ( | ||
OptionalDependencyNotAvailable, | ||
_LazyModule, | ||
is_sentencepiece_available, | ||
is_tokenizers_available, | ||
is_torch_available, | ||
) | ||
|
||
|
||
_import_structure = { | ||
"configuration_cohere": ["COHERE_PRETRAINED_CONFIG_ARCHIVE_MAP", "CohereConfig"], | ||
} | ||
|
||
|
||
try: | ||
if not is_tokenizers_available(): | ||
raise OptionalDependencyNotAvailable() | ||
except OptionalDependencyNotAvailable: | ||
pass | ||
else: | ||
_import_structure["tokenization_cohere_fast"] = ["CohereTokenizerFast"] | ||
|
||
try: | ||
if not is_torch_available(): | ||
raise OptionalDependencyNotAvailable() | ||
except OptionalDependencyNotAvailable: | ||
pass | ||
else: | ||
_import_structure["modeling_cohere"] = [ | ||
"CohereForCausalLM", | ||
"CohereModel", | ||
"CoherePreTrainedModel", | ||
] | ||
|
||
|
||
if TYPE_CHECKING: | ||
from .configuration_cohere import COHERE_PRETRAINED_CONFIG_ARCHIVE_MAP, CohereConfig | ||
|
||
|
||
try: | ||
if not is_tokenizers_available(): | ||
raise OptionalDependencyNotAvailable() | ||
except OptionalDependencyNotAvailable: | ||
pass | ||
else: | ||
from .tokenization_cohere_fast import CohereTokenizerFast | ||
|
||
try: | ||
if not is_torch_available(): | ||
raise OptionalDependencyNotAvailable() | ||
except OptionalDependencyNotAvailable: | ||
pass | ||
else: | ||
from .modeling_cohere import ( | ||
CohereForCausalLM, | ||
CohereModel, | ||
CoherePreTrainedModel, | ||
) | ||
|
||
else: | ||
import sys | ||
|
||
sys.modules[__name__] = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to run
make fix-copies
to propagate these changes to all other READMEs