Feature Extraction
Transformers
Safetensors
sentence-transformers
Arabic
idiolex
sentence-similarity
stylometry
dialect
idiolect
arabic
custom_code
Instructions to use AnjaliRuban/idiolex-arabertv2-ar with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AnjaliRuban/idiolex-arabertv2-ar with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="AnjaliRuban/idiolex-arabertv2-ar", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AnjaliRuban/idiolex-arabertv2-ar", trust_remote_code=True, device_map="auto") - sentence-transformers
How to use AnjaliRuban/idiolex-arabertv2-ar with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("AnjaliRuban/idiolex-arabertv2-ar", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
fix-hf-loading
#1
by neezr - opened
fixed relative imports and method overriding issues, to resolve errors when loading the model with AutoModel
to reproduce the ImportError:
from transformers import AutoModel
model = AutoModel.from_pretrained("AnjaliRuban/idiolex-arabertv2-ar", trust_remote_code=True, dtype="auto")
fixed relative imports and method overriding issues, to resolve errors when loading the model with AutoModel
to reproduce the ImportError:
from transformers import AutoModel
model = AutoModel.from_pretrained("AnjaliRuban/idiolex-arabertv2-ar", trust_remote_code=True, dtype="auto")
neezr changed pull request status to open
fixed relative imports and method overriding issues, to resolve errors when loading the model with AutoModel
to reproduce the ImportError:
from transformers import AutoModel
model = AutoModel.from_pretrained("AnjaliRuban/idiolex-arabertv2-ar", trust_remote_code=True, dtype="auto")
neezr changed pull request status to closed
neezr changed pull request status to open
AnjaliRuban changed pull request status to merged