Run this model with HF Jobs
Run lightonai/DenseOn 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/lightonai/DenseOn. 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/lightonai/DenseOn 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 lightonai/DenseOn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use lightonai/DenseOn with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("lightonai/DenseOn") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Inference
- Notebooks
- Google Colab
- Kaggle
Will there be a 8192 token input variant of DenseOn?
Wondering if there is a future plan to increase the input context window capacity?
Hey @jshree , DenseOn is based on mmBERT which supports inputs up to 8192 tokens, but we set the model context length to 512 during retrieval training. You may bump it to 8192 tokens if you prefer:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("lightonai/DenseOn")
model.max_seq_length = 8192
Nevertheless, I recommend you to use our multilingual dense model https://huggingface.co/lightonai/mDenseOn which was specifically trained for long context text. You may also consider our multilingual multi-vector model https://huggingface.co/lightonai/mLateOn if your use case allows for it, since long context performance (MLDR benchmark) is much stronger for this model.