Run this model with HF Jobs
Run ashercn97/hqhtml 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/ashercn97/hqhtml. 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/ashercn97/hqhtml 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 ashercn97/hqhtml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use ashercn97/hqhtml with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("ashercn97/hqhtml") embeddings = model.encode(["It's dangerous to go alone!", "It's a secret to everybody."]) print(embeddings.shape) - sentence-transformers
How to use ashercn97/hqhtml with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("ashercn97/hqhtml") 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 (7)
- .gitattributes+2
- README.mdAdded+97
- config.jsonAdded+3
- model.safetensorsAdded+3
- modules.jsonAdded+14
- pipeline.skopsAdded+3
- tokenizer.jsonAdded+3
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 lines333435363732 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 -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697---library_name: model2veclicense: mitmodel_name: tmpjibwctertags:- embeddings- static-embeddings- sentence-transformers---
# tmpjibwcter Model Card
This [Model2Vec](https://github.com/MinishLab/model2vec) model is a distilled version of a Sentence Transformer. It uses static embeddings, allowing text embeddings to be computed orders of magnitude faster on both GPU and CPU. It is designed for applications where computational resources are limited or where real-time performance is critical. Model2Vec models are the smallest, fastest, and most performant static embedders available. The distilled models are up to 50 times smaller and 500 times faster than traditional Sentence Transformers.
## Installation
Install model2vec using pip:```pip install model2vec```
## Usage
### Using Model2Vec
The [Model2Vec library](https://github.com/MinishLab/model2vec) is the fastest and most lightweight way to run Model2Vec models.
Load this model using the `from_pretrained` method:```pythonfrom model2vec import StaticModel
# Load a pretrained Model2Vec modelmodel = StaticModel.from_pretrained("tmpjibwcter")
# Compute text embeddingsembeddings = model.encode(["Example sentence"])```
### Using Sentence Transformers
You can also use the [Sentence Transformers library](https://github.com/UKPLab/sentence-transformers) to load and use the model:
```pythonfrom sentence_transformers import SentenceTransformer
# Load a pretrained Sentence Transformer modelmodel = SentenceTransformer("tmpjibwcter")
# Compute text embeddingsembeddings = model.encode(["Example sentence"])```
### Distilling a Model2Vec model
You can distill a Model2Vec model from a Sentence Transformer model using the `distill` method. First, install the `distill` extra with `pip install model2vec[distill]`. Then, run the following code:
```pythonfrom model2vec.distill import distill
# Distill a Sentence Transformer model, in this case the BAAI/bge-base-en-v1.5 modelm2v_model = distill(model_name="BAAI/bge-base-en-v1.5", pca_dims=256)
# Save the modelm2v_model.save_pretrained("m2v_model")```
## How it works
Model2vec creates a small, fast, and powerful model that outperforms other static embedding models by a large margin on all tasks we could find, while being much faster to create than traditional static embedding models such as GloVe. Best of all, you don't need any data to distill a model using Model2Vec.
It works by passing a vocabulary through a sentence transformer model, then reducing the dimensionality of the resulting embeddings using PCA, and finally weighting the embeddings using [SIF weighting](https://openreview.net/pdf?id=SyK00v5xx). During inference, we simply take the mean of all token embeddings occurring in a 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:027ddda363d3c6cc653f15b12fc1897a5bf67b51684ace84bbb3f7507e3263casize 5123615601234567891011121314[ { "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:75c5e30433ce007654343091f1f9b4b359fe592066e61f36eec280a01cd44437size 3771206123version https://git-lfs.github.com/spec/v1oid sha256:19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1size 18616131.gitattributes+2
README.mdAdded+97
config.jsonAdded+3
model.safetensorsAdded+3
modules.jsonAdded+14
pipeline.skopsAdded+3
tokenizer.jsonAdded+3