Feature Extraction
Transformers
Safetensors
English
bert
retrieval
constbert
colbert
multi-vector
embedding
custom_code
text-embeddings-inference
Instructions to use pinecone/ConstBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pinecone/ConstBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="pinecone/ConstBERT", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("pinecone/ConstBERT", trust_remote_code=True) model = AutoModel.from_pretrained("pinecone/ConstBERT", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Upload ConstBERT
Browse files- modeling.py +1 -1
modeling.py
CHANGED
|
@@ -8,7 +8,7 @@ from .tokenization_utils import QueryTokenizer, DocTokenizer
|
|
| 8 |
|
| 9 |
# this is a hack to force huggingface hub to download the tokenizer files
|
| 10 |
try:
|
| 11 |
-
with open("
|
| 12 |
pass
|
| 13 |
except Exception as e:
|
| 14 |
pass
|
|
|
|
| 8 |
|
| 9 |
# this is a hack to force huggingface hub to download the tokenizer files
|
| 10 |
try:
|
| 11 |
+
with open("constbert/tokenizer_config.json", "r") as f, open("constbert/tokenizer.json", "r") as f2, open("constbert/vocab.txt", "r") as f3:
|
| 12 |
pass
|
| 13 |
except Exception as e:
|
| 14 |
pass
|