Run this model with HF Jobs
Run DhanasriArul/Model2vec 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/DhanasriArul/Model2vec. 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/DhanasriArul/Model2vec 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 DhanasriArul/Model2vec with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use DhanasriArul/Model2vec with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("DhanasriArul/Model2vec") embeddings = model.encode(["It's dangerous to go alone!", "It's a secret to everybody."]) print(embeddings.shape) - sentence-transformers
How to use DhanasriArul/Model2vec with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DhanasriArul/Model2vec") 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 folder using huggingface_hub
Browse filesFiles changed (13)
- .gitattributes+3
- README.mdAdded+57
- config.jsonAdded+3
- model.safetensorsAdded+3
- modules.jsonAdded+14
- pipeline.skopsAdded+3
- sample_data/README.mdAdded+19
- sample_data/anscombe.jsonAdded+49
- sample_data/california_housing_test.csvAdded
- sample_data/california_housing_train.csvAdded
- sample_data/mnist_test.csvAdded+3
- sample_data/mnist_train_small.csvAdded+3
- tokenizer.jsonAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines33343536373832 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textpipeline.skops filter=lfs diff=lfs merge=lfs -textsample_data/mnist_test.csv filter=lfs diff=lfs merge=lfs -textsample_data/mnist_train_small.csv filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657---base_model: unknownlibrary_name: model2veclicense: mitmodel_name: my_classifier_pipelinetags:- embeddings- static-embeddings- sentence-transformers---
# my_classifier_pipeline Model Card
This [Model2Vec](https://github.com/MinishLab/model2vec) model is a fine-tuned version of the [unknown](https://huggingface.co/unknown) Model2Vec model. It also includes a classifier head on top.
## Installation
Install model2vec using pip:```pip install model2vec[inference]```
## UsageLoad this model using the `from_pretrained` method:```pythonfrom model2vec.inference import StaticModelPipeline
# Load a pretrained Model2Vec modelmodel = StaticModelPipeline.from_pretrained("my_classifier_pipeline")
# Predict labelspredicted = model.predict(["Example sentence"])```
## Additional Resources
- [Model2Vec Repo](https://github.com/MinishLab/model2vec)- [Model2Vec Base Models](https://huggingface.co/collections/minishlab/model2vec-base-models-66fd9dd9b7c3b3c0f25ca90e)- [Model2Vec Results](https://github.com/MinishLab/model2vec/tree/main/results)- [Model2Vec Tutorials](https://github.com/MinishLab/model2vec/tree/main/tutorials)- [Website](https://minishlab.github.io/)
## Library Authors
Model2Vec was developed by the [Minish Lab](https://github.com/MinishLab) team consisting of [Stephan Tulkens](https://github.com/stephantul) and [Thomas van Dongen](https://github.com/Pringled).
## Citation
Please cite the [Model2Vec repository](https://github.com/MinishLab/model2vec) if you use this model in your work.```@article{minishlab2024model2vec, author = {Tulkens, Stephan and {van Dongen}, Thomas}, title = {Model2Vec: Fast State-of-the-Art Static Embeddings}, year = {2024}, url = {https://github.com/MinishLab/model2vec}}```123{ "normalize": true}123version https://git-lfs.github.com/spec/v1oid sha256:865097bc1b1d5792f842bd245048d774360bd61bcc11530bd53c21af62fc300dsize 1292104561234567891011121314[ { "idx": 0, "name": "0", "path": ".", "type": "sentence_transformers.models.StaticEmbedding" }, { "idx": 1, "name": "1", "path": "1_Normalize", "type": "sentence_transformers.models.Normalize" }]123version https://git-lfs.github.com/spec/v1oid sha256:8edb2ac2d5dcea3012551bcd4503b30740af690899b715588dc56fc4addbaad1size 744046612345678910111213141516171819This directory includes a few sample datasets to get you started.
* `california_housing_data*.csv` is California housing data from the 1990 US Census; more information is available at: https://docs.google.com/document/d/e/2PACX-1vRhYtsvc5eOR2FWNCwaBiKL6suIOrxJig8LcSBbmCbyYsayia_DvPOOBlXZ4CAlQ5nlDD8kTaIDRwrN/pub
* `mnist_*.csv` is a small sample of the [MNIST database](https://en.wikipedia.org/wiki/MNIST_database), which is described at: http://yann.lecun.com/exdb/mnist/
* `anscombe.json` contains a copy of [Anscombe's quartet](https://en.wikipedia.org/wiki/Anscombe%27s_quartet); it was originally described in
Anscombe, F. J. (1973). 'Graphs in Statistical Analysis'. American Statistician. 27 (1): 17-21. JSTOR 2682899.
and our copy was prepared by the [vega_datasets library](https://github.com/altair-viz/vega_datasets/blob/4f67bdaad10f45e3549984e17e1b3088c731503d/vega_datasets/_data/anscombe.json).12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849[ {"Series":"I", "X":10.0, "Y":8.04}, {"Series":"I", "X":8.0, "Y":6.95}, {"Series":"I", "X":13.0, "Y":7.58}, {"Series":"I", "X":9.0, "Y":8.81}, {"Series":"I", "X":11.0, "Y":8.33}, {"Series":"I", "X":14.0, "Y":9.96}, {"Series":"I", "X":6.0, "Y":7.24}, {"Series":"I", "X":4.0, "Y":4.26}, {"Series":"I", "X":12.0, "Y":10.84}, {"Series":"I", "X":7.0, "Y":4.81}, {"Series":"I", "X":5.0, "Y":5.68},
{"Series":"II", "X":10.0, "Y":9.14}, {"Series":"II", "X":8.0, "Y":8.14}, {"Series":"II", "X":13.0, "Y":8.74}, {"Series":"II", "X":9.0, "Y":8.77}, {"Series":"II", "X":11.0, "Y":9.26}, {"Series":"II", "X":14.0, "Y":8.10}, {"Series":"II", "X":6.0, "Y":6.13}, {"Series":"II", "X":4.0, "Y":3.10}, {"Series":"II", "X":12.0, "Y":9.13}, {"Series":"II", "X":7.0, "Y":7.26}, {"Series":"II", "X":5.0, "Y":4.74},
{"Series":"III", "X":10.0, "Y":7.46}, {"Series":"III", "X":8.0, "Y":6.77}, {"Series":"III", "X":13.0, "Y":12.74}, {"Series":"III", "X":9.0, "Y":7.11}, {"Series":"III", "X":11.0, "Y":7.81}, {"Series":"III", "X":14.0, "Y":8.84}, {"Series":"III", "X":6.0, "Y":6.08}, {"Series":"III", "X":4.0, "Y":5.39}, {"Series":"III", "X":12.0, "Y":8.15}, {"Series":"III", "X":7.0, "Y":6.42}, {"Series":"III", "X":5.0, "Y":5.73},
{"Series":"IV", "X":8.0, "Y":6.58}, {"Series":"IV", "X":8.0, "Y":5.76}, {"Series":"IV", "X":8.0, "Y":7.71}, {"Series":"IV", "X":8.0, "Y":8.84}, {"Series":"IV", "X":8.0, "Y":8.47}, {"Series":"IV", "X":8.0, "Y":7.04}, {"Series":"IV", "X":8.0, "Y":5.25}, {"Series":"IV", "X":19.0, "Y":12.50}, {"Series":"IV", "X":8.0, "Y":5.56}, {"Series":"IV", "X":8.0, "Y":7.91}, {"Series":"IV", "X":8.0, "Y":6.89}]123version https://git-lfs.github.com/spec/v1oid sha256:51c292478d94ec3a01461bdfa82eb0885d262eb09e615679b2d69dedb6ad09e7size 18289443123version https://git-lfs.github.com/spec/v1oid sha256:1ef64781aa03180f4f5ce504314f058f5d0227277df86060473d973cf43b033esize 36523880.gitattributes+3
README.mdAdded+57
config.jsonAdded+3
model.safetensorsAdded+3
modules.jsonAdded+14
pipeline.skopsAdded+3
sample_data/README.mdAdded+19
sample_data/anscombe.jsonAdded+49
sample_data/california_housing_test.csvAdded
sample_data/california_housing_train.csvAdded
sample_data/mnist_test.csvAdded+3
sample_data/mnist_train_small.csvAdded+3
tokenizer.jsonAdded