Instructions to use HuggingFaceBio/Carbon-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceBio/Carbon-3B with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HuggingFaceBio/Carbon-3B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
tokenizer: fix decode() to handle torch tensor input via .tolist()
Browse files- tokenizer.py +2 -0
tokenizer.py
CHANGED
|
@@ -345,6 +345,8 @@ class HybridDNATokenizer(PreTrainedTokenizer):
|
|
| 345 |
skip_special_tokens: bool = False,
|
| 346 |
**kwargs
|
| 347 |
) -> str:
|
|
|
|
|
|
|
| 348 |
if isinstance(token_ids, int):
|
| 349 |
token_ids = [token_ids]
|
| 350 |
|
|
|
|
| 345 |
skip_special_tokens: bool = False,
|
| 346 |
**kwargs
|
| 347 |
) -> str:
|
| 348 |
+
if hasattr(token_ids, 'tolist'):
|
| 349 |
+
token_ids = token_ids.tolist()
|
| 350 |
if isinstance(token_ids, int):
|
| 351 |
token_ids = [token_ids]
|
| 352 |
|