Instructions to use claritylab/MARS-Encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use claritylab/MARS-Encoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="claritylab/MARS-Encoder")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("claritylab/MARS-Encoder") model = AutoModelForSequenceClassification.from_pretrained("claritylab/MARS-Encoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
04a5f96
1
Parent(s): 4f17fc0
Added initial version of MARS Encoder
Browse filesFiles changed (8)
- CECorrelationEvaluator_qr-dev_results.csvAdded+5
- README.md+19
- config.jsonAdded+32
- merges.txtAdded
- pytorch_model.binAdded+3
- special_tokens_map.jsonAdded+1
- tokenizer_config.jsonAdded+1
- vocab.jsonAdded
12345epoch,steps,Pearson_Correlation,Spearman_Correlation
0,-1,0.7995245439207993,0.6101085726851492
1,-1,0.818848196591943,0.6125101699388535
2,-1,0.8218412832248984,0.6127352398765499
3,-1,0.8060285162981113,0.6111382204076435123---license: cc---12345678910111213141516171819202122---license: cc---# MARS Encoder for Multi-agent Response SelectionThis model was trained using [SentenceTransformers](https://sbert.net) [Cross-Encoder](https://www.sbert.net/examples/applications/cross-encoder/README.html) class and is the model used in the paper [One Agent To Rule Them All: Towards Multi-agent Conversational AI](https://csclarke.com/assets/pdf/ACL_2022.pdf).## Training DataThis model was trained on the [BBAI dataset](https://github.com/ChrisIsKing/black-box-multi-agent-integation/tree/main/data). The model will predict a score between 0 and 1 ranking the correctness of a response to a user question from a conversational agent.## Usage and PerformancePre-trained models can be used like this:```from sentence_transformers import CrossEncodermodel = CrossEncoder('csclarke/MARS-Encoder')scores = model.predict([('question 1', 'response 1'), ('question 1', 'response 2')])```The model will predict scores for the pairs `('question 1', 'response 1'')` and `('question 1', 'response 2')`.You can use this model also without sentence_transformers and by just using Transformers ``AutoModel`` class
1234567891011121314151617181920212223242526272829303132{ "_name_or_path": "roberta-base", "architectures": [ "RobertaForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 0, "eos_token_id": 2, "gradient_checkpointing": false, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "id2label": { "0": "LABEL_0" }, "initializer_range": 0.02, "intermediate_size": 3072, "label2id": { "LABEL_0": 0 }, "layer_norm_eps": 1e-05, "max_position_embeddings": 514, "model_type": "roberta", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 1, "position_embedding_type": "absolute", "transformers_version": "4.5.1", "type_vocab_size": 1, "use_cache": true, "vocab_size": 50265}123version https://git-lfs.github.com/spec/v1oid sha256:505f2b7f37e557aea3a7ae652ad519ebefd9712473143f234ca8cbd8febb3a94size 4986740981{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}1{"unk_token": "<unk>", "bos_token": "<s>", "eos_token": "</s>", "add_prefix_space": false, "errors": "replace", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": "<mask>", "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "roberta-base"}CECorrelationEvaluator_qr-dev_results.csvAdded+5
README.md+19
config.jsonAdded+32
merges.txtAdded
pytorch_model.binAdded+3
special_tokens_map.jsonAdded+1
tokenizer_config.jsonAdded+1
vocab.jsonAdded