Run this model with HF Jobs
Run cnmoro/custom-model2vec-tokenlearn-medium on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/cnmoro/custom-model2vec-tokenlearn-medium. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/cnmoro/custom-model2vec-tokenlearn-medium on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use cnmoro/custom-model2vec-tokenlearn-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use cnmoro/custom-model2vec-tokenlearn-medium with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("cnmoro/custom-model2vec-tokenlearn-medium") embeddings = model.encode(["It's dangerous to go alone!", "It's a secret to everybody."]) print(embeddings.shape) - sentence-transformers
How to use cnmoro/custom-model2vec-tokenlearn-medium with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("cnmoro/custom-model2vec-tokenlearn-medium") 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
Upload 5 files
Browse filesFiles changed (5)
- README.mdAdded+24
- config.jsonAdded+14
- model.safetensorsAdded+3
- modules.jsonAdded+14
- tokenizer.jsonAdded
123456789101112131415161718192021222324---library_name: model2veclicense: mitmodel_name: cnmoro/custom-model2vec-tokenlearn-mediumtags:- embeddings- static-embeddings- sentence-transformers---A custom model2vec model, trained using a modified version of the [tokenlearn](https://github.com/MinishLab/tokenlearn) library.
The output dimension is 256, and the vocabulary size is 249.999
The training process used a mix of English (10%) and Portuguese (90%) texts.
```pythonfrom sentence_transformers import SentenceTransformer
# Load a pretrained Sentence Transformer modelmodel = SentenceTransformer("cnmoro/custom-model2vec-tokenlearn-medium")
# Compute text embeddingsembeddings = model.encode(["Example sentence"])```1234567891011121314{ "model_type": "model2vec", "architectures": [ "StaticModel" ], "tokenizer_name": "nomic-ai/nomic-embed-text-v2-moe", "apply_pca": 256, "sif_coefficient": 0.0001, "hidden_dim": 256, "seq_length": 1000000, "normalize": true, "pooling": "mean", "embedding_dtype": "float32"}123version https://git-lfs.github.com/spec/v1oid sha256:ccec285a91720334f3f80e0a551c29dfca821d0dc3c6f75b4593da745eccd400size 2559990641234567891011121314[ { "idx": 0, "name": "0", "path": ".", "type": "sentence_transformers.models.StaticEmbedding" }, { "idx": 1, "name": "1", "path": "1_Normalize", "type": "sentence_transformers.models.Normalize" }]README.mdAdded+24
config.jsonAdded+14
model.safetensorsAdded+3
modules.jsonAdded+14
tokenizer.jsonAdded