Run this model with HF Jobs
Run yosshstd/ProTrek_650M_UniRef50_protein_encoder 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/yosshstd/ProTrek_650M_UniRef50_protein_encoder. 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/yosshstd/ProTrek_650M_UniRef50_protein_encoder 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 yosshstd/ProTrek_650M_UniRef50_protein_encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use yosshstd/ProTrek_650M_UniRef50_protein_encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("yosshstd/ProTrek_650M_UniRef50_protein_encoder") 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] - Notebooks
- Google Colab
- Kaggle
Upload 12 files
Browse filesFiles changed (12)
- 1_Pooling/config.jsonAdded+10
- 2_Dense/config.jsonAdded+6
- 2_Dense/model.safetensorsAdded+3
- README.md+145-3
- config.jsonAdded+29
- config_sentence_transformers.jsonAdded+14
- model.safetensorsAdded+3
- modules.jsonAdded+26
- sentence_bert_config.jsonAdded+4
- special_tokens_map.jsonAdded+37
- tokenizer_config.jsonAdded+53
- vocab.txtAdded+33
12345678910{ "word_embedding_dimension": 1280, "pooling_mode_cls_token": true, "pooling_mode_mean_tokens": false, "pooling_mode_max_tokens": false, "pooling_mode_mean_sqrt_len_tokens": false, "pooling_mode_weightedmean_tokens": false, "pooling_mode_lasttoken": false, "include_prompt": true}123456{ "in_features": 1280, "out_features": 1024, "bias": true, "activation_function": "torch.nn.modules.linear.Identity"}123version https://git-lfs.github.com/spec/v1oid sha256:55e087d4c903c8640f6e5c1c12ded23a4447e6de1e25d4fb15811d0c99417ec7size 5247136123123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145---
license: mit
------tags:- sentence-transformers- sentence-similarity- feature-extraction- densepipeline_tag: sentence-similaritylibrary_name: sentence-transformers---
# SentenceTransformer
This is a [sentence-transformers](https://www.SBERT.net) model trained. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
## Model Details
### Model Description- **Model Type:** Sentence Transformer<!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->- **Maximum Sequence Length:** 1026 tokens- **Output Dimensionality:** 1024 dimensions- **Similarity Function:** Cosine Similarity<!-- - **Training Dataset:** Unknown --><!-- - **Language:** Unknown --><!-- - **License:** Unknown -->
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```SentenceTransformer( (0): Transformer({'max_seq_length': 1026, 'do_lower_case': False, 'architecture': 'EsmModel'}) (1): Pooling({'word_embedding_dimension': 1280, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) (2): Dense({'in_features': 1280, 'out_features': 1024, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity'}) (3): Normalize())```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bashpip install -U sentence-transformers```
Then you can load this model and run inference.```pythonfrom sentence_transformers import SentenceTransformer
# Download from the 🤗 Hubmodel = SentenceTransformer("sentence_transformers_model_id")# Run inferencesentences = [ 'The weather is lovely today.', "It's so sunny outside!", 'He drove to the stadium.',]embeddings = model.encode(sentences)print(embeddings.shape)# [3, 1024]
# Get the similarity scores for the embeddingssimilarities = model.similarity(embeddings, embeddings)print(similarities)# tensor([[1.0000, 0.4747, 0.4651],# [0.4747, 1.0000, 0.4505],# [0.4651, 0.4505, 1.0000]])```
<!--### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>-->
<!--### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>-->
<!--### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*-->
<!--## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*-->
<!--### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*-->
## Training Details
### Framework Versions- Python: 3.11.11- Sentence Transformers: 5.0.0- Transformers: 4.53.2- PyTorch: 2.2.1+cu121- Accelerate: - Datasets: - Tokenizers: 0.21.2
## Citation
### BibTeX
<!--## Glossary
*Clearly define terms in order to be accessible across audiences.*-->
<!--## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*-->
<!--## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*-->1234567891011121314151617181920212223242526272829{ "architectures": [ "EsmModel" ], "attention_probs_dropout_prob": 0.0, "classifier_dropout": null, "emb_layer_norm_before": false, "esmfold_config": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.0, "hidden_size": 1280, "initializer_range": 0.02, "intermediate_size": 5120, "is_folding_model": false, "layer_norm_eps": 1e-05, "mask_token_id": 32, "max_position_embeddings": 1026, "model_type": "esm", "num_attention_heads": 20, "num_hidden_layers": 33, "pad_token_id": 1, "position_embedding_type": "rotary", "token_dropout": true, "torch_dtype": "float32", "transformers_version": "4.53.2", "use_cache": true, "vocab_list": null, "vocab_size": 33}1234567891011121314{ "model_type": "SentenceTransformer", "__version__": { "sentence_transformers": "5.0.0", "transformers": "4.53.2", "pytorch": "2.2.1+cu121" }, "prompts": { "query": "", "document": "" }, "default_prompt_name": null, "similarity_fn_name": "cosine"}123version https://git-lfs.github.com/spec/v1oid sha256:6f728e709d67fb443b506cc88b0522bc017ecad47ffd1940c771b9bbaeafa23fsize 26042319081234567891011121314151617181920212223242526[ { "idx": 0, "name": "0", "path": "", "type": "sentence_transformers.models.Transformer" }, { "idx": 1, "name": "1", "path": "1_Pooling", "type": "sentence_transformers.models.Pooling" }, { "idx": 2, "name": "2", "path": "2_Dense", "type": "sentence_transformers.models.Dense" }, { "idx": 3, "name": "3", "path": "3_Normalize", "type": "sentence_transformers.models.Normalize" }]1234{ "max_seq_length": 1026, "do_lower_case": false}12345678910111213141516171819202122232425262728293031323334353637{ "cls_token": { "content": "<cls>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "<eos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "mask_token": { "content": "<mask>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253{ "added_tokens_decoder": { "0": { "content": "<cls>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "<eos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32": { "content": "<mask>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "clean_up_tokenization_spaces": false, "cls_token": "<cls>", "eos_token": "<eos>", "extra_special_tokens": {}, "mask_token": "<mask>", "model_max_length": 1000000000000000019884624838656, "pad_token": "<pad>", "tokenizer_class": "EsmTokenizer", "unk_token": "<unk>"}123456789101112131415161718192021222324252627282930313233<cls><pad><eos><unk>LAGVSERTIDPKQNFYMHWCXBUZO.-<null_1><mask>1_Pooling/config.jsonAdded+10
2_Dense/config.jsonAdded+6
2_Dense/model.safetensorsAdded+3
README.md+145-3
config.jsonAdded+29
config_sentence_transformers.jsonAdded+14
model.safetensorsAdded+3
modules.jsonAdded+26
sentence_bert_config.jsonAdded+4
special_tokens_map.jsonAdded+37
tokenizer_config.jsonAdded+53
vocab.txtAdded+33