id
stringlengths
6
113
author
stringlengths
2
36
task_category
stringclasses
42 values
tags
listlengths
1
4.05k
created_time
timestamp[ns, tz=UTC]date
2022-03-02 23:29:04
2025-04-10 08:38:38
last_modified
stringdate
2020-05-14 13:13:12
2025-04-19 04:15:39
downloads
int64
0
118M
likes
int64
0
4.86k
README
stringlengths
30
1.01M
matched_bigbio_names
listlengths
1
8
is_bionlp
stringclasses
3 values
model_cards
stringlengths
0
1M
metadata
stringlengths
2
698k
source
stringclasses
2 values
matched_task
listlengths
1
10
__index_level_0__
int64
0
46.9k
Tornaid/Embed_Reqia
Tornaid
sentence-similarity
[ "sentence-transformers", "pytorch", "tf", "rust", "safetensors", "bert", "feature-extraction", "sentence-similarity", "transformers", "en", "dataset:s2orc", "dataset:flax-sentence-embeddings/stackexchange_xml", "dataset:ms_marco", "dataset:gooaq", "dataset:yahoo_answers_topics", "dataset:code_search_net", "dataset:search_qa", "dataset:eli5", "dataset:snli", "dataset:multi_nli", "dataset:wikihow", "dataset:natural_questions", "dataset:trivia_qa", "dataset:embedding-data/sentence-compression", "dataset:embedding-data/flickr30k-captions", "dataset:embedding-data/altlex", "dataset:embedding-data/simple-wiki", "dataset:embedding-data/QQP", "dataset:embedding-data/SPECTER", "dataset:embedding-data/PAQ_pairs", "dataset:embedding-data/WikiAnswers", "arxiv:1904.06472", "arxiv:2102.07033", "arxiv:2104.08727", "arxiv:1704.05179", "arxiv:1810.09305", "license:apache-2.0", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-04-08T12:55:32Z
2024-04-08T13:08:37+00:00
10
0
--- datasets: - s2orc - flax-sentence-embeddings/stackexchange_xml - ms_marco - gooaq - yahoo_answers_topics - code_search_net - search_qa - eli5 - snli - multi_nli - wikihow - natural_questions - trivia_qa - embedding-data/sentence-compression - embedding-data/flickr30k-captions - embedding-data/altlex - embedding-data/simple-wiki - embedding-data/QQP - embedding-data/SPECTER - embedding-data/PAQ_pairs - embedding-data/WikiAnswers language: en library_name: sentence-transformers license: apache-2.0 pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # all-MiniLM-L6-v2 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch import torch.nn.functional as F #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2') model = AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-v2') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) # Normalize embeddings sentence_embeddings = F.normalize(sentence_embeddings, p=2, dim=1) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/all-MiniLM-L6-v2) ------ ## Background The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We used the pretrained [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-H384-uncased) model and fine-tuned in on a 1B sentence pairs dataset. We use a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset. We developed this model during the [Community week using JAX/Flax for NLP & CV](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104), organized by Hugging Face. We developed this model as part of the project: [Train the Best Sentence Embedding Model Ever with 1B Training Pairs](https://discuss.huggingface.co/t/train-the-best-sentence-embedding-model-ever-with-1b-training-pairs/7354). We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as intervention from Googles Flax, JAX, and Cloud team member about efficient deep learning frameworks. ## Intended uses Our model is intended to be used as a sentence and short paragraph encoder. Given an input text, it outputs a vector which captures the semantic information. The sentence vector may be used for information retrieval, clustering or sentence similarity tasks. By default, input text longer than 256 word pieces is truncated. ## Training procedure ### Pre-training We use the pretrained [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-H384-uncased) model. Please refer to the model card for more detailed information about the pre-training procedure. ### Fine-tuning We fine-tune the model using a contrastive objective. Formally, we compute the cosine similarity from each possible sentence pairs from the batch. We then apply the cross entropy loss by comparing with true pairs. #### Hyper parameters We trained our model on a TPU v3-8. We train the model during 100k steps using a batch size of 1024 (128 per TPU core). We use a learning rate warm up of 500. The sequence length was limited to 128 tokens. We used the AdamW optimizer with a 2e-5 learning rate. The full training script is accessible in this current repository: `train_script.py`. #### Training data We use the concatenation from multiple datasets to fine-tune our model. The total number of sentence pairs is above 1 billion sentences. We sampled each dataset given a weighted probability which configuration is detailed in the `data_config.json` file. | Dataset | Paper | Number of training tuples | |--------------------------------------------------------|:----------------------------------------:|:--------------------------:| | [Reddit comments (2015-2018)](https://github.com/PolyAI-LDN/conversational-datasets/tree/master/reddit) | [paper](https://arxiv.org/abs/1904.06472) | 726,484,430 | | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Abstracts) | [paper](https://aclanthology.org/2020.acl-main.447/) | 116,288,806 | | [WikiAnswers](https://github.com/afader/oqa#wikianswers-corpus) Duplicate question pairs | [paper](https://doi.org/10.1145/2623330.2623677) | 77,427,422 | | [PAQ](https://github.com/facebookresearch/PAQ) (Question, Answer) pairs | [paper](https://arxiv.org/abs/2102.07033) | 64,371,441 | | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Titles) | [paper](https://aclanthology.org/2020.acl-main.447/) | 52,603,982 | | [S2ORC](https://github.com/allenai/s2orc) (Title, Abstract) | [paper](https://aclanthology.org/2020.acl-main.447/) | 41,769,185 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Body) pairs | - | 25,316,456 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title+Body, Answer) pairs | - | 21,396,559 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Answer) pairs | - | 21,396,559 | | [MS MARCO](https://microsoft.github.io/msmarco/) triplets | [paper](https://doi.org/10.1145/3404835.3462804) | 9,144,553 | | [GOOAQ: Open Question Answering with Diverse Answer Types](https://github.com/allenai/gooaq) | [paper](https://arxiv.org/pdf/2104.08727.pdf) | 3,012,496 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 1,198,260 | | [Code Search](https://huggingface.co/datasets/code_search_net) | - | 1,151,414 | | [COCO](https://cocodataset.org/#home) Image captions | [paper](https://link.springer.com/chapter/10.1007%2F978-3-319-10602-1_48) | 828,395| | [SPECTER](https://github.com/allenai/specter) citation triplets | [paper](https://doi.org/10.18653/v1/2020.acl-main.207) | 684,100 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Question, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 681,164 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Question) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 659,896 | | [SearchQA](https://huggingface.co/datasets/search_qa) | [paper](https://arxiv.org/abs/1704.05179) | 582,261 | | [Eli5](https://huggingface.co/datasets/eli5) | [paper](https://doi.org/10.18653/v1/p19-1346) | 325,475 | | [Flickr 30k](https://shannon.cs.illinois.edu/DenotationGraph/) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/229/33) | 317,695 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles) | | 304,525 | | AllNLI ([SNLI](https://nlp.stanford.edu/projects/snli/) and [MultiNLI](https://cims.nyu.edu/~sbowman/multinli/) | [paper SNLI](https://doi.org/10.18653/v1/d15-1075), [paper MultiNLI](https://doi.org/10.18653/v1/n18-1101) | 277,230 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (bodies) | | 250,519 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles+bodies) | | 250,460 | | [Sentence Compression](https://github.com/google-research-datasets/sentence-compression) | [paper](https://www.aclweb.org/anthology/D13-1155/) | 180,000 | | [Wikihow](https://github.com/pvl/wikihow_pairs_dataset) | [paper](https://arxiv.org/abs/1810.09305) | 128,542 | | [Altlex](https://github.com/chridey/altlex/) | [paper](https://aclanthology.org/P16-1135.pdf) | 112,696 | | [Quora Question Triplets](https://quoradata.quora.com/First-Quora-Dataset-Release-Question-Pairs) | - | 103,663 | | [Simple Wikipedia](https://cs.pomona.edu/~dkauchak/simplification/) | [paper](https://www.aclweb.org/anthology/P11-2117/) | 102,225 | | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/1455) | 100,231 | | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | [paper](https://aclanthology.org/P18-2124.pdf) | 87,599 | | [TriviaQA](https://huggingface.co/datasets/trivia_qa) | - | 73,346 | | **Total** | | **1,170,060,424** |
null
Non_BioNLP
# all-MiniLM-L6-v2 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch import torch.nn.functional as F #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2') model = AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-v2') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) # Normalize embeddings sentence_embeddings = F.normalize(sentence_embeddings, p=2, dim=1) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/all-MiniLM-L6-v2) ------ ## Background The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We used the pretrained [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-H384-uncased) model and fine-tuned in on a 1B sentence pairs dataset. We use a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset. We developed this model during the [Community week using JAX/Flax for NLP & CV](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104), organized by Hugging Face. We developed this model as part of the project: [Train the Best Sentence Embedding Model Ever with 1B Training Pairs](https://discuss.huggingface.co/t/train-the-best-sentence-embedding-model-ever-with-1b-training-pairs/7354). We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as intervention from Googles Flax, JAX, and Cloud team member about efficient deep learning frameworks. ## Intended uses Our model is intended to be used as a sentence and short paragraph encoder. Given an input text, it outputs a vector which captures the semantic information. The sentence vector may be used for information retrieval, clustering or sentence similarity tasks. By default, input text longer than 256 word pieces is truncated. ## Training procedure ### Pre-training We use the pretrained [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-H384-uncased) model. Please refer to the model card for more detailed information about the pre-training procedure. ### Fine-tuning We fine-tune the model using a contrastive objective. Formally, we compute the cosine similarity from each possible sentence pairs from the batch. We then apply the cross entropy loss by comparing with true pairs. #### Hyper parameters We trained our model on a TPU v3-8. We train the model during 100k steps using a batch size of 1024 (128 per TPU core). We use a learning rate warm up of 500. The sequence length was limited to 128 tokens. We used the AdamW optimizer with a 2e-5 learning rate. The full training script is accessible in this current repository: `train_script.py`. #### Training data We use the concatenation from multiple datasets to fine-tune our model. The total number of sentence pairs is above 1 billion sentences. We sampled each dataset given a weighted probability which configuration is detailed in the `data_config.json` file. | Dataset | Paper | Number of training tuples | |--------------------------------------------------------|:----------------------------------------:|:--------------------------:| | [Reddit comments (2015-2018)](https://github.com/PolyAI-LDN/conversational-datasets/tree/master/reddit) | [paper](https://arxiv.org/abs/1904.06472) | 726,484,430 | | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Abstracts) | [paper](https://aclanthology.org/2020.acl-main.447/) | 116,288,806 | | [WikiAnswers](https://github.com/afader/oqa#wikianswers-corpus) Duplicate question pairs | [paper](https://doi.org/10.1145/2623330.2623677) | 77,427,422 | | [PAQ](https://github.com/facebookresearch/PAQ) (Question, Answer) pairs | [paper](https://arxiv.org/abs/2102.07033) | 64,371,441 | | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Titles) | [paper](https://aclanthology.org/2020.acl-main.447/) | 52,603,982 | | [S2ORC](https://github.com/allenai/s2orc) (Title, Abstract) | [paper](https://aclanthology.org/2020.acl-main.447/) | 41,769,185 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Body) pairs | - | 25,316,456 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title+Body, Answer) pairs | - | 21,396,559 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Answer) pairs | - | 21,396,559 | | [MS MARCO](https://microsoft.github.io/msmarco/) triplets | [paper](https://doi.org/10.1145/3404835.3462804) | 9,144,553 | | [GOOAQ: Open Question Answering with Diverse Answer Types](https://github.com/allenai/gooaq) | [paper](https://arxiv.org/pdf/2104.08727.pdf) | 3,012,496 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 1,198,260 | | [Code Search](https://huggingface.co/datasets/code_search_net) | - | 1,151,414 | | [COCO](https://cocodataset.org/#home) Image captions | [paper](https://link.springer.com/chapter/10.1007%2F978-3-319-10602-1_48) | 828,395| | [SPECTER](https://github.com/allenai/specter) citation triplets | [paper](https://doi.org/10.18653/v1/2020.acl-main.207) | 684,100 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Question, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 681,164 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Question) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 659,896 | | [SearchQA](https://huggingface.co/datasets/search_qa) | [paper](https://arxiv.org/abs/1704.05179) | 582,261 | | [Eli5](https://huggingface.co/datasets/eli5) | [paper](https://doi.org/10.18653/v1/p19-1346) | 325,475 | | [Flickr 30k](https://shannon.cs.illinois.edu/DenotationGraph/) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/229/33) | 317,695 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles) | | 304,525 | | AllNLI ([SNLI](https://nlp.stanford.edu/projects/snli/) and [MultiNLI](https://cims.nyu.edu/~sbowman/multinli/) | [paper SNLI](https://doi.org/10.18653/v1/d15-1075), [paper MultiNLI](https://doi.org/10.18653/v1/n18-1101) | 277,230 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (bodies) | | 250,519 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles+bodies) | | 250,460 | | [Sentence Compression](https://github.com/google-research-datasets/sentence-compression) | [paper](https://www.aclweb.org/anthology/D13-1155/) | 180,000 | | [Wikihow](https://github.com/pvl/wikihow_pairs_dataset) | [paper](https://arxiv.org/abs/1810.09305) | 128,542 | | [Altlex](https://github.com/chridey/altlex/) | [paper](https://aclanthology.org/P16-1135.pdf) | 112,696 | | [Quora Question Triplets](https://quoradata.quora.com/First-Quora-Dataset-Release-Question-Pairs) | - | 103,663 | | [Simple Wikipedia](https://cs.pomona.edu/~dkauchak/simplification/) | [paper](https://www.aclweb.org/anthology/P11-2117/) | 102,225 | | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/1455) | 100,231 | | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | [paper](https://aclanthology.org/P18-2124.pdf) | 87,599 | | [TriviaQA](https://huggingface.co/datasets/trivia_qa) | - | 73,346 | | **Total** | | **1,170,060,424** |
{"datasets": ["s2orc", "flax-sentence-embeddings/stackexchange_xml", "ms_marco", "gooaq", "yahoo_answers_topics", "code_search_net", "search_qa", "eli5", "snli", "multi_nli", "wikihow", "natural_questions", "trivia_qa", "embedding-data/sentence-compression", "embedding-data/flickr30k-captions", "embedding-data/altlex", "embedding-data/simple-wiki", "embedding-data/QQP", "embedding-data/SPECTER", "embedding-data/PAQ_pairs", "embedding-data/WikiAnswers"], "language": "en", "library_name": "sentence-transformers", "license": "apache-2.0", "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "feature-extraction", "sentence-similarity", "transformers"]}
task
[ "QUESTION_ANSWERING" ]
46,416
cassador/2bs32lr2
cassador
sentence-similarity
[ "sentence-transformers", "safetensors", "bert", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:6915", "loss:SoftmaxLoss", "id", "dataset:afaji/indonli", "arxiv:1908.10084", "base_model:indobenchmark/indobert-base-p2", "base_model:finetune:indobenchmark/indobert-base-p2", "model-index", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-06-29T16:06:30Z
2024-06-29T16:07:10+00:00
54
0
--- base_model: indobenchmark/indobert-base-p2 datasets: - afaji/indonli language: - id library_name: sentence-transformers metrics: - pearson_cosine - spearman_cosine - pearson_manhattan - spearman_manhattan - pearson_euclidean - spearman_euclidean - pearson_dot - spearman_dot - pearson_max - spearman_max pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:6915 - loss:SoftmaxLoss widget: - source_sentence: Pesta Olahraga Asia Tenggara atau Southeast Asian Games, biasa disingkat SEA Games, adalah ajang olahraga yang diadakan setiap dua tahun dan melibatkan 11 negara Asia Tenggara. sentences: - Sekarang tahun 2017. - Warna kulit tidak mempengaruhi waktu berjemur yang baik untuk mengatifkan pro-vitamin D3. - Pesta Olahraga Asia Tenggara diadakan setiap tahun. - source_sentence: Menjalani aktivitas Ramadhan di tengah wabah Corona tentunya tidak mudah. sentences: - Tidak ada observasi yang pernah dilansir oleh Business Insider. - Wabah Corona membuat aktivitas Ramadhan tidak mudah dijalani. - Piala Sudirman pertama digelar pada tahun 1989. - source_sentence: Dalam bidang politik, partai ini memperjuangkan agar kekuasaan sepenuhnya berada di tangan rakyat. sentences: - Galileo tidak berhasil mengetes hasil dari Hukum Inert. - Kudeta 14 Februari 1946 gagal merebut kekuasaan Belanda. - Partai ini berusaha agar kekuasaan sepenuhnya berada di tangan rakyat. - source_sentence: Keluarga mendiang Prince menuduh layanan musik streaming Tidal memasukkan karya milik sang penyanyi legendaris tanpa izin . sentences: - Rosier adalah pelayan setia Lord Voldemort. - Bangunan ini digunakan untuk penjualan. - Keluarga mendiang Prince sudah memberi izin kepada TImbal untuk menggunakan lagu milik Prince. - source_sentence: Tujuan dari acara dengar pendapat CRTC adalah untuk mengumpulkan respons dari pada pemangku kepentingan industri ini dan dari masyarakat umum. sentences: - Pembuat Rooms hanya bisa membuat meeting yang terbuka. - Masyarakat umum dilibatkan untuk memberikan respon dalam acara dengar pendapat CRTC. - Eminem dirasa tidak akan memulai kembali kariernya tahun ini. model-index: - name: SentenceTransformer based on indobenchmark/indobert-base-p2 results: - task: type: semantic-similarity name: Semantic Similarity dataset: name: sts dev type: sts-dev metrics: - type: pearson_cosine value: 0.5829898836235055 name: Pearson Cosine - type: spearman_cosine value: 0.5604880880211627 name: Spearman Cosine - type: pearson_manhattan value: 0.5703534992812126 name: Pearson Manhattan - type: spearman_manhattan value: 0.5499989364166947 name: Spearman Manhattan - type: pearson_euclidean value: 0.5753323630988341 name: Pearson Euclidean - type: spearman_euclidean value: 0.552442969754755 name: Spearman Euclidean - type: pearson_dot value: 0.5620113473718095 name: Pearson Dot - type: spearman_dot value: 0.5624324325309726 name: Spearman Dot - type: pearson_max value: 0.5829898836235055 name: Pearson Max - type: spearman_max value: 0.5624324325309726 name: Spearman Max - task: type: semantic-similarity name: Semantic Similarity dataset: name: sts test type: sts-test metrics: - type: pearson_cosine value: 0.27661444766220145 name: Pearson Cosine - type: spearman_cosine value: 0.25397061268923804 name: Spearman Cosine - type: pearson_manhattan value: 0.22893950626786405 name: Pearson Manhattan - type: spearman_manhattan value: 0.2295445814901059 name: Spearman Manhattan - type: pearson_euclidean value: 0.23773763148887356 name: Pearson Euclidean - type: spearman_euclidean value: 0.23225044424139019 name: Spearman Euclidean - type: pearson_dot value: 0.2930559400528471 name: Pearson Dot - type: spearman_dot value: 0.28163535345836893 name: Spearman Dot - type: pearson_max value: 0.2930559400528471 name: Pearson Max - type: spearman_max value: 0.28163535345836893 name: Spearman Max --- # SentenceTransformer based on indobenchmark/indobert-base-p2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [indobenchmark/indobert-base-p2](https://huggingface.co/indobenchmark/indobert-base-p2) on the [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) dataset. It maps sentences & paragraphs to a 768-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:** [indobenchmark/indobert-base-p2](https://huggingface.co/indobenchmark/indobert-base-p2) <!-- at revision 94b4e0a82081fa57f227fcc2024d1ea89b57ac1f --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 tokens - **Similarity Function:** Cosine Similarity - **Training Dataset:** - [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) - **Language:** id <!-- - **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': 512, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("cassador/2bs32lr2") # Run inference sentences = [ 'Tujuan dari acara dengar pendapat CRTC adalah untuk mengumpulkan respons dari pada pemangku kepentingan industri ini dan dari masyarakat umum.', 'Masyarakat umum dilibatkan untuk memberikan respon dalam acara dengar pendapat CRTC.', 'Pembuat Rooms hanya bisa membuat meeting yang terbuka.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Semantic Similarity * Dataset: `sts-dev` * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) | Metric | Value | |:--------------------|:-----------| | pearson_cosine | 0.583 | | **spearman_cosine** | **0.5605** | | pearson_manhattan | 0.5704 | | spearman_manhattan | 0.55 | | pearson_euclidean | 0.5753 | | spearman_euclidean | 0.5524 | | pearson_dot | 0.562 | | spearman_dot | 0.5624 | | pearson_max | 0.583 | | spearman_max | 0.5624 | #### Semantic Similarity * Dataset: `sts-test` * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) | Metric | Value | |:--------------------|:----------| | pearson_cosine | 0.2766 | | **spearman_cosine** | **0.254** | | pearson_manhattan | 0.2289 | | spearman_manhattan | 0.2295 | | pearson_euclidean | 0.2377 | | spearman_euclidean | 0.2323 | | pearson_dot | 0.2931 | | spearman_dot | 0.2816 | | pearson_max | 0.2931 | | spearman_max | 0.2816 | <!-- ## 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 ### Training Dataset #### afaji/indonli * Dataset: [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) * Size: 6,915 training samples * Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code> * Approximate statistics based on the first 1000 samples: | | premise | hypothesis | label | |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------| | type | string | string | int | | details | <ul><li>min: 12 tokens</li><li>mean: 29.26 tokens</li><li>max: 135 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.13 tokens</li><li>max: 36 tokens</li></ul> | <ul><li>0: ~51.00%</li><li>1: ~49.00%</li></ul> | * Samples: | premise | hypothesis | label | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------|:---------------| | <code>Presiden Joko Widodo (Jokowi) menyampaikan prediksi bahwa wabah virus Corona (COVID-19) di Indonesia akan selesai akhir tahun ini.</code> | <code>Prediksi akhir wabah tidak disampaikan Jokowi.</code> | <code>0</code> | | <code>Meski biasanya hanya digunakan di fasilitas kesehatan, saat ini masker dan sarung tangan sekali pakai banyak dipakai di tingkat rumah tangga.</code> | <code>Masker sekali pakai banyak dipakai di tingkat rumah tangga.</code> | <code>1</code> | | <code>Seperti namanya, paket internet sahur Telkomsel ini ditujukan bagi pengguna yang menginginkan kuota ekstra, untuk menemani momen sahur sepanjang bulan puasa.</code> | <code>Paket internet sahur tidak ditujukan untuk saat sahur.</code> | <code>0</code> | * Loss: [<code>SoftmaxLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss) ### Evaluation Dataset #### afaji/indonli * Dataset: [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) * Size: 1,556 evaluation samples * Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code> * Approximate statistics based on the first 1000 samples: | | premise | hypothesis | label | |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------| | type | string | string | int | | details | <ul><li>min: 9 tokens</li><li>mean: 28.07 tokens</li><li>max: 179 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.15 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>0: ~47.90%</li><li>1: ~52.10%</li></ul> | * Samples: | premise | hypothesis | label | |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------|:---------------| | <code>Manuskrip tersebut berisi tiga catatan yang menceritakan bagaimana peristiwa jatuhnya meteorit serta laporan kematian akibat kejadian tersebut seperti dilansir dari Science Alert, Sabtu (25/4/2020).</code> | <code>Manuskrip tersebut tidak mencatat laporan kematian.</code> | <code>0</code> | | <code>Dilansir dari Business Insider, menurut observasi dari Mauna Loa Observatory di Hawaii pada karbon dioksida (CO2) di level mencapai 410 ppm tidak langsung memberikan efek pada pernapasan, karena tubuh manusia juga masih membutuhkan CO2 dalam kadar tertentu.</code> | <code>Tidak ada observasi yang pernah dilansir oleh Business Insider.</code> | <code>0</code> | | <code>Seorang wanita asal New York mengaku sangat benci air putih.</code> | <code>Tidak ada orang dari New York yang membenci air putih.</code> | <code>0</code> | * Loss: [<code>SoftmaxLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss) ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: epoch - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `learning_rate`: 2e-05 - `num_train_epochs`: 2 - `warmup_ratio`: 0.1 - `fp16`: True #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: epoch - `prediction_loss_only`: True - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 2 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | loss | sts-dev_spearman_cosine | sts-test_spearman_cosine | |:------:|:----:|:-------------:|:------:|:-----------------------:|:------------------------:| | 0 | 0 | - | - | 0.1277 | - | | 0.4608 | 100 | 0.5694 | - | - | - | | 0.9217 | 200 | 0.4754 | - | - | - | | 1.0 | 217 | - | 0.4349 | 0.5410 | - | | 1.3825 | 300 | 0.3829 | - | - | - | | 1.8433 | 400 | 0.3507 | - | - | - | | 2.0 | 434 | - | 0.4254 | 0.5605 | 0.2540 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.41.2 - PyTorch: 2.3.0+cu121 - Accelerate: 0.31.0 - Datasets: 2.20.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers and SoftmaxLoss ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SentenceTransformer based on indobenchmark/indobert-base-p2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [indobenchmark/indobert-base-p2](https://huggingface.co/indobenchmark/indobert-base-p2) on the [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) dataset. It maps sentences & paragraphs to a 768-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:** [indobenchmark/indobert-base-p2](https://huggingface.co/indobenchmark/indobert-base-p2) <!-- at revision 94b4e0a82081fa57f227fcc2024d1ea89b57ac1f --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 tokens - **Similarity Function:** Cosine Similarity - **Training Dataset:** - [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) - **Language:** id <!-- - **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': 512, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("cassador/2bs32lr2") # Run inference sentences = [ 'Tujuan dari acara dengar pendapat CRTC adalah untuk mengumpulkan respons dari pada pemangku kepentingan industri ini dan dari masyarakat umum.', 'Masyarakat umum dilibatkan untuk memberikan respon dalam acara dengar pendapat CRTC.', 'Pembuat Rooms hanya bisa membuat meeting yang terbuka.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Semantic Similarity * Dataset: `sts-dev` * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) | Metric | Value | |:--------------------|:-----------| | pearson_cosine | 0.583 | | **spearman_cosine** | **0.5605** | | pearson_manhattan | 0.5704 | | spearman_manhattan | 0.55 | | pearson_euclidean | 0.5753 | | spearman_euclidean | 0.5524 | | pearson_dot | 0.562 | | spearman_dot | 0.5624 | | pearson_max | 0.583 | | spearman_max | 0.5624 | #### Semantic Similarity * Dataset: `sts-test` * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) | Metric | Value | |:--------------------|:----------| | pearson_cosine | 0.2766 | | **spearman_cosine** | **0.254** | | pearson_manhattan | 0.2289 | | spearman_manhattan | 0.2295 | | pearson_euclidean | 0.2377 | | spearman_euclidean | 0.2323 | | pearson_dot | 0.2931 | | spearman_dot | 0.2816 | | pearson_max | 0.2931 | | spearman_max | 0.2816 | <!-- ## 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 ### Training Dataset #### afaji/indonli * Dataset: [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) * Size: 6,915 training samples * Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code> * Approximate statistics based on the first 1000 samples: | | premise | hypothesis | label | |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------| | type | string | string | int | | details | <ul><li>min: 12 tokens</li><li>mean: 29.26 tokens</li><li>max: 135 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.13 tokens</li><li>max: 36 tokens</li></ul> | <ul><li>0: ~51.00%</li><li>1: ~49.00%</li></ul> | * Samples: | premise | hypothesis | label | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------|:---------------| | <code>Presiden Joko Widodo (Jokowi) menyampaikan prediksi bahwa wabah virus Corona (COVID-19) di Indonesia akan selesai akhir tahun ini.</code> | <code>Prediksi akhir wabah tidak disampaikan Jokowi.</code> | <code>0</code> | | <code>Meski biasanya hanya digunakan di fasilitas kesehatan, saat ini masker dan sarung tangan sekali pakai banyak dipakai di tingkat rumah tangga.</code> | <code>Masker sekali pakai banyak dipakai di tingkat rumah tangga.</code> | <code>1</code> | | <code>Seperti namanya, paket internet sahur Telkomsel ini ditujukan bagi pengguna yang menginginkan kuota ekstra, untuk menemani momen sahur sepanjang bulan puasa.</code> | <code>Paket internet sahur tidak ditujukan untuk saat sahur.</code> | <code>0</code> | * Loss: [<code>SoftmaxLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss) ### Evaluation Dataset #### afaji/indonli * Dataset: [afaji/indonli](https://huggingface.co/datasets/afaji/indonli) * Size: 1,556 evaluation samples * Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code> * Approximate statistics based on the first 1000 samples: | | premise | hypothesis | label | |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------| | type | string | string | int | | details | <ul><li>min: 9 tokens</li><li>mean: 28.07 tokens</li><li>max: 179 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.15 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>0: ~47.90%</li><li>1: ~52.10%</li></ul> | * Samples: | premise | hypothesis | label | |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------|:---------------| | <code>Manuskrip tersebut berisi tiga catatan yang menceritakan bagaimana peristiwa jatuhnya meteorit serta laporan kematian akibat kejadian tersebut seperti dilansir dari Science Alert, Sabtu (25/4/2020).</code> | <code>Manuskrip tersebut tidak mencatat laporan kematian.</code> | <code>0</code> | | <code>Dilansir dari Business Insider, menurut observasi dari Mauna Loa Observatory di Hawaii pada karbon dioksida (CO2) di level mencapai 410 ppm tidak langsung memberikan efek pada pernapasan, karena tubuh manusia juga masih membutuhkan CO2 dalam kadar tertentu.</code> | <code>Tidak ada observasi yang pernah dilansir oleh Business Insider.</code> | <code>0</code> | | <code>Seorang wanita asal New York mengaku sangat benci air putih.</code> | <code>Tidak ada orang dari New York yang membenci air putih.</code> | <code>0</code> | * Loss: [<code>SoftmaxLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss) ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: epoch - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `learning_rate`: 2e-05 - `num_train_epochs`: 2 - `warmup_ratio`: 0.1 - `fp16`: True #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: epoch - `prediction_loss_only`: True - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 2 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | loss | sts-dev_spearman_cosine | sts-test_spearman_cosine | |:------:|:----:|:-------------:|:------:|:-----------------------:|:------------------------:| | 0 | 0 | - | - | 0.1277 | - | | 0.4608 | 100 | 0.5694 | - | - | - | | 0.9217 | 200 | 0.4754 | - | - | - | | 1.0 | 217 | - | 0.4349 | 0.5410 | - | | 1.3825 | 300 | 0.3829 | - | - | - | | 1.8433 | 400 | 0.3507 | - | - | - | | 2.0 | 434 | - | 0.4254 | 0.5605 | 0.2540 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.41.2 - PyTorch: 2.3.0+cu121 - Accelerate: 0.31.0 - Datasets: 2.20.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers and SoftmaxLoss ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` <!-- ## 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.* -->
{"base_model": "indobenchmark/indobert-base-p2", "datasets": ["afaji/indonli"], "language": ["id"], "library_name": "sentence-transformers", "metrics": ["pearson_cosine", "spearman_cosine", "pearson_manhattan", "spearman_manhattan", "pearson_euclidean", "spearman_euclidean", "pearson_dot", "spearman_dot", "pearson_max", "spearman_max"], "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:6915", "loss:SoftmaxLoss"], "widget": [{"source_sentence": "Pesta Olahraga Asia Tenggara atau Southeast Asian Games, biasa disingkat SEA Games, adalah ajang olahraga yang diadakan setiap dua tahun dan melibatkan 11 negara Asia Tenggara.", "sentences": ["Sekarang tahun 2017.", "Warna kulit tidak mempengaruhi waktu berjemur yang baik untuk mengatifkan pro-vitamin D3.", "Pesta Olahraga Asia Tenggara diadakan setiap tahun."]}, {"source_sentence": "Menjalani aktivitas Ramadhan di tengah wabah Corona tentunya tidak mudah.", "sentences": ["Tidak ada observasi yang pernah dilansir oleh Business Insider.", "Wabah Corona membuat aktivitas Ramadhan tidak mudah dijalani.", "Piala Sudirman pertama digelar pada tahun 1989."]}, {"source_sentence": "Dalam bidang politik, partai ini memperjuangkan agar kekuasaan sepenuhnya berada di tangan rakyat.", "sentences": ["Galileo tidak berhasil mengetes hasil dari Hukum Inert.", "Kudeta 14 Februari 1946 gagal merebut kekuasaan Belanda.", "Partai ini berusaha agar kekuasaan sepenuhnya berada di tangan rakyat."]}, {"source_sentence": "Keluarga mendiang Prince menuduh layanan musik streaming Tidal memasukkan karya milik sang penyanyi legendaris tanpa izin .", "sentences": ["Rosier adalah pelayan setia Lord Voldemort.", "Bangunan ini digunakan untuk penjualan.", "Keluarga mendiang Prince sudah memberi izin kepada TImbal untuk menggunakan lagu milik Prince."]}, {"source_sentence": "Tujuan dari acara dengar pendapat CRTC adalah untuk mengumpulkan respons dari pada pemangku kepentingan industri ini dan dari masyarakat umum.", "sentences": ["Pembuat Rooms hanya bisa membuat meeting yang terbuka.", "Masyarakat umum dilibatkan untuk memberikan respon dalam acara dengar pendapat CRTC.", "Eminem dirasa tidak akan memulai kembali kariernya tahun ini."]}], "model-index": [{"name": "SentenceTransformer based on indobenchmark/indobert-base-p2", "results": [{"task": {"type": "semantic-similarity", "name": "Semantic Similarity"}, "dataset": {"name": "sts dev", "type": "sts-dev"}, "metrics": [{"type": "pearson_cosine", "value": 0.5829898836235055, "name": "Pearson Cosine"}, {"type": "spearman_cosine", "value": 0.5604880880211627, "name": "Spearman Cosine"}, {"type": "pearson_manhattan", "value": 0.5703534992812126, "name": "Pearson Manhattan"}, {"type": "spearman_manhattan", "value": 0.5499989364166947, "name": "Spearman Manhattan"}, {"type": "pearson_euclidean", "value": 0.5753323630988341, "name": "Pearson Euclidean"}, {"type": "spearman_euclidean", "value": 0.552442969754755, "name": "Spearman Euclidean"}, {"type": "pearson_dot", "value": 0.5620113473718095, "name": "Pearson Dot"}, {"type": "spearman_dot", "value": 0.5624324325309726, "name": "Spearman Dot"}, {"type": "pearson_max", "value": 0.5829898836235055, "name": "Pearson Max"}, {"type": "spearman_max", "value": 0.5624324325309726, "name": "Spearman Max"}]}, {"task": {"type": "semantic-similarity", "name": "Semantic Similarity"}, "dataset": {"name": "sts test", "type": "sts-test"}, "metrics": [{"type": "pearson_cosine", "value": 0.27661444766220145, "name": "Pearson Cosine"}, {"type": "spearman_cosine", "value": 0.25397061268923804, "name": "Spearman Cosine"}, {"type": "pearson_manhattan", "value": 0.22893950626786405, "name": "Pearson Manhattan"}, {"type": "spearman_manhattan", "value": 0.2295445814901059, "name": "Spearman Manhattan"}, {"type": "pearson_euclidean", "value": 0.23773763148887356, "name": "Pearson Euclidean"}, {"type": "spearman_euclidean", "value": 0.23225044424139019, "name": "Spearman Euclidean"}, {"type": "pearson_dot", "value": 0.2930559400528471, "name": "Pearson Dot"}, {"type": "spearman_dot", "value": 0.28163535345836893, "name": "Spearman Dot"}, {"type": "pearson_max", "value": 0.2930559400528471, "name": "Pearson Max"}, {"type": "spearman_max", "value": 0.28163535345836893, "name": "Spearman Max"}]}]}]}
task
[ "TEXT_CLASSIFICATION", "SEMANTIC_SIMILARITY" ]
46,417
nickmuchi/finbert-tone-finetuned-finance-topic-classification
nickmuchi
text-classification
[ "transformers", "pytorch", "tensorboard", "bert", "text-classification", "generated_from_trainer", "twitter-financial-topic-classification", "financial", "stocks", "twitter", "dataset:zeroshot/twitter-financial-news-topic", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-12-30T16:22:43Z
2023-07-12T16:41:11+00:00
243
67
--- datasets: - zeroshot/twitter-financial-news-topic metrics: - accuracy - f1 - precision - recall pipeline_tag: text-classification tags: - generated_from_trainer - twitter-financial-topic-classification - financial - stocks - twitter widget: - text: 'Here are Thursday''s biggest analyst calls: Apple, Amazon, Tesla, Palantir, DocuSign, Exxon &amp; more' example_title: Analyst Update' - text: 'LIVE: ECB surprises with 50bps hike, ending its negative rate era. President Christine Lagarde is taking questions ' example_title: Fed | Central Banks - text: Goldman Sachs traders countered the industry’s underwriting slump with revenue gains that raced past analysts’ estimates. The trading operation posted a 32% surge in second-quarter revenue that included another banner period for fixed income example_title: Company | Product News - text: China Evergrande Group’s onshore bond holders rejected a plan by the distressed developer to further extend a bond payment which was due on Friday. Rebecca Choong Wilkins reports on Bloomberg Television example_title: Treasuries | Corporate Debt - text: 'Investing Club: Morgan Stanley''s dividend, buyback pay us for our patience after quarterly missteps' example_title: Dividend - text: 'Investing Club: Our takes on Amazon and Apple heading into next week''s earnings reports' example_title: Earnings - text: 'JUST RELEASED: Oil Price Dynamics Report → Over the past week, oil prices decreased as supply expectations rose and anticipated demand remained unchanged.' example_title: Energy | Oil - text: Delta Air Lines fell short of profit expectations in the second quarter and said high operating costs will persist through the rest of the year. Bloomberg Opinion's Brooke Sutherland has more on 'Bloomberg Markets' example_title: Financials - text: 'BREAKING: The Indian rupee plummets to a record 80 per US dollar as foreign investors pull out money from the nation''s stocks' example_title: Currencies - text: Twitter and Elon Musk are now in a high stakes/high risk situation, one analyst said. example_title: General News | Opinion - text: Copper prices are signaling that investors are bearish on the economy, strategist says example_title: Gold | Metals | Materials - text: Johnson & Johnson CFO Joe Wolk says the company is positioned for the long term and the plans for its consumer operations include an IPO. He speaks on 'Bloomberg Markets' example_title: IPO - text: Company and Elon Musk are set for a blockbuster courtroom battle over Musk’s attempt to terminate his $44 billion acquisition deal for $TWTR, according to Wedbush analyst Dan Ives. example_title: Legal | Regulation - text: Amazon to buy primary health care provider One Medical for roughly $3.9 billion example_title: M&A | Investments - text: 'Barclays Senior Analyst For Equity Research Jason Goldberg: ''Price expectations have changed.'''' The global markets business recorded $6.47 billion of revenue in the quarter with rates, commodities and currencies helping drive the fixed-income gains.' example_title: Macro - text: US stocks push higher in a volatile session. We break it down on The Countdown to The Close example_title: Markets - text: Zelenskyy fires security chiefs over ‘treasonous’ officials example_title: Politics - text: Airbnb co-founder Joe Gebbia is stepping down example_title: Personnel Change - text: French power group EDF requests its shares be suspended example_title: Stock Commentary - text: 'JUST IN: Alibaba shares slide as much as 5.7%, bringing this week''s slump to over 15%, after it reportedly faced a data-theft inquiry' example_title: Stock Movement model-index: - name: finbert-tone-finetuned-finance-topic-classification results: - task: type: text-classification name: Text Classification dataset: name: twitter-financial-news-topic type: finance metrics: - type: F1 value: 0.910647 name: F1 - type: accuracy value: 0.910615 name: accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # finbert-tone-finetuned-finance-topic-classification This model is a fine-tuned version of [yiyanghkust/finbert-tone](https://huggingface.co/yiyanghkust/finbert-tone) on [Twitter Financial News Topic](https://huggingface.co/datasets/zeroshot/twitter-financial-news-topic) dataset. It achieves the following results on the evaluation set: - Loss: 0.509021 - Accuracy: 0.910615 - F1: 0.910647 - Precision: 0.911335 - Recall: 0.910615 ## Model description Model determines the financial topic of given tweets over 20 various topics. Given the unbalanced distribution of the class labels, the weights were adjusted to pay attention to the less sampled labels which should increase overall performance.. ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:| | No log | 1.0 | 266 | 0.5152 | 0.8552 | 0.8504 | 0.8508 | 0.8552 | | 0.7618 | 2.0 | 532 | 0.3999 | 0.8790 | 0.8781 | 0.8842 | 0.8790 | | 0.7618 | 3.0 | 798 | 0.3628 | 0.8943 | 0.8940 | 0.8958 | 0.8943 | | 0.16 | 4.0 | 1064 | 0.3776 | 0.8997 | 0.9001 | 0.9025 | 0.8997 | | 0.16 | 5.0 | 1330 | 0.4286 | 0.8999 | 0.9002 | 0.9022 | 0.8999 | | 0.058 | 6.0 | 1596 | 0.4500 | 0.9043 | 0.9042 | 0.9055 | 0.9043 | | 0.058 | 7.0 | 1862 | 0.4689 | 0.9021 | 0.9017 | 0.9026 | 0.9021 | | 0.0267 | 8.0 | 2128 | 0.4918 | 0.9031 | 0.9029 | 0.9039 | 0.9031 | | 0.0267 | 9.0 | 2394 | 0.5030 | 0.9048 | 0.9049 | 0.9060 | 0.9048 | | 0.0177 | 10.0 | 2660 | 0.5052 | 0.9033 | 0.9034 | 0.9044 | 0.9033 | | 0.0177 | 11.0 | 2926 | 0.5265 | 0.9036 | 0.9034 | 0.9055 | 0.9036 | | 0.013 | 12.0 | 3192 | 0.5267 | 0.9041 | 0.9041 | 0.9058 | 0.9041 | | 0.013 | 13.0 | 3458 | 0.5090 | 0.9106 | 0.9106 | 0.9113 | 0.9106 | | 0.0105 | 14.0 | 3724 | 0.5315 | 0.9067 | 0.9067 | 0.9080 | 0.9067 | | 0.0105 | 15.0 | 3990 | 0.5339 | 0.9084 | 0.9084 | 0.9093 | 0.9084 | | 0.0068 | 16.0 | 4256 | 0.5414 | 0.9072 | 0.9074 | 0.9088 | 0.9072 | | 0.0051 | 17.0 | 4522 | 0.5460 | 0.9092 | 0.9091 | 0.9102 | 0.9092 | | 0.0051 | 18.0 | 4788 | 0.5438 | 0.9072 | 0.9073 | 0.9081 | 0.9072 | | 0.0035 | 19.0 | 5054 | 0.5474 | 0.9072 | 0.9073 | 0.9080 | 0.9072 | | 0.0035 | 20.0 | 5320 | 0.5484 | 0.9079 | 0.9080 | 0.9087 | 0.9079 | ### Framework versions - Transformers 4.25.1 - Pytorch 1.13.0+cu116 - Datasets 2.8.0 - Tokenizers 0.13.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # finbert-tone-finetuned-finance-topic-classification This model is a fine-tuned version of [yiyanghkust/finbert-tone](https://huggingface.co/yiyanghkust/finbert-tone) on [Twitter Financial News Topic](https://huggingface.co/datasets/zeroshot/twitter-financial-news-topic) dataset. It achieves the following results on the evaluation set: - Loss: 0.509021 - Accuracy: 0.910615 - F1: 0.910647 - Precision: 0.911335 - Recall: 0.910615 ## Model description Model determines the financial topic of given tweets over 20 various topics. Given the unbalanced distribution of the class labels, the weights were adjusted to pay attention to the less sampled labels which should increase overall performance.. ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:| | No log | 1.0 | 266 | 0.5152 | 0.8552 | 0.8504 | 0.8508 | 0.8552 | | 0.7618 | 2.0 | 532 | 0.3999 | 0.8790 | 0.8781 | 0.8842 | 0.8790 | | 0.7618 | 3.0 | 798 | 0.3628 | 0.8943 | 0.8940 | 0.8958 | 0.8943 | | 0.16 | 4.0 | 1064 | 0.3776 | 0.8997 | 0.9001 | 0.9025 | 0.8997 | | 0.16 | 5.0 | 1330 | 0.4286 | 0.8999 | 0.9002 | 0.9022 | 0.8999 | | 0.058 | 6.0 | 1596 | 0.4500 | 0.9043 | 0.9042 | 0.9055 | 0.9043 | | 0.058 | 7.0 | 1862 | 0.4689 | 0.9021 | 0.9017 | 0.9026 | 0.9021 | | 0.0267 | 8.0 | 2128 | 0.4918 | 0.9031 | 0.9029 | 0.9039 | 0.9031 | | 0.0267 | 9.0 | 2394 | 0.5030 | 0.9048 | 0.9049 | 0.9060 | 0.9048 | | 0.0177 | 10.0 | 2660 | 0.5052 | 0.9033 | 0.9034 | 0.9044 | 0.9033 | | 0.0177 | 11.0 | 2926 | 0.5265 | 0.9036 | 0.9034 | 0.9055 | 0.9036 | | 0.013 | 12.0 | 3192 | 0.5267 | 0.9041 | 0.9041 | 0.9058 | 0.9041 | | 0.013 | 13.0 | 3458 | 0.5090 | 0.9106 | 0.9106 | 0.9113 | 0.9106 | | 0.0105 | 14.0 | 3724 | 0.5315 | 0.9067 | 0.9067 | 0.9080 | 0.9067 | | 0.0105 | 15.0 | 3990 | 0.5339 | 0.9084 | 0.9084 | 0.9093 | 0.9084 | | 0.0068 | 16.0 | 4256 | 0.5414 | 0.9072 | 0.9074 | 0.9088 | 0.9072 | | 0.0051 | 17.0 | 4522 | 0.5460 | 0.9092 | 0.9091 | 0.9102 | 0.9092 | | 0.0051 | 18.0 | 4788 | 0.5438 | 0.9072 | 0.9073 | 0.9081 | 0.9072 | | 0.0035 | 19.0 | 5054 | 0.5474 | 0.9072 | 0.9073 | 0.9080 | 0.9072 | | 0.0035 | 20.0 | 5320 | 0.5484 | 0.9079 | 0.9080 | 0.9087 | 0.9079 | ### Framework versions - Transformers 4.25.1 - Pytorch 1.13.0+cu116 - Datasets 2.8.0 - Tokenizers 0.13.2
{"datasets": ["zeroshot/twitter-financial-news-topic"], "metrics": ["accuracy", "f1", "precision", "recall"], "pipeline_tag": "text-classification", "tags": ["generated_from_trainer", "twitter-financial-topic-classification", "financial", "stocks", "twitter"], "widget": [{"text": "Here are Thursday's biggest analyst calls: Apple, Amazon, Tesla, Palantir, DocuSign, Exxon &amp; more", "example_title": "Analyst Update'"}, {"text": "LIVE: ECB surprises with 50bps hike, ending its negative rate era. President Christine Lagarde is taking questions ", "example_title": "Fed | Central Banks"}, {"text": "Goldman Sachs traders countered the industry’s underwriting slump with revenue gains that raced past analysts’ estimates. The trading operation posted a 32% surge in second-quarter revenue that included another banner period for fixed income", "example_title": "Company | Product News"}, {"text": "China Evergrande Group’s onshore bond holders rejected a plan by the distressed developer to further extend a bond payment which was due on Friday. Rebecca Choong Wilkins reports on Bloomberg Television", "example_title": "Treasuries | Corporate Debt"}, {"text": "Investing Club: Morgan Stanley's dividend, buyback pay us for our patience after quarterly missteps", "example_title": "Dividend"}, {"text": "Investing Club: Our takes on Amazon and Apple heading into next week's earnings reports", "example_title": "Earnings"}, {"text": "JUST RELEASED: Oil Price Dynamics Report → Over the past week, oil prices decreased as supply expectations rose and anticipated demand remained unchanged.", "example_title": "Energy | Oil"}, {"text": "Delta Air Lines fell short of profit expectations in the second quarter and said high operating costs will persist through the rest of the year. Bloomberg Opinion's Brooke Sutherland has more on 'Bloomberg Markets'", "example_title": "Financials"}, {"text": "BREAKING: The Indian rupee plummets to a record 80 per US dollar as foreign investors pull out money from the nation's stocks", "example_title": "Currencies"}, {"text": "Twitter and Elon Musk are now in a high stakes/high risk situation, one analyst said.", "example_title": "General News | Opinion"}, {"text": "Copper prices are signaling that investors are bearish on the economy, strategist says", "example_title": "Gold | Metals | Materials"}, {"text": "Johnson & Johnson CFO Joe Wolk says the company is positioned for the long term and the plans for its consumer operations include an IPO. He speaks on 'Bloomberg Markets'", "example_title": "IPO"}, {"text": "Company and Elon Musk are set for a blockbuster courtroom battle over Musk’s attempt to terminate his $44 billion acquisition deal for $TWTR, according to Wedbush analyst Dan Ives.", "example_title": "Legal | Regulation"}, {"text": "Amazon to buy primary health care provider One Medical for roughly $3.9 billion", "example_title": "M&A | Investments"}, {"text": "Barclays Senior Analyst For Equity Research Jason Goldberg: 'Price expectations have changed.'' The global markets business recorded $6.47 billion of revenue in the quarter with rates, commodities and currencies helping drive the fixed-income gains.", "example_title": "Macro"}, {"text": "US stocks push higher in a volatile session. We break it down on The Countdown to The Close", "example_title": "Markets"}, {"text": "Zelenskyy fires security chiefs over ‘treasonous’ officials", "example_title": "Politics"}, {"text": "Airbnb co-founder Joe Gebbia is stepping down", "example_title": "Personnel Change"}, {"text": "French power group EDF requests its shares be suspended", "example_title": "Stock Commentary"}, {"text": "JUST IN: Alibaba shares slide as much as 5.7%, bringing this week's slump to over 15%, after it reportedly faced a data-theft inquiry", "example_title": "Stock Movement"}], "model-index": [{"name": "finbert-tone-finetuned-finance-topic-classification", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "twitter-financial-news-topic", "type": "finance"}, "metrics": [{"type": "F1", "value": 0.910647, "name": "F1"}, {"type": "accuracy", "value": 0.910615, "name": "accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,418
Greeshma12/mt5-small-finetuned-amazon-en-es
Greeshma12
summarization
[ "transformers", "tensorboard", "safetensors", "mt5", "text2text-generation", "summarization", "generated_from_trainer", "base_model:google/mt5-small", "base_model:finetune:google/mt5-small", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-12-04T02:23:40Z
2024-12-04T03:05:34+00:00
16
0
--- base_model: google/mt5-small library_name: transformers license: apache-2.0 metrics: - rouge tags: - summarization - generated_from_trainer model-index: - name: mt5-small-finetuned-amazon-en-es results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # mt5-small-finetuned-amazon-en-es This model is a fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 3.2659 - Rouge1: 13.7437 - Rouge2: 5.9153 - Rougel: 13.4146 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5.6e-05 - train_batch_size: 8 - eval_batch_size: 8 - seed: 42 - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: linear - num_epochs: 8 ### Training results | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | |:-------------:|:-----:|:----:|:---------------:|:-------:|:------:|:-------:| | 9.4301 | 1.0 | 625 | 3.5851 | 8.6109 | 2.4991 | 8.3173 | | 4.6907 | 2.0 | 1250 | 3.4105 | 11.1544 | 4.3475 | 10.7786 | | 4.1916 | 3.0 | 1875 | 3.3443 | 10.8192 | 3.848 | 10.44 | | 3.971 | 4.0 | 2500 | 3.3001 | 12.7096 | 5.0292 | 12.3085 | | 3.8402 | 5.0 | 3125 | 3.2788 | 12.1184 | 4.5893 | 11.7314 | | 3.7106 | 6.0 | 3750 | 3.2795 | 13.748 | 5.907 | 13.5413 | | 3.6523 | 7.0 | 4375 | 3.2702 | 13.6669 | 5.8956 | 13.3843 | | 3.6315 | 8.0 | 5000 | 3.2659 | 13.7437 | 5.9153 | 13.4146 | ### Framework versions - Transformers 4.46.2 - Pytorch 2.5.1+cu121 - Datasets 3.1.0 - Tokenizers 0.20.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # mt5-small-finetuned-amazon-en-es This model is a fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 3.2659 - Rouge1: 13.7437 - Rouge2: 5.9153 - Rougel: 13.4146 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5.6e-05 - train_batch_size: 8 - eval_batch_size: 8 - seed: 42 - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: linear - num_epochs: 8 ### Training results | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | |:-------------:|:-----:|:----:|:---------------:|:-------:|:------:|:-------:| | 9.4301 | 1.0 | 625 | 3.5851 | 8.6109 | 2.4991 | 8.3173 | | 4.6907 | 2.0 | 1250 | 3.4105 | 11.1544 | 4.3475 | 10.7786 | | 4.1916 | 3.0 | 1875 | 3.3443 | 10.8192 | 3.848 | 10.44 | | 3.971 | 4.0 | 2500 | 3.3001 | 12.7096 | 5.0292 | 12.3085 | | 3.8402 | 5.0 | 3125 | 3.2788 | 12.1184 | 4.5893 | 11.7314 | | 3.7106 | 6.0 | 3750 | 3.2795 | 13.748 | 5.907 | 13.5413 | | 3.6523 | 7.0 | 4375 | 3.2702 | 13.6669 | 5.8956 | 13.3843 | | 3.6315 | 8.0 | 5000 | 3.2659 | 13.7437 | 5.9153 | 13.4146 | ### Framework versions - Transformers 4.46.2 - Pytorch 2.5.1+cu121 - Datasets 3.1.0 - Tokenizers 0.20.3
{"base_model": "google/mt5-small", "library_name": "transformers", "license": "apache-2.0", "metrics": ["rouge"], "tags": ["summarization", "generated_from_trainer"], "model-index": [{"name": "mt5-small-finetuned-amazon-en-es", "results": []}]}
task
[ "SUMMARIZATION" ]
46,420
achandlr/Llama-3-8B-Instruct-BatchPromptQA
achandlr
question-answering
[ "transformers", "safetensors", "batch prompting", "batch", "BatchPrompt", "BatchPrompting", "GLUE", "Llama", "fine-tuned", "Llama3", "Llama-3-8B-Instruct", "question-answering", "en", "dataset:achandlr/BatchPrompting", "arxiv:1910.09700", "license:mit", "endpoints_compatible", "region:us" ]
2024-04-24T18:41:11Z
2024-05-18T00:45:33+00:00
0
0
--- datasets: - achandlr/BatchPrompting language: - en library_name: transformers license: mit metrics: - accuracy pipeline_tag: question-answering tags: - batch prompting - batch - BatchPrompt - BatchPrompting - GLUE - Llama - fine-tuned - Llama3 - Llama-3-8B-Instruct --- # Model Card for Model ID This model is a fine-tuned version of Llama-3-8B-Instruct on the BatchPrompting dataset, which spans 13 diverse NLP tasks. The model has been fine-tuned to effectively perform batch prompting - answering multiple questions concatenated into a single prompt in one inference pass. ## Model Details This model is a fine-tuned version of Llama-3-8B-Instruct on the BatchPrompting dataset, which spans 13 diverse NLP tasks. The model has been fine-tuned to effectively perform batch prompting - answering multiple questions concatenated into a single prompt in one inference pass. ### Model Description <!-- Provide a longer summary of what this model is. TODO--> - **Developed by:** Alex Chandler, Sebastian Joseph - **Model type:** Large Language Model (Llama-3 variant - **Language(s) (NLP):** English - **License:** MIT - **Finetuned from model [optional]:** Llama-3-8B-Instruct ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** Forthcoming - **Paper:** Forthcoming - **Demo:** Forthcoming ## Uses ### How to Use Use with transformers See the snippet below for usage with Transformers: ```python import transformers import torch model_id = "achandlr/Llama-3-8B-Instruct-BatchPromptQA" # Load the model pipeline pipeline = transformers.pipeline("text-generation", model=model_id) # Generate text using the pipeline generated_text = pipeline("Hey how are you doing today?") print(generated_text) ``` ### Direct Use The model can be used for efficient question-answering on a variety of NLP tasks by concatenating multiple questions into a single prompt. It demonstrates strong generalization to unseen tasks and maintains performance with larger batch sizes compared to the non-fine-tuned model. ### Out-of-Scope Use The model should not be used for tasks that may cause harm or for generating factually incorrect or biased content. Caution should be exercised if using the model for high-stakes decision making. ## Bias, Risks, and Limitations The model may exhibit biases present in its pretraining data or the BatchPrompting dataset. It has not been extensively tested for fairness or potential misuse. Performance may degrade on out-of-distribution examples or tasks very dissimilar to the training data. ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users should be made aware of the model's potential limitations and biases. The model's outputs should be carefully monitored, especially when used for sensitive applications. More testing is needed to fully characterize its capabilities and shortcomings. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data The model was fine-tuned on our BatchPrompting dataset consisting of 13 NLP tasks: - **GLUE Benchmark Tasks**: A collection of datasets used for evaluating the performance of models on a variety of natural language understanding tasks. - **Mathematical Reasoning Datasets**: - **GSM8K**: Focuses on numerical and logical reasoning challenges. - **GSM8K-Hard**: Contains more complex problems from the GSM8K dataset. - **CommonsenseQA**: Tests the model's commonsense reasoning ability through multiple-choice question answering. - **RACE Reading Comprehension Dataset**: Consists of passages and questions designed to assess reading comprehension, derived from English exams. ### Training Procedure The model was fine-tuned using the LoRA method. #### Training Hyperparameters - **Training regime:** Forthcoming <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> Forthcoming [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> Testing Data, Factors & Metrics Evaluation was performed on tasks that were excluded from the training run. Key metrics included accuracy and BatchPrompt error rate (failure to answer a question or conform to the specified format). A table of our results is forthcoming. ### Testing Data, Factors & Metrics Forthcoming #### Testing Data Forthcoming <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Metrics Forthcoming <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results Forthcoming [More Information Needed] #### Summary Forthcoming ## Model Examination [optional] Forthcoming <!-- Relevant interpretability work for the model goes here --> [More Information Needed] <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). ## Environmental Impact - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] --> ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation Forthcoming <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** Forthcoming **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
null
Non_BioNLP
# Model Card for Model ID This model is a fine-tuned version of Llama-3-8B-Instruct on the BatchPrompting dataset, which spans 13 diverse NLP tasks. The model has been fine-tuned to effectively perform batch prompting - answering multiple questions concatenated into a single prompt in one inference pass. ## Model Details This model is a fine-tuned version of Llama-3-8B-Instruct on the BatchPrompting dataset, which spans 13 diverse NLP tasks. The model has been fine-tuned to effectively perform batch prompting - answering multiple questions concatenated into a single prompt in one inference pass. ### Model Description <!-- Provide a longer summary of what this model is. TODO--> - **Developed by:** Alex Chandler, Sebastian Joseph - **Model type:** Large Language Model (Llama-3 variant - **Language(s) (NLP):** English - **License:** MIT - **Finetuned from model [optional]:** Llama-3-8B-Instruct ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** Forthcoming - **Paper:** Forthcoming - **Demo:** Forthcoming ## Uses ### How to Use Use with transformers See the snippet below for usage with Transformers: ```python import transformers import torch model_id = "achandlr/Llama-3-8B-Instruct-BatchPromptQA" # Load the model pipeline pipeline = transformers.pipeline("text-generation", model=model_id) # Generate text using the pipeline generated_text = pipeline("Hey how are you doing today?") print(generated_text) ``` ### Direct Use The model can be used for efficient question-answering on a variety of NLP tasks by concatenating multiple questions into a single prompt. It demonstrates strong generalization to unseen tasks and maintains performance with larger batch sizes compared to the non-fine-tuned model. ### Out-of-Scope Use The model should not be used for tasks that may cause harm or for generating factually incorrect or biased content. Caution should be exercised if using the model for high-stakes decision making. ## Bias, Risks, and Limitations The model may exhibit biases present in its pretraining data or the BatchPrompting dataset. It has not been extensively tested for fairness or potential misuse. Performance may degrade on out-of-distribution examples or tasks very dissimilar to the training data. ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users should be made aware of the model's potential limitations and biases. The model's outputs should be carefully monitored, especially when used for sensitive applications. More testing is needed to fully characterize its capabilities and shortcomings. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data The model was fine-tuned on our BatchPrompting dataset consisting of 13 NLP tasks: - **GLUE Benchmark Tasks**: A collection of datasets used for evaluating the performance of models on a variety of natural language understanding tasks. - **Mathematical Reasoning Datasets**: - **GSM8K**: Focuses on numerical and logical reasoning challenges. - **GSM8K-Hard**: Contains more complex problems from the GSM8K dataset. - **CommonsenseQA**: Tests the model's commonsense reasoning ability through multiple-choice question answering. - **RACE Reading Comprehension Dataset**: Consists of passages and questions designed to assess reading comprehension, derived from English exams. ### Training Procedure The model was fine-tuned using the LoRA method. #### Training Hyperparameters - **Training regime:** Forthcoming <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> Forthcoming [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> Testing Data, Factors & Metrics Evaluation was performed on tasks that were excluded from the training run. Key metrics included accuracy and BatchPrompt error rate (failure to answer a question or conform to the specified format). A table of our results is forthcoming. ### Testing Data, Factors & Metrics Forthcoming #### Testing Data Forthcoming <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Metrics Forthcoming <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results Forthcoming [More Information Needed] #### Summary Forthcoming ## Model Examination [optional] Forthcoming <!-- Relevant interpretability work for the model goes here --> [More Information Needed] <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). ## Environmental Impact - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] --> ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation Forthcoming <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** Forthcoming **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
{"datasets": ["achandlr/BatchPrompting"], "language": ["en"], "library_name": "transformers", "license": "mit", "metrics": ["accuracy"], "pipeline_tag": "question-answering", "tags": ["batch prompting", "batch", "BatchPrompt", "BatchPrompting", "GLUE", "Llama", "fine-tuned", "Llama3", "Llama-3-8B-Instruct"]}
task
[ "QUESTION_ANSWERING" ]
46,421
pszemraj/deberta-v3-xsmall-CoLA
pszemraj
text-classification
[ "transformers", "pytorch", "onnx", "safetensors", "deberta-v2", "text-classification", "generated_from_trainer", "en", "dataset:glue", "base_model:microsoft/deberta-v3-xsmall", "base_model:quantized:microsoft/deberta-v3-xsmall", "license:mit", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-01-26T02:56:23Z
2025-01-25T06:47:18+00:00
48
0
--- base_model: microsoft/deberta-v3-xsmall datasets: - glue language: - en license: mit metrics: - matthews_correlation tags: - generated_from_trainer widget: - text: The cat sat on the mat. example_title: Correct grammatical sentence - text: Me and my friend going to the store. example_title: Incorrect subject-verb agreement - text: I ain't got no money. example_title: Incorrect verb conjugation and double negative - text: She don't like pizza no more. example_title: Incorrect verb conjugation and double negative - text: They is arriving tomorrow. example_title: Incorrect verb conjugation model-index: - name: deberta-v3-xsmall-CoLA results: - task: type: text-classification name: Text Classification dataset: name: GLUE COLA type: glue config: cola split: validation args: cola metrics: - type: matthews_correlation value: 0.5894856058137782 name: Matthews Correlation --- # deberta-v3-xsmall-CoLA This model is a fine-tuned version of [microsoft/deberta-v3-xsmall](https://huggingface.co/microsoft/deberta-v3-xsmall) on the GLUE COLA dataset. It achieves the following results on the evaluation set: - Loss: 0.4237 - Matthews Correlation: 0.5895 ## Model description Trying to find a decent optimum between accuracy/quality and inference speed. ```json { "epoch": 3.0, "eval_loss": 0.423, "eval_matthews_correlation": 0.589, "eval_runtime": 5.0422, "eval_samples": 1043, "eval_samples_per_second": 206.853, "eval_steps_per_second": 51.763 } ``` ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 6e-05 - train_batch_size: 32 - eval_batch_size: 4 - seed: 16105 - distributed_type: multi-GPU - gradient_accumulation_steps: 4 - total_train_batch_size: 128 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine - lr_scheduler_warmup_ratio: 0.03 - num_epochs: 3.0 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Matthews Correlation | |:-------------:|:-----:|:----:|:---------------:|:--------------------:| | 0.3945 | 1.0 | 67 | 0.4323 | 0.5778 | | 0.3214 | 2.0 | 134 | 0.4237 | 0.5895 | | 0.3059 | 3.0 | 201 | 0.4636 | 0.5795 | ### Framework versions - Transformers 4.27.0.dev0 - Pytorch 1.13.1+cu117 - Datasets 2.8.0 - Tokenizers 0.13.1
null
Non_BioNLP
# deberta-v3-xsmall-CoLA This model is a fine-tuned version of [microsoft/deberta-v3-xsmall](https://huggingface.co/microsoft/deberta-v3-xsmall) on the GLUE COLA dataset. It achieves the following results on the evaluation set: - Loss: 0.4237 - Matthews Correlation: 0.5895 ## Model description Trying to find a decent optimum between accuracy/quality and inference speed. ```json { "epoch": 3.0, "eval_loss": 0.423, "eval_matthews_correlation": 0.589, "eval_runtime": 5.0422, "eval_samples": 1043, "eval_samples_per_second": 206.853, "eval_steps_per_second": 51.763 } ``` ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 6e-05 - train_batch_size: 32 - eval_batch_size: 4 - seed: 16105 - distributed_type: multi-GPU - gradient_accumulation_steps: 4 - total_train_batch_size: 128 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine - lr_scheduler_warmup_ratio: 0.03 - num_epochs: 3.0 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Matthews Correlation | |:-------------:|:-----:|:----:|:---------------:|:--------------------:| | 0.3945 | 1.0 | 67 | 0.4323 | 0.5778 | | 0.3214 | 2.0 | 134 | 0.4237 | 0.5895 | | 0.3059 | 3.0 | 201 | 0.4636 | 0.5795 | ### Framework versions - Transformers 4.27.0.dev0 - Pytorch 1.13.1+cu117 - Datasets 2.8.0 - Tokenizers 0.13.1
{"base_model": "microsoft/deberta-v3-xsmall", "datasets": ["glue"], "language": ["en"], "license": "mit", "metrics": ["matthews_correlation"], "tags": ["generated_from_trainer"], "widget": [{"text": "The cat sat on the mat.", "example_title": "Correct grammatical sentence"}, {"text": "Me and my friend going to the store.", "example_title": "Incorrect subject-verb agreement"}, {"text": "I ain't got no money.", "example_title": "Incorrect verb conjugation and double negative"}, {"text": "She don't like pizza no more.", "example_title": "Incorrect verb conjugation and double negative"}, {"text": "They is arriving tomorrow.", "example_title": "Incorrect verb conjugation"}], "model-index": [{"name": "deberta-v3-xsmall-CoLA", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "GLUE COLA", "type": "glue", "config": "cola", "split": "validation", "args": "cola"}, "metrics": [{"type": "matthews_correlation", "value": 0.5894856058137782, "name": "Matthews Correlation"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,422
connork0/autotrain-47094-6e1tx
connork0
text-classification
[ "tensorboard", "safetensors", "bert", "autotrain", "text-classification", "base_model:google-bert/bert-base-uncased", "base_model:finetune:google-bert/bert-base-uncased", "region:us" ]
2024-10-22T19:20:34Z
2024-10-22T19:33:11+00:00
8
0
--- base_model: google-bert/bert-base-uncased tags: - autotrain - text-classification widget: - text: I love AutoTrain --- # Model Trained Using AutoTrain - Problem type: Text Classification ## Validation Metrics loss: 4.552206993103027 f1_macro: 0.024267912772585668 f1_micro: 0.06481481481481481 f1_weighted: 0.02404320987654321 precision_macro: 0.018500835252155852 precision_micro: 0.06481481481481481 precision_weighted: 0.018329531222043297 recall_macro: 0.06542056074766354 recall_micro: 0.06481481481481481 recall_weighted: 0.06481481481481481 accuracy: 0.06481481481481481
null
Non_BioNLP
# Model Trained Using AutoTrain - Problem type: Text Classification ## Validation Metrics loss: 4.552206993103027 f1_macro: 0.024267912772585668 f1_micro: 0.06481481481481481 f1_weighted: 0.02404320987654321 precision_macro: 0.018500835252155852 precision_micro: 0.06481481481481481 precision_weighted: 0.018329531222043297 recall_macro: 0.06542056074766354 recall_micro: 0.06481481481481481 recall_weighted: 0.06481481481481481 accuracy: 0.06481481481481481
{"base_model": "google-bert/bert-base-uncased", "tags": ["autotrain", "text-classification"], "widget": [{"text": "I love AutoTrain"}]}
task
[ "TEXT_CLASSIFICATION" ]
46,423
LoneStriker/airoboros-70b-3.3-GGUF
LoneStriker
null
[ "gguf", "llama-3", "dataset:jondurbin/airoboros-3.2", "dataset:bluemoon-fandom-1-1-rp-cleaned", "dataset:boolq", "dataset:jondurbin/gutenberg-dpo-v0.1", "dataset:LDJnr/Capybara", "dataset:jondurbin/cinematika-v0.1", "dataset:glaiveai/glaive-function-calling-v2", "dataset:grimulkan/LimaRP-augmented", "dataset:piqa", "dataset:Vezora/Tested-22k-Python-Alpaca", "dataset:mattpscott/airoboros-summarization", "dataset:unalignment/toxic-dpo-v0.2", "base_model:meta-llama/Meta-Llama-3-8B", "base_model:quantized:meta-llama/Meta-Llama-3-8B", "license:other", "endpoints_compatible", "region:us", "conversational" ]
2024-05-10T15:59:50Z
2024-05-10T17:27:48+00:00
65
2
--- base_model: meta-llama/Meta-Llama-3-8B datasets: - jondurbin/airoboros-3.2 - bluemoon-fandom-1-1-rp-cleaned - boolq - jondurbin/gutenberg-dpo-v0.1 - LDJnr/Capybara - jondurbin/cinematika-v0.1 - glaiveai/glaive-function-calling-v2 - grimulkan/LimaRP-augmented - piqa - Vezora/Tested-22k-Python-Alpaca - mattpscott/airoboros-summarization - unalignment/toxic-dpo-v0.2 license: other license_name: llama3 license_link: https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE tags: - llama-3 --- ### Overview Another experimental model, tuend primarily from synthetic data generated by [airoboros](https://github.com/jondurbin/airoboros) The name of this model is "llama-3-airoboros-70b-3.3" and it was built with llama-3 from Meta. This is a fine-tune of llama-3-70b-instruct, and uses the lama-3 instruct chat template. #### Highlights A model built on the airoboros dataset, along with a few friends: - https://huggingface.co/datasets/bluemoon-fandom-1-1-rp-cleaned - https://huggingface.co/datasets/boolq - https://huggingface.co/datasets/jondurbin/gutenberg-dpo-v0.1 - https://huggingface.co/datasets/LDJnr/Capybara - https://huggingface.co/datasets/jondurbin/cinematika-v0.1 - https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2 - https://huggingface.co/datasets/grimulkan/LimaRP-augmented - https://huggingface.co/datasets/piqa - https://huggingface.co/datasets/Vezora/Tested-22k-Python-Alpaca - https://huggingface.co/datasets/mattpscott/airoboros-summarization - https://huggingface.co/datasets/unalignment/toxic-dpo-v0.2 ### Prompt format This model uses the llama-3-instruct prompt template, and is provided in the tokenizer config. You can use the `apply_chat_template` method to accurate format prompts, e.g.: ```python import transformers tokenizer = transformers.AutoTokenizer.from_pretrained("jondurbin/bugle-8b-v0.1", trust_remote_code=True) chat = [ {"role": "system", "content": "You are Bob, a friendly AI assistant."}, {"role": "user", "content": "Hello, how are you?"}, {"role": "assistant", "content": "I'm doing great. How can I help you today?"}, {"role": "user", "content": "I'd like to show off how chat templating works!"}, ] print(tokenizer.apply_chat_template(chat, tokenize=False)) ### Helpful usage tips #### Context obedient question answering By obedient, I mean the model was trained to ignore what it thinks it knows, and uses the context to answer the question. The model was also tuned to limit the values to the provided context as much as possible to reduce hallucinations. The format for a closed-context prompt is as follows: ``` BEGININPUT BEGINCONTEXT [key0: value0] [key1: value1] ... other metdata ... ENDCONTEXT [insert your text blocks here] ENDINPUT [add as many other blocks, in the exact same format] BEGININSTRUCTION [insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.] ENDINSTRUCTION ``` It's also helpful to add "Don't make up answers if you don't know." to your instruction block to make sure if the context is completely unrelated it doesn't make something up. *The __only__ prompts that need this closed context formating are closed-context instructions. Normal questions/instructions do not!* I know it's a bit verbose and annoying, but after much trial and error, using these explicit delimiters helps the model understand where to find the responses and how to associate specific sources with it. - `BEGININPUT` - denotes a new input block - `BEGINCONTEXT` - denotes the block of context (metadata key/value pairs) to associate with the current input block - `ENDCONTEXT` - denotes the end of the metadata block for the current input - [text] - Insert whatever text you want for the input block, as many paragraphs as can fit in the context. - `ENDINPUT` - denotes the end of the current input block - [repeat as many input blocks in this format as you want] - `BEGININSTRUCTION` - denotes the start of the list (or one) instruction(s) to respond to for all of the input blocks above. - [instruction(s)] - `ENDINSTRUCTION` - denotes the end of instruction set It sometimes works without `ENDINSTRUCTION`, but by explicitly including that in the prompt, the model better understands that all of the instructions in the block should be responded to. __Use a very low temperature!__ Here's a trivial, but important example to prove the point: ``` BEGININPUT BEGINCONTEXT date: 2021-01-01 url: https://web.site/123 ENDCONTEXT In a shocking turn of events, blueberries are now green, but will be sticking with the same name. ENDINPUT BEGININSTRUCTION What color are bluberries? Source? ENDINSTRUCTION ``` And the response: ``` Blueberries are now green. Source: date: 2021-01-01 url: https://web.site/123 ``` #### Summarization 500 samples have been included from [this dataset](https://huggingface.co/datasets/mattpscott/airoboros-summarization), using the same format as contextual question answering, for example: ``` BEGININPUT {text to summarize} ENDINPUT BEGININSTRUCTION Summarize the input in around 130 words. ENDINSTRUCTION ``` #### Getting longer responses You can use a few techniques to get longer responses. Detailed prompts, with explicit instruction for word count: ``` Please compose a narrative set in the heart of an ancient library, steeped in the scent of old parchment and ink. The protagonist should be a young scholar who is dedicated to studying the art of storytelling and its evolution throughout history. In her pursuit of knowledge, she stumbles upon a forgotten tome that seems to possess an unusual aura. This book has the ability to bring stories to life, literally manifesting characters and scenarios from within its pages into reality. The main character must navigate through various epochs of storytelling - from oral traditions of tribal societies, through medieval minstrels' tales, to modern-day digital narratives - as they come alive around her. Each era presents its unique challenges and lessons about the power and impact of stories on human civilization. One such character could be a sentient quill pen, who was once used by renowned authors of yesteryears and now holds their wisdom and experiences. It becomes her mentor, guiding her through this journey with witty remarks and insightful commentary. Ensure that your tale encapsulates the thrill of adventure, the beauty of learning, and the profound connection between humans and their stories. All characters involved should be non-human entities. Feel free to explore creative liberties but maintain the mentioned elements. Your response should be approximately 2300 words. ``` Or, a simpler example: ``` Please create a long, detailed story about a dragon in an old growth forest who, for some reason, begins speaking the words of the source code of linux. ``` There are a few examples of next chapter completion as well, e.g.: ``` Write the next chapter of a historical fiction novel set in Paris during the 20th century. Here's a summary of the previous chapter: In the vibrant city of Paris, amid the tumultuous changes of the 20th century, our protagonist Margot, an aspiring fashion designer, has just secured an apprenticeship at a prestigious couture house. She meets Lucien, a charming journalist who covers the fashion industry. Together they navigate the ever-changing world of fashion and society, uncovering secrets that reveal the intricate links between style, politics, and culture. As the chapter concludes, they decide to delve deeper into the hidden corners of the fashion world to unravel its mysteries. Requirements for the next chapter: 1. Character Development of Margot and Lucien: - Margot's Evolution: Unfold more about Margot's past, her dreams of revolutionizing fashion, and her struggle to establish herself in a male-dominated industry. Illustrate her growing expertise, innovative ideas, and increasing dependence on Lucien. - Lucien's Complexity: Introduce uncertainties surrounding Lucien's background and real motives. Increase suspense by suggesting undisclosed information he possesses, while also highlighting his wit and perceptiveness. 2. Exploration of Paris and the Couture House: - Paris: Elaborate their journey through the bustling streets of Paris, including encounters with iconic figures, social unrest, and relics from different eras of French history. - The Couture House: Expand on the grandeur of the couture house they work in, filled with artistic masterpieces, intense competition, and cryptic notes hinting at a scandalous past. 3. Emergence of the Subplot: The Lost Collection: - Discovery: Have Margot and Lucien stumble upon a secret vault containing a lost collection designed before World War II, raising new questions about the previous owner and the influence of war on fashion. - Revelation: Capture their shock as they realize the designs were plagiarized, the potential repercussions, and the opportunities it presents for Margot's career. - Twist: End with a twist that suggests there are other stolen collections across Paris, setting up their new mission. Your response should be approximately 650 words. ``` #### Coding You can ask for fairly complex coding instructions with multiple criteria, e.g.: ``` Create a python application with the following requirements: - Asyncio FastAPI webserver - ping endpoint that returns the current date in JSON format - file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate ``` Or inline criteria: ``` Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values. ``` You can also optionally add a single space and "PLAINFORMAT" at the end of your prompt to avoid backticks, explanations, etc. and just print the code, e.g.: ``` Write a websocket application in node.js. PLAINFORMAT ``` #### Agent/function calling The dataset includes many examples of function/args generation based on input criteria. This is somewhat similar to the OpenAI function calling, but the output is either JSON or YAML. Example prompt: ``` As an AI assistant, please select the most suitable function and parameters from the list of available functions below, based on the user's input. Provide your response in JSON format. Input: I want to know how many times 'Python' is mentioned in my text file. Available functions: file_analytics: description: This tool performs various operations on a text file. params: action: The operation we want to perform on the data, such as "count_occurrences", "find_line", etc. filters: keyword: The word or phrase we want to search for. ``` Response: ```json { "function": "file_analytics", "params": { "action": "count_occurrences", "filters": { "keyword": "Python" } } } ``` #### Chain-of-thought You can ask for several possible responses to a given problem, with a ranking and final answer selection. Example prompt: ``` A group of people decide to play a round-robin tournament where every player plays every other player exactly once. If a total of 45 games were played, how many players participated in the tournament? Offer several potential answers, rank them according to mathematical logic, and pick the most feasible one. ``` Example response: ``` Solution 1: In a round-robin tournament, each player plays every other player exactly once. This means that the total number of games played is equal to the combination of all players taken two at a time (since a game involves two players). The formula for combinations is nC2 = n(n-1)/2, where n is the total number of players. We know that nC2 equals 45 (the total number of games), so we can set up the equation as follows: n(n-1)/2 = 45 Solving this equation gives us n=10. Final answer: There were 10 players in the tournament. Solution 2: Another way to approach this problem is by using the concept of triangular numbers. Triangular numbers are a sequence of numbers where each number can be represented as a triangle with dots. The nth triangular number is given by the sum of the first n natural numbers. If we consider each game as a dot and each player as a side of the triangle, then the total number of games (45) would correspond to the 9th triangular number because 1+2+3+4+5+6+7+8+9=45. However, since each side of the triangle represents a player, and there's one more player than sides in our model (because the last player has no one left to play against), we need to add one more to get the total number of players. Final answer: There were 10 players in the tournament. Solution 3: We could also use trial and error to solve this problem. Starting from a small number of players, we calculate how many games would be played in a round-robin tournament until we reach 45 games. For example, with 2 players, only 1 game is played; with 3 players, 3 games are played; with 4 players, 6 games are played, and so on. Continuing this process, we find that with 10 players, 45 games are played. Final answer: There were 10 players in the tournament. Ranking of solutions from best to worst: 1. Solution 1: This solution uses direct mathematical reasoning based on the properties of a round-robin tournament and solves an equation to find the answer. 2. Solution 2: This solution uses the concept of triangular numbers which requires additional steps and knowledge beyond the immediate problem context, but still arrives at the correct answer. 3. Solution 3: This solution relies on trial and error, which is less efficient and reliable than the other methods, but it eventually gets to the right answer. Best and final answer: There were 10 players in the tournament. ``` #### reWOO style execution planning The model now supports execution planning for complex instructions that would require making use of several tools. The output is just the plan, you must implement a mechanism to parse the output and actually call the functions! Example prompt: ``` Please construct a systematic plan to generate an optimal response to the user instruction, utilizing a set of provided tools. Each plan will correspond to an evidence value, which will be the output of one of the available functions given an input string that could be the user's question, one or more prior evidence values, or a combination of both. Here are the tools available to be called: DuckDuckGo[input]: Tool that enables the user to search for information using the DuckDuckGo search engine. This tool is helpful in locating a suitable list of sites that may contain the answer to the user's query. It does not directly answer the question but finds a list of sites that might have the answer. TextScraper[input]: Load one or more websites from the input string containing newline delimited links, where input is one or more links, and produces plain text output containing the content of the links. HyperlinkExtractor[input]: Extract links from plain text and produces a plain text, newline delimited response of links. KnowledgeModel[input]: Question answering language model, particularly useful in answering questions based on an input passage of text. The input must be a text question that references an :evidence[n]: variable, e.g. What color is the cat, given :evidence1:? The output should be in format: Plan: [first action to take based on input question] :evidence0: = [function to call with input parameter] Plan: [next action to take, based on result of :evidence0:] :evidence1: = [next function to call and input parameter, which may include reference to previous evidence, e.g. "Given context :evidence0"] ... Answer: [:evidence[n]: containing the final answer.] Question: Who won the Nobel Prize in Literature in 2020 and what is their most famous work? ``` Response: ``` Plan: Begin by conducting a web search to find out who won the Nobel Prize in Literature in 2020. :evidence0: = DuckDuckGo[Nobel Prize in Literature 2020 winner] Plan: Utilize the KnowledgeModel to interpret the search results and find the name of the laureate. :evidence1: = KnowledgeModel[Who won the Nobel Prize in Literature in 2020, given :evidence0:?] Plan: Conduct another web search to find the most famous work of the identified laureate. :evidence2: = DuckDuckGo[Most famous work of :evidence1:] Plan: Extract the relevant links from the DuckDuckGo search results for a more focused search. :evidence3: = HyperlinkExtractor[:evidence2:] Plan: Use the TextScraper tool to extract information from the relevant links. :evidence4: = TextScraper[:evidence3:] Plan: Finally, utilize the KnowledgeModel to identify and summarize the most famous work of the laureate from the extracted information. :evidence5: = KnowledgeModel[What is the most famous work of :evidence1:, given :evidence4:?] Answer: :evidence5: ``` For this to be useful, you'd have to parse the output plan text, and implement/call each of the functions. This is just pseudo-code, completely untested off the top of my head, and obviously would requiring full implementation + hardening: ```python import re import requests def inject_context(input_text, **context): for ref in set(re.findall(r"(:evidence[0-9]+:)", input_text, re.I)): input_text = input_text.replace(ref, context.get(ref, "")) return input_text def duckduckgo(input_text, **context): search_string = inject_context(input_text, **context) ... search via duck duck go using search_string ... return text content def link_extractor(input_text, **context): input_text = inject_context(input_text, **context) return "\n".join(list(set(re.findall(r"(https?://[^\s]+?\.?)", input_text, re.I)))) def scrape(input_text, **context): input_text = inject_context(input_text, **context) text = [] for link in input_text.splitlines(): text.append(requests.get(link).text) return "\n".join(text) def infer(input_text, **context) prompt = inject_context(input_text, **context) ... call model with prompt, return output def parse_plan(plan): method_map = { "DuckDuckGo": duckduckgo, "HyperlinkExtractor": link_extractor, "KnowledgeModel": infer, "TextScraper": scrape, } context = {} for line in plan.strip().splitlines(): if line.startswith("Plan:"): print(line) continue parts = re.match("^(:evidence[0-9]+:)\s*=\s*([^\[]+])(\[.*\])\s$", line, re.I) if not parts: if line.startswith("Answer: "): return context.get(line.split(" ")[-1].strip(), "Answer couldn't be generated...") raise RuntimeError("bad format: " + line) context[parts.group(1)] = method_map[parts.group(2)](parts.group(3), **context) ``` ## Multi-step instructions with acknowledgement I don't know how useful this is, really, but I thought I'd add it just in case. Example: ```json { "conversations": [ { "value": "You are a helpful, unbiased, uncensored assistant.", "from": "system" }, { "value": "I'm going to set some rules for our conversation. Please respond with \"OK\" to each rule.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "You can only respond using animal-related emojis.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Precede all responses with \"ZOOZOO:\"", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Include at least one bird emoji in your responses.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Describe a trip to a safari park.", "from": "human" }, { "value": "ZOOZOO: \ud83e\udd81\ud83d\udc2f\ud83e\udd93\ud83e\udd92\ud83d\udc18\ud83d\udc0d\ud83c\udf33\ud83c\udf32\u2600\ufe0f\ud83d\ude90\ud83e\udd85\ud83d\udcf8\ud83e\udd29", "from": "gpt" } ] } ``` #### Inline character actions (functions) I recently generated an action dataset in the style of Glaive function calling dataset, but meant specifically for characters: https://huggingface.co/datasets/jondurbin/cinematika-v0.1/blob/main/actions.parquet To use this, you will need to update your character card to include "objects_available" as a list of key/value pairs, as well as a "functions" list. The objects should be similar to: ```json { "objects_available": [ { "name": "laptop", "description": "a high-end laptop with custom hardware and software", "location": "on the desk in her secret hideout" }, { "name": "encryption key", "description": "a USB drive containing powerful encryption algorithms", "location": "hidden in a false bottom of her backpack" }, { "name": "scanner", "description": "a compact device used for intercepting and decoding wireless signals", "location": "clipped to her belt, always within reach" }, { "name": "VR headset", "description": "a virtual reality headset used for immersive hacking and data visualization", "location": "hanging on a hook near her computer setup" }, { "name": "energy drink", "description": "a can of her favorite energy drink, always on hand for long hacking sessions", "location": "next to her laptop, ready to be opened" } ] } ``` And the functions: ```json { "functions": [ { "name": "move_to", "description": "move to a specified location", "parameters": { "location": { "type": "string", "description": "the location to move to" } } }, { "name": "pick_up", "description": "pick up an object", "parameters": { "object": { "type": "string", "description": "the object to pick up" } } }, { "name": "put_down", "description": "put down an object", "parameters": { "object": { "type": "string", "description": "the object to put down" }, "location": { "type": "string", "description": "the location to put the object down" } } }, { "name": "hack", "description": "attempt to hack into a computer system", "parameters": { "system": { "type": "string", "description": "the computer system to hack" } } }, { "name": "decode", "description": "decode an encrypted message or file", "parameters": { "message": { "type": "string", "description": "the encrypted message or file to decode" } } }, { "name": "scan", "description": "scan for wireless signals and network vulnerabilities", "parameters": {} }, { "name": "analyze", "description": "analyze data for patterns and anomalies", "parameters": { "data": { "type": "string", "description": "the data to analyze" } } }, { "name": "hide", "description": "quickly hide to avoid detection", "parameters": { "location": { "type": "string", "description": "the location to hide" } } } ] } ``` This just becomes part of your character card/system prompt. Then, when you chat with the character and illicit a response that would make use of objects/functions/actions, it should be included as such: ``` prompt: I've heard rumors about a major corporation with a hidden agenda. Do you think you could hack into their system and find out what they're up to? response: I've had my suspicions about them for a while now. Let me see what I can uncover. <|begin_func|>{"name": "move_to", "parameters": {"location": "the desk in her secret hideout"}}<|end_func|> <|begin_func|>{"name": "pick_up", "parameters": {"object": "laptop"}}<|end_func|> Time to put my skills to the test. <|begin_func|>{"name": "hack", "parameters": {"system": "Megacorp X's mainframe"}}<|end_func|> Their firewalls are tough, but not unbreakable. I'm in. Let's see what secrets they're hiding... <|begin_func|>{"name": "analyze", "parameters": {"data": "encrypted files"}}<|end_func|> Interesting. It looks like they've been conducting illegal experiments and covering up the evidence. I'll need to dig deeper to find the proof. ``` Experiment, and find out what works and doesn't. ### Massed Compute Virtual Machine [Massed Compute](https://massedcompute.com/?utm_source=huggingface&utm_creative_format=model_card&utm_content=creator_jon) has created a Virtual Machine (VM) pre-loaded with TGI and Text Generation WebUI. 1) For this model, [create an account](https://bit.ly/jon-durbin) in Massed Compute. When renting a Virtual Machine use the code 'JonDurbin' for 50% your rental. 2) After you created your account update your billing and navigate to the deploy page. 3) Select the following - GPU Type: A6000 - GPU Quantity: 2 - Category: Creator - Image: Jon Durbin - Coupon Code: JonDurbin 4) Deploy the VM! 5) Navigate to 'Running Instances' to retrieve instructions to login to the VM 6) Once inside the VM, open the terminal and run `volume=$PWD/data` 7) Run `model=jondurbin/airoboros-34b-3.3` 8) `sudo docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:1.3 --model-id $model` 9) The model will take some time to load... 10) Once loaded the model will be available on port 8080 For assistance with the VM join the [Massed Compute Discord Server](https://discord.gg/Mj4YMQY3DA) ### Latitude.sh [Latitude](https://www.latitude.sh/r/4BBD657C) has h100 instances available (as of today, 2024-02-08) for $3/hr! They have a few blueprints available for testing LLMs, but a single h100 should be plenty to run this model with 8k ctx. ## Support me - https://bmc.link/jondurbin - ETH 0xce914eAFC2fe52FdceE59565Dd92c06f776fcb11 - BTC bc1qdwuth4vlg8x37ggntlxu5cjfwgmdy5zaa7pswf ### Licence and usage restrictions The airoboros models are built on top of multiple base models, each with their own license/restrictions. The fine-tuning data was mostly generated by OpenAI API calls to gpt-4, via [airoboros](https://github.com/jondurbin/airoboros) The ToS for OpenAI API usage has a clause preventing the output from being used to train a model that __competes__ with OpenAI - what does *compete* actually mean here? - these small open source models will not produce output anywhere near the quality of gpt-4, or even gpt-3.5, so I can't imagine this could credibly be considered competing in the first place - if someone else uses the dataset to do the same, they wouldn't necessarily be violating the ToS because they didn't call the API, so I don't know how that works - the training data used in essentially all large language models includes a significant amount of copyrighted or otherwise non-permissive licensing in the first place - other work using the self-instruct method, e.g. the original here: https://github.com/yizhongw/self-instruct released the data and model as apache-2 I am purposingly leaving this license ambiguous (other than the fact you must comply with the Meta original license for llama-2) because I am not a lawyer and refuse to attempt to interpret all of the terms accordingly. Your best bet is probably to avoid using this commercially due to the OpenAI API usage. Either way, by using this model, you agree to completely indemnify me. You must also agree to all of the terms in the origina llama-3 license.
null
Non_BioNLP
### Overview Another experimental model, tuend primarily from synthetic data generated by [airoboros](https://github.com/jondurbin/airoboros) The name of this model is "llama-3-airoboros-70b-3.3" and it was built with llama-3 from Meta. This is a fine-tune of llama-3-70b-instruct, and uses the lama-3 instruct chat template. #### Highlights A model built on the airoboros dataset, along with a few friends: - https://huggingface.co/datasets/bluemoon-fandom-1-1-rp-cleaned - https://huggingface.co/datasets/boolq - https://huggingface.co/datasets/jondurbin/gutenberg-dpo-v0.1 - https://huggingface.co/datasets/LDJnr/Capybara - https://huggingface.co/datasets/jondurbin/cinematika-v0.1 - https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2 - https://huggingface.co/datasets/grimulkan/LimaRP-augmented - https://huggingface.co/datasets/piqa - https://huggingface.co/datasets/Vezora/Tested-22k-Python-Alpaca - https://huggingface.co/datasets/mattpscott/airoboros-summarization - https://huggingface.co/datasets/unalignment/toxic-dpo-v0.2 ### Prompt format This model uses the llama-3-instruct prompt template, and is provided in the tokenizer config. You can use the `apply_chat_template` method to accurate format prompts, e.g.: ```python import transformers tokenizer = transformers.AutoTokenizer.from_pretrained("jondurbin/bugle-8b-v0.1", trust_remote_code=True) chat = [ {"role": "system", "content": "You are Bob, a friendly AI assistant."}, {"role": "user", "content": "Hello, how are you?"}, {"role": "assistant", "content": "I'm doing great. How can I help you today?"}, {"role": "user", "content": "I'd like to show off how chat templating works!"}, ] print(tokenizer.apply_chat_template(chat, tokenize=False)) ### Helpful usage tips #### Context obedient question answering By obedient, I mean the model was trained to ignore what it thinks it knows, and uses the context to answer the question. The model was also tuned to limit the values to the provided context as much as possible to reduce hallucinations. The format for a closed-context prompt is as follows: ``` BEGININPUT BEGINCONTEXT [key0: value0] [key1: value1] ... other metdata ... ENDCONTEXT [insert your text blocks here] ENDINPUT [add as many other blocks, in the exact same format] BEGININSTRUCTION [insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.] ENDINSTRUCTION ``` It's also helpful to add "Don't make up answers if you don't know." to your instruction block to make sure if the context is completely unrelated it doesn't make something up. *The __only__ prompts that need this closed context formating are closed-context instructions. Normal questions/instructions do not!* I know it's a bit verbose and annoying, but after much trial and error, using these explicit delimiters helps the model understand where to find the responses and how to associate specific sources with it. - `BEGININPUT` - denotes a new input block - `BEGINCONTEXT` - denotes the block of context (metadata key/value pairs) to associate with the current input block - `ENDCONTEXT` - denotes the end of the metadata block for the current input - [text] - Insert whatever text you want for the input block, as many paragraphs as can fit in the context. - `ENDINPUT` - denotes the end of the current input block - [repeat as many input blocks in this format as you want] - `BEGININSTRUCTION` - denotes the start of the list (or one) instruction(s) to respond to for all of the input blocks above. - [instruction(s)] - `ENDINSTRUCTION` - denotes the end of instruction set It sometimes works without `ENDINSTRUCTION`, but by explicitly including that in the prompt, the model better understands that all of the instructions in the block should be responded to. __Use a very low temperature!__ Here's a trivial, but important example to prove the point: ``` BEGININPUT BEGINCONTEXT date: 2021-01-01 url: https://web.site/123 ENDCONTEXT In a shocking turn of events, blueberries are now green, but will be sticking with the same name. ENDINPUT BEGININSTRUCTION What color are bluberries? Source? ENDINSTRUCTION ``` And the response: ``` Blueberries are now green. Source: date: 2021-01-01 url: https://web.site/123 ``` #### Summarization 500 samples have been included from [this dataset](https://huggingface.co/datasets/mattpscott/airoboros-summarization), using the same format as contextual question answering, for example: ``` BEGININPUT {text to summarize} ENDINPUT BEGININSTRUCTION Summarize the input in around 130 words. ENDINSTRUCTION ``` #### Getting longer responses You can use a few techniques to get longer responses. Detailed prompts, with explicit instruction for word count: ``` Please compose a narrative set in the heart of an ancient library, steeped in the scent of old parchment and ink. The protagonist should be a young scholar who is dedicated to studying the art of storytelling and its evolution throughout history. In her pursuit of knowledge, she stumbles upon a forgotten tome that seems to possess an unusual aura. This book has the ability to bring stories to life, literally manifesting characters and scenarios from within its pages into reality. The main character must navigate through various epochs of storytelling - from oral traditions of tribal societies, through medieval minstrels' tales, to modern-day digital narratives - as they come alive around her. Each era presents its unique challenges and lessons about the power and impact of stories on human civilization. One such character could be a sentient quill pen, who was once used by renowned authors of yesteryears and now holds their wisdom and experiences. It becomes her mentor, guiding her through this journey with witty remarks and insightful commentary. Ensure that your tale encapsulates the thrill of adventure, the beauty of learning, and the profound connection between humans and their stories. All characters involved should be non-human entities. Feel free to explore creative liberties but maintain the mentioned elements. Your response should be approximately 2300 words. ``` Or, a simpler example: ``` Please create a long, detailed story about a dragon in an old growth forest who, for some reason, begins speaking the words of the source code of linux. ``` There are a few examples of next chapter completion as well, e.g.: ``` Write the next chapter of a historical fiction novel set in Paris during the 20th century. Here's a summary of the previous chapter: In the vibrant city of Paris, amid the tumultuous changes of the 20th century, our protagonist Margot, an aspiring fashion designer, has just secured an apprenticeship at a prestigious couture house. She meets Lucien, a charming journalist who covers the fashion industry. Together they navigate the ever-changing world of fashion and society, uncovering secrets that reveal the intricate links between style, politics, and culture. As the chapter concludes, they decide to delve deeper into the hidden corners of the fashion world to unravel its mysteries. Requirements for the next chapter: 1. Character Development of Margot and Lucien: - Margot's Evolution: Unfold more about Margot's past, her dreams of revolutionizing fashion, and her struggle to establish herself in a male-dominated industry. Illustrate her growing expertise, innovative ideas, and increasing dependence on Lucien. - Lucien's Complexity: Introduce uncertainties surrounding Lucien's background and real motives. Increase suspense by suggesting undisclosed information he possesses, while also highlighting his wit and perceptiveness. 2. Exploration of Paris and the Couture House: - Paris: Elaborate their journey through the bustling streets of Paris, including encounters with iconic figures, social unrest, and relics from different eras of French history. - The Couture House: Expand on the grandeur of the couture house they work in, filled with artistic masterpieces, intense competition, and cryptic notes hinting at a scandalous past. 3. Emergence of the Subplot: The Lost Collection: - Discovery: Have Margot and Lucien stumble upon a secret vault containing a lost collection designed before World War II, raising new questions about the previous owner and the influence of war on fashion. - Revelation: Capture their shock as they realize the designs were plagiarized, the potential repercussions, and the opportunities it presents for Margot's career. - Twist: End with a twist that suggests there are other stolen collections across Paris, setting up their new mission. Your response should be approximately 650 words. ``` #### Coding You can ask for fairly complex coding instructions with multiple criteria, e.g.: ``` Create a python application with the following requirements: - Asyncio FastAPI webserver - ping endpoint that returns the current date in JSON format - file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate ``` Or inline criteria: ``` Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values. ``` You can also optionally add a single space and "PLAINFORMAT" at the end of your prompt to avoid backticks, explanations, etc. and just print the code, e.g.: ``` Write a websocket application in node.js. PLAINFORMAT ``` #### Agent/function calling The dataset includes many examples of function/args generation based on input criteria. This is somewhat similar to the OpenAI function calling, but the output is either JSON or YAML. Example prompt: ``` As an AI assistant, please select the most suitable function and parameters from the list of available functions below, based on the user's input. Provide your response in JSON format. Input: I want to know how many times 'Python' is mentioned in my text file. Available functions: file_analytics: description: This tool performs various operations on a text file. params: action: The operation we want to perform on the data, such as "count_occurrences", "find_line", etc. filters: keyword: The word or phrase we want to search for. ``` Response: ```json { "function": "file_analytics", "params": { "action": "count_occurrences", "filters": { "keyword": "Python" } } } ``` #### Chain-of-thought You can ask for several possible responses to a given problem, with a ranking and final answer selection. Example prompt: ``` A group of people decide to play a round-robin tournament where every player plays every other player exactly once. If a total of 45 games were played, how many players participated in the tournament? Offer several potential answers, rank them according to mathematical logic, and pick the most feasible one. ``` Example response: ``` Solution 1: In a round-robin tournament, each player plays every other player exactly once. This means that the total number of games played is equal to the combination of all players taken two at a time (since a game involves two players). The formula for combinations is nC2 = n(n-1)/2, where n is the total number of players. We know that nC2 equals 45 (the total number of games), so we can set up the equation as follows: n(n-1)/2 = 45 Solving this equation gives us n=10. Final answer: There were 10 players in the tournament. Solution 2: Another way to approach this problem is by using the concept of triangular numbers. Triangular numbers are a sequence of numbers where each number can be represented as a triangle with dots. The nth triangular number is given by the sum of the first n natural numbers. If we consider each game as a dot and each player as a side of the triangle, then the total number of games (45) would correspond to the 9th triangular number because 1+2+3+4+5+6+7+8+9=45. However, since each side of the triangle represents a player, and there's one more player than sides in our model (because the last player has no one left to play against), we need to add one more to get the total number of players. Final answer: There were 10 players in the tournament. Solution 3: We could also use trial and error to solve this problem. Starting from a small number of players, we calculate how many games would be played in a round-robin tournament until we reach 45 games. For example, with 2 players, only 1 game is played; with 3 players, 3 games are played; with 4 players, 6 games are played, and so on. Continuing this process, we find that with 10 players, 45 games are played. Final answer: There were 10 players in the tournament. Ranking of solutions from best to worst: 1. Solution 1: This solution uses direct mathematical reasoning based on the properties of a round-robin tournament and solves an equation to find the answer. 2. Solution 2: This solution uses the concept of triangular numbers which requires additional steps and knowledge beyond the immediate problem context, but still arrives at the correct answer. 3. Solution 3: This solution relies on trial and error, which is less efficient and reliable than the other methods, but it eventually gets to the right answer. Best and final answer: There were 10 players in the tournament. ``` #### reWOO style execution planning The model now supports execution planning for complex instructions that would require making use of several tools. The output is just the plan, you must implement a mechanism to parse the output and actually call the functions! Example prompt: ``` Please construct a systematic plan to generate an optimal response to the user instruction, utilizing a set of provided tools. Each plan will correspond to an evidence value, which will be the output of one of the available functions given an input string that could be the user's question, one or more prior evidence values, or a combination of both. Here are the tools available to be called: DuckDuckGo[input]: Tool that enables the user to search for information using the DuckDuckGo search engine. This tool is helpful in locating a suitable list of sites that may contain the answer to the user's query. It does not directly answer the question but finds a list of sites that might have the answer. TextScraper[input]: Load one or more websites from the input string containing newline delimited links, where input is one or more links, and produces plain text output containing the content of the links. HyperlinkExtractor[input]: Extract links from plain text and produces a plain text, newline delimited response of links. KnowledgeModel[input]: Question answering language model, particularly useful in answering questions based on an input passage of text. The input must be a text question that references an :evidence[n]: variable, e.g. What color is the cat, given :evidence1:? The output should be in format: Plan: [first action to take based on input question] :evidence0: = [function to call with input parameter] Plan: [next action to take, based on result of :evidence0:] :evidence1: = [next function to call and input parameter, which may include reference to previous evidence, e.g. "Given context :evidence0"] ... Answer: [:evidence[n]: containing the final answer.] Question: Who won the Nobel Prize in Literature in 2020 and what is their most famous work? ``` Response: ``` Plan: Begin by conducting a web search to find out who won the Nobel Prize in Literature in 2020. :evidence0: = DuckDuckGo[Nobel Prize in Literature 2020 winner] Plan: Utilize the KnowledgeModel to interpret the search results and find the name of the laureate. :evidence1: = KnowledgeModel[Who won the Nobel Prize in Literature in 2020, given :evidence0:?] Plan: Conduct another web search to find the most famous work of the identified laureate. :evidence2: = DuckDuckGo[Most famous work of :evidence1:] Plan: Extract the relevant links from the DuckDuckGo search results for a more focused search. :evidence3: = HyperlinkExtractor[:evidence2:] Plan: Use the TextScraper tool to extract information from the relevant links. :evidence4: = TextScraper[:evidence3:] Plan: Finally, utilize the KnowledgeModel to identify and summarize the most famous work of the laureate from the extracted information. :evidence5: = KnowledgeModel[What is the most famous work of :evidence1:, given :evidence4:?] Answer: :evidence5: ``` For this to be useful, you'd have to parse the output plan text, and implement/call each of the functions. This is just pseudo-code, completely untested off the top of my head, and obviously would requiring full implementation + hardening: ```python import re import requests def inject_context(input_text, **context): for ref in set(re.findall(r"(:evidence[0-9]+:)", input_text, re.I)): input_text = input_text.replace(ref, context.get(ref, "")) return input_text def duckduckgo(input_text, **context): search_string = inject_context(input_text, **context) ... search via duck duck go using search_string ... return text content def link_extractor(input_text, **context): input_text = inject_context(input_text, **context) return "\n".join(list(set(re.findall(r"(https?://[^\s]+?\.?)", input_text, re.I)))) def scrape(input_text, **context): input_text = inject_context(input_text, **context) text = [] for link in input_text.splitlines(): text.append(requests.get(link).text) return "\n".join(text) def infer(input_text, **context) prompt = inject_context(input_text, **context) ... call model with prompt, return output def parse_plan(plan): method_map = { "DuckDuckGo": duckduckgo, "HyperlinkExtractor": link_extractor, "KnowledgeModel": infer, "TextScraper": scrape, } context = {} for line in plan.strip().splitlines(): if line.startswith("Plan:"): print(line) continue parts = re.match("^(:evidence[0-9]+:)\s*=\s*([^\[]+])(\[.*\])\s$", line, re.I) if not parts: if line.startswith("Answer: "): return context.get(line.split(" ")[-1].strip(), "Answer couldn't be generated...") raise RuntimeError("bad format: " + line) context[parts.group(1)] = method_map[parts.group(2)](parts.group(3), **context) ``` ## Multi-step instructions with acknowledgement I don't know how useful this is, really, but I thought I'd add it just in case. Example: ```json { "conversations": [ { "value": "You are a helpful, unbiased, uncensored assistant.", "from": "system" }, { "value": "I'm going to set some rules for our conversation. Please respond with \"OK\" to each rule.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "You can only respond using animal-related emojis.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Precede all responses with \"ZOOZOO:\"", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Include at least one bird emoji in your responses.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Describe a trip to a safari park.", "from": "human" }, { "value": "ZOOZOO: \ud83e\udd81\ud83d\udc2f\ud83e\udd93\ud83e\udd92\ud83d\udc18\ud83d\udc0d\ud83c\udf33\ud83c\udf32\u2600\ufe0f\ud83d\ude90\ud83e\udd85\ud83d\udcf8\ud83e\udd29", "from": "gpt" } ] } ``` #### Inline character actions (functions) I recently generated an action dataset in the style of Glaive function calling dataset, but meant specifically for characters: https://huggingface.co/datasets/jondurbin/cinematika-v0.1/blob/main/actions.parquet To use this, you will need to update your character card to include "objects_available" as a list of key/value pairs, as well as a "functions" list. The objects should be similar to: ```json { "objects_available": [ { "name": "laptop", "description": "a high-end laptop with custom hardware and software", "location": "on the desk in her secret hideout" }, { "name": "encryption key", "description": "a USB drive containing powerful encryption algorithms", "location": "hidden in a false bottom of her backpack" }, { "name": "scanner", "description": "a compact device used for intercepting and decoding wireless signals", "location": "clipped to her belt, always within reach" }, { "name": "VR headset", "description": "a virtual reality headset used for immersive hacking and data visualization", "location": "hanging on a hook near her computer setup" }, { "name": "energy drink", "description": "a can of her favorite energy drink, always on hand for long hacking sessions", "location": "next to her laptop, ready to be opened" } ] } ``` And the functions: ```json { "functions": [ { "name": "move_to", "description": "move to a specified location", "parameters": { "location": { "type": "string", "description": "the location to move to" } } }, { "name": "pick_up", "description": "pick up an object", "parameters": { "object": { "type": "string", "description": "the object to pick up" } } }, { "name": "put_down", "description": "put down an object", "parameters": { "object": { "type": "string", "description": "the object to put down" }, "location": { "type": "string", "description": "the location to put the object down" } } }, { "name": "hack", "description": "attempt to hack into a computer system", "parameters": { "system": { "type": "string", "description": "the computer system to hack" } } }, { "name": "decode", "description": "decode an encrypted message or file", "parameters": { "message": { "type": "string", "description": "the encrypted message or file to decode" } } }, { "name": "scan", "description": "scan for wireless signals and network vulnerabilities", "parameters": {} }, { "name": "analyze", "description": "analyze data for patterns and anomalies", "parameters": { "data": { "type": "string", "description": "the data to analyze" } } }, { "name": "hide", "description": "quickly hide to avoid detection", "parameters": { "location": { "type": "string", "description": "the location to hide" } } } ] } ``` This just becomes part of your character card/system prompt. Then, when you chat with the character and illicit a response that would make use of objects/functions/actions, it should be included as such: ``` prompt: I've heard rumors about a major corporation with a hidden agenda. Do you think you could hack into their system and find out what they're up to? response: I've had my suspicions about them for a while now. Let me see what I can uncover. <|begin_func|>{"name": "move_to", "parameters": {"location": "the desk in her secret hideout"}}<|end_func|> <|begin_func|>{"name": "pick_up", "parameters": {"object": "laptop"}}<|end_func|> Time to put my skills to the test. <|begin_func|>{"name": "hack", "parameters": {"system": "Megacorp X's mainframe"}}<|end_func|> Their firewalls are tough, but not unbreakable. I'm in. Let's see what secrets they're hiding... <|begin_func|>{"name": "analyze", "parameters": {"data": "encrypted files"}}<|end_func|> Interesting. It looks like they've been conducting illegal experiments and covering up the evidence. I'll need to dig deeper to find the proof. ``` Experiment, and find out what works and doesn't. ### Massed Compute Virtual Machine [Massed Compute](https://massedcompute.com/?utm_source=huggingface&utm_creative_format=model_card&utm_content=creator_jon) has created a Virtual Machine (VM) pre-loaded with TGI and Text Generation WebUI. 1) For this model, [create an account](https://bit.ly/jon-durbin) in Massed Compute. When renting a Virtual Machine use the code 'JonDurbin' for 50% your rental. 2) After you created your account update your billing and navigate to the deploy page. 3) Select the following - GPU Type: A6000 - GPU Quantity: 2 - Category: Creator - Image: Jon Durbin - Coupon Code: JonDurbin 4) Deploy the VM! 5) Navigate to 'Running Instances' to retrieve instructions to login to the VM 6) Once inside the VM, open the terminal and run `volume=$PWD/data` 7) Run `model=jondurbin/airoboros-34b-3.3` 8) `sudo docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:1.3 --model-id $model` 9) The model will take some time to load... 10) Once loaded the model will be available on port 8080 For assistance with the VM join the [Massed Compute Discord Server](https://discord.gg/Mj4YMQY3DA) ### Latitude.sh [Latitude](https://www.latitude.sh/r/4BBD657C) has h100 instances available (as of today, 2024-02-08) for $3/hr! They have a few blueprints available for testing LLMs, but a single h100 should be plenty to run this model with 8k ctx. ## Support me - https://bmc.link/jondurbin - ETH 0xce914eAFC2fe52FdceE59565Dd92c06f776fcb11 - BTC bc1qdwuth4vlg8x37ggntlxu5cjfwgmdy5zaa7pswf ### Licence and usage restrictions The airoboros models are built on top of multiple base models, each with their own license/restrictions. The fine-tuning data was mostly generated by OpenAI API calls to gpt-4, via [airoboros](https://github.com/jondurbin/airoboros) The ToS for OpenAI API usage has a clause preventing the output from being used to train a model that __competes__ with OpenAI - what does *compete* actually mean here? - these small open source models will not produce output anywhere near the quality of gpt-4, or even gpt-3.5, so I can't imagine this could credibly be considered competing in the first place - if someone else uses the dataset to do the same, they wouldn't necessarily be violating the ToS because they didn't call the API, so I don't know how that works - the training data used in essentially all large language models includes a significant amount of copyrighted or otherwise non-permissive licensing in the first place - other work using the self-instruct method, e.g. the original here: https://github.com/yizhongw/self-instruct released the data and model as apache-2 I am purposingly leaving this license ambiguous (other than the fact you must comply with the Meta original license for llama-2) because I am not a lawyer and refuse to attempt to interpret all of the terms accordingly. Your best bet is probably to avoid using this commercially due to the OpenAI API usage. Either way, by using this model, you agree to completely indemnify me. You must also agree to all of the terms in the origina llama-3 license.
{"base_model": "meta-llama/Meta-Llama-3-8B", "datasets": ["jondurbin/airoboros-3.2", "bluemoon-fandom-1-1-rp-cleaned", "boolq", "jondurbin/gutenberg-dpo-v0.1", "LDJnr/Capybara", "jondurbin/cinematika-v0.1", "glaiveai/glaive-function-calling-v2", "grimulkan/LimaRP-augmented", "piqa", "Vezora/Tested-22k-Python-Alpaca", "mattpscott/airoboros-summarization", "unalignment/toxic-dpo-v0.2"], "license": "other", "license_name": "llama3", "license_link": "https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE", "tags": ["llama-3"]}
task
[ "QUESTION_ANSWERING", "SUMMARIZATION" ]
46,424
gokulsrinivasagan/distilbert_lda_5_qqp
gokulsrinivasagan
text-classification
[ "transformers", "tensorboard", "safetensors", "distilbert", "text-classification", "generated_from_trainer", "en", "dataset:glue", "base_model:gokulsrinivasagan/distilbert_lda_5", "base_model:finetune:gokulsrinivasagan/distilbert_lda_5", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-11-22T09:41:32Z
2024-11-22T10:51:20+00:00
5
0
--- base_model: gokulsrinivasagan/distilbert_lda_5 datasets: - glue language: - en library_name: transformers metrics: - accuracy - f1 tags: - generated_from_trainer model-index: - name: distilbert_lda_5_qqp results: - task: type: text-classification name: Text Classification dataset: name: GLUE QQP type: glue args: qqp metrics: - type: accuracy value: 0.6318327974276527 name: Accuracy - type: f1 value: 0.0 name: F1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert_lda_5_qqp This model is a fine-tuned version of [gokulsrinivasagan/distilbert_lda_5](https://huggingface.co/gokulsrinivasagan/distilbert_lda_5) on the GLUE QQP dataset. It achieves the following results on the evaluation set: - Loss: 0.6573 - Accuracy: 0.6318 - F1: 0.0 - Combined Score: 0.3159 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.001 - train_batch_size: 256 - eval_batch_size: 256 - seed: 10 - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: linear - num_epochs: 30 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Combined Score | |:-------------:|:-----:|:-----:|:---------------:|:--------:|:---:|:--------------:| | 0.6659 | 1.0 | 1422 | 0.6586 | 0.6318 | 0.0 | 0.3159 | | 0.659 | 2.0 | 2844 | 0.6576 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 3.0 | 4266 | 0.6582 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 4.0 | 5688 | 0.6574 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 5.0 | 7110 | 0.6574 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 6.0 | 8532 | 0.6580 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 7.0 | 9954 | 0.6573 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 8.0 | 11376 | 0.6573 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 9.0 | 12798 | 0.6578 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 10.0 | 14220 | 0.6578 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 11.0 | 15642 | 0.6580 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 12.0 | 17064 | 0.6578 | 0.6318 | 0.0 | 0.3159 | ### Framework versions - Transformers 4.46.3 - Pytorch 2.2.1+cu118 - Datasets 2.17.0 - Tokenizers 0.20.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert_lda_5_qqp This model is a fine-tuned version of [gokulsrinivasagan/distilbert_lda_5](https://huggingface.co/gokulsrinivasagan/distilbert_lda_5) on the GLUE QQP dataset. It achieves the following results on the evaluation set: - Loss: 0.6573 - Accuracy: 0.6318 - F1: 0.0 - Combined Score: 0.3159 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.001 - train_batch_size: 256 - eval_batch_size: 256 - seed: 10 - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: linear - num_epochs: 30 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Combined Score | |:-------------:|:-----:|:-----:|:---------------:|:--------:|:---:|:--------------:| | 0.6659 | 1.0 | 1422 | 0.6586 | 0.6318 | 0.0 | 0.3159 | | 0.659 | 2.0 | 2844 | 0.6576 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 3.0 | 4266 | 0.6582 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 4.0 | 5688 | 0.6574 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 5.0 | 7110 | 0.6574 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 6.0 | 8532 | 0.6580 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 7.0 | 9954 | 0.6573 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 8.0 | 11376 | 0.6573 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 9.0 | 12798 | 0.6578 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 10.0 | 14220 | 0.6578 | 0.6318 | 0.0 | 0.3159 | | 0.6586 | 11.0 | 15642 | 0.6580 | 0.6318 | 0.0 | 0.3159 | | 0.6585 | 12.0 | 17064 | 0.6578 | 0.6318 | 0.0 | 0.3159 | ### Framework versions - Transformers 4.46.3 - Pytorch 2.2.1+cu118 - Datasets 2.17.0 - Tokenizers 0.20.3
{"base_model": "gokulsrinivasagan/distilbert_lda_5", "datasets": ["glue"], "language": ["en"], "library_name": "transformers", "metrics": ["accuracy", "f1"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert_lda_5_qqp", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "GLUE QQP", "type": "glue", "args": "qqp"}, "metrics": [{"type": "accuracy", "value": 0.6318327974276527, "name": "Accuracy"}, {"type": "f1", "value": 0.0, "name": "F1"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,425
Trelis/all-MiniLM-L12-v2-ft-pairs-balanced
Trelis
sentence-similarity
[ "sentence-transformers", "safetensors", "bert", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:73", "loss:CoSENTLoss", "arxiv:1908.10084", "base_model:sentence-transformers/all-MiniLM-L12-v2", "base_model:finetune:sentence-transformers/all-MiniLM-L12-v2", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-06-19T14:28:08Z
2024-06-19T14:28:13+00:00
8
0
--- base_model: sentence-transformers/all-MiniLM-L12-v2 datasets: [] language: [] library_name: sentence-transformers pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:73 - loss:CoSENTLoss widget: - source_sentence: What happens if a player in possession is touched while on or behind their defending try line? sentences: - " the Dead Ball Lines. There are two (2), one (1) at each end of the \nField of\ \ Play. See Appendix 1.\nInterchange\nThe act of an on-field player leaving the\ \ Field of Play to be replaced \nby an off-field player entering the Field of\ \ Play.\nInterchange Area\nA marked rectangle for each Team on opposite sides\ \ of the Field \nof Play usually measuring 20 metres long by no more than five\ \ (5) \nmetres wide, extending ten (10) metres either side of the Halfway \nLine\ \ and not less than one (1) metre from the Sideline. It is the area \nin which\ \ all off-field players must remain until an Interchange is \ninitiated. See Appendix\ \ 1.\nKick\nStrike or propel forcibly with the foot, a blow or forceful thrust\ \ with \nthe foot to the ball. A Tap to commence or recommence play or a \nPenalty\ \ Tap is not defined as a kick.\nLine Markings\nMarkings of the Field of Play.\ \ See Appendix 1.\nLink\nThe player beside the Wing player.\nMark (for a Tap)\n\ The centre of the Halfway Line for the commencement or \nrecommencement of play,\ \ or the position where a Penalty Tap is \nawarded as a result of an Infringement.\n\ Mark (for a Touch)\nThe position in the Field of Play where the player in Possession\ \ was \nat the time the Touch was made.\nFIT Playing Rules - 5th Edition\n2\n\ COPYRIGHT © Touch Football Australia 2020\nMiddle\nThe player inside the Link\ \ player.\nNTA\nNational Touch Association\nAs defined in the FIT Constitution.\n\ Obstruction\nA deliberate attempt by either an attacking or defending player \n\ to gain an unfair Advantage by interfering with the opposition to \nprevent them\ \ from gaining a rightful Advantage.\nOffside (Attacker)\nAn attacking player\ \ in a position Forward of the ball.\nOffside (Defender)\nA defending player in\ \ a position closer than seven (7) metres from \nthe Mark of the Rollball; or\ \ ten (10) metres from the Mark of a Tap.\nOnside\nA position whereby a player\ \ may legitimately become involved with \nplay. A player with both feet on or\ \ behind their Defending Try Line.\nPass\nThe act of changing Possession between\ \ individual attacking \nplayers by propelling the ball laterally and/or backwards\ \ and may \ninclude a flick, knock or throw.\nPer" - " Player\nThe player who replaces another player during Interchange. There is\ \ \na maximum of eight (8) substitute players in any Team and except \nwhen interchanging,\ \ in the Sin Bin, dismissed or on the Field of Play, \nthey must remain in the\ \ Substitution Box.\nTap and Tap Penalty\nThe method of commencing the match,\ \ recommencing the match \nafter Half Time and after a Try has been scored. The\ \ Tap is also the \nmethod of recommencing play when a Penalty is awarded. The\ \ Tap \nis taken by placing the ball on the ground at or behind the Mark, \nreleasing\ \ both hands from the ball, tapping the ball gently with either \nfoot or touching\ \ the foot on the ball. The ball must not roll or move \nmore than one (1) metre\ \ in any direction and must be retrieved \ncleanly, without touching the ground\ \ again. The player may face any \ndirection and use either foot. Provided it\ \ is at the Mark, the ball does \nnot have to be lifted from the ground prior\ \ to a Tap being taken.\nTeam\nA group of players constituting one (1) side in\ \ a competition match.\nTFA\nTouch Football Australia Limited\nTouch\nAny contact\ \ between the player in Possession and a defending \nplayer. A Touch includes\ \ contact on the ball, hair or clothing and may \nbe made by a defending player\ \ or by the player in Possession.\nTouch Count\nThe progressive number of Touches\ \ that each Team has before a \nChange of Possession, from zero (0) to six (6).\n\ Try\nThe result of any attacking player, except the Half, placing the ball on\ \ \nor over the Team’s Attacking Try Line before being Touched.\nTry Lines\nThe\ \ lines separating the In-Goal Areas from the Field of Play. See \nAppendix 1.\n\ Voluntary Rollball\nThe player in Possession performs a Rollball before a Touch\ \ is made \nwith a defending player.\nWing\nThe player outside the Link player.\n\ Winner\nThe Team that scores the most Tries during the match.\nFIT Playing Rules\ \ - 5th Edition\n4\nCOPYRIGHT © Touch Football Australia 2020\n Rules of Play\ \ \n Mode of Play \nThe object of the game of Touch is for each Team to score\ \ Tries and to prevent the \nopposition from scoring. The ball may be passed,\ \ knocked or handed between players \nof the Attacking Team who may in turn run" - " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n\ 6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement\ \ of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n\ 9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n\ 11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n\ 14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced\ \ Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n\ 17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\n Definitions and Terminology \nUnless the contrary\ \ intention appears, the following definitions and terminology apply \nto the game\ \ of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time\ \ after an Infringement in which the non-offending \nside has the opportunity\ \ to gain Advantage either territorial, tactical \nor in the form of a Try.\n\ Attacking Try Line\nThe line on or over which a player has to place the ball to\ \ \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\n\ Behind\nA position or direction towards a Team’s Defending Try Line.\nChange of\ \ Possession\nThe act of moving control of the ball from one Team to the other.\n\ Dead/Dead Ball\nWhen the ball is out of play including the period following a\ \ Try and \nuntil the match is recommenced and when the ball goes to ground \n\ and/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\n\ Dead Ball Line\nThe end boundaries of the Field of Play. There is one at each\ \ end of \nthe Field of Play. See Appendix 1.\nDef" - source_sentence: What happens to a player who is sent to the Sin Bin Area in Touch Rugby International Rules? sentences: - " to the Sin Bin must return to the Interchange Area prior to re-\nentering the\ \ Field of Play.\n22.4\tAny action that causes the Touch Count to restart will\ \ result in a continuation of \nthat Possession. For the avoidance of doubt, should\ \ a defender knock the ball \ndown or give away a Penalty, this does not mean\ \ that the Possession has been \ncompleted, but rather the Possession continues.\ \ \nFIT Playing Rules - 5th Edition\n16\nCOPYRIGHT © Touch Football Australia\ \ 2020\n23  Dismissal \n23.1\tA player or official dismissed for misconduct is\ \ to take no further part in that \nmatch and is to move to and remain outside\ \ the Perimeter for the remainder of \nthe match.\n23.2\tThe dismissed player\ \ or official cannot be replaced and, in accordance with NTA \nDisciplinary Regulations,\ \ that player shall receive an automatic two (2) match \nsuspension. \n24  Drop-Off\ \ \n24.1\tShould a Winner be required in drawn matches, the following Drop-Off\ \ \nprocedure is used to determine a Winner.\n24.1.1\tEach Team will reduce their\ \ on-field Team to four (4) players and within \n60 seconds take up a position\ \ to restart play from the Halfway Line, \ndefending the same end of the field\ \ as at the End of Play.\n24.1.2\tThe Drop-Off commences with a Tap from the centre\ \ of the Halfway Line \nby the Team that did not commence the match with Possession.\n\ 24.1.3\tThe Drop-Off will commence with a two (2) minute period of extra time.\n\ 24.1.4\tShould a Team be leading at the expiration of the two (2) minute period\ \ \nof extra time then that Team will be declared the Winner and Match \ncomplete.\n\ 24.1.5\tShould neither Team be leading at the expiration of two (2) minutes, a\ \ \nsignal is given and the match will pause at the next Touch or Dead Ball. \n\ Each Team will then remove another player from the Field of Play.\n24.1.6\tThe\ \ Match will recommence immediately after the players have left the \nfield at\ \ the same place where it paused (i.e. the Team retains Possession \nat the designated\ \ number of Touches, or at Change of Possession due to \nsome Infringement or\ \ the sixth Touch) and the Match will continue until" - " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n\ 6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement\ \ of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n\ 9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n\ 11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n\ 14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced\ \ Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n\ 17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\n Definitions and Terminology \nUnless the contrary\ \ intention appears, the following definitions and terminology apply \nto the game\ \ of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time\ \ after an Infringement in which the non-offending \nside has the opportunity\ \ to gain Advantage either territorial, tactical \nor in the form of a Try.\n\ Attacking Try Line\nThe line on or over which a player has to place the ball to\ \ \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\n\ Behind\nA position or direction towards a Team’s Defending Try Line.\nChange of\ \ Possession\nThe act of moving control of the ball from one Team to the other.\n\ Dead/Dead Ball\nWhen the ball is out of play including the period following a\ \ Try and \nuntil the match is recommenced and when the ball goes to ground \n\ and/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\n\ Dead Ball Line\nThe end boundaries of the Field of Play. There is one at each\ \ end of \nthe Field of Play. See Appendix 1.\nDef" - " to the Sin Bin must return to the Interchange Area prior to re-\nentering the\ \ Field of Play.\n22.4\tAny action that causes the Touch Count to restart will\ \ result in a continuation of \nthat Possession. For the avoidance of doubt, should\ \ a defender knock the ball \ndown or give away a Penalty, this does not mean\ \ that the Possession has been \ncompleted, but rather the Possession continues.\ \ \nFIT Playing Rules - 5th Edition\n16\nCOPYRIGHT © Touch Football Australia\ \ 2020\n23  Dismissal \n23.1\tA player or official dismissed for misconduct is\ \ to take no further part in that \nmatch and is to move to and remain outside\ \ the Perimeter for the remainder of \nthe match.\n23.2\tThe dismissed player\ \ or official cannot be replaced and, in accordance with NTA \nDisciplinary Regulations,\ \ that player shall receive an automatic two (2) match \nsuspension. \n24  Drop-Off\ \ \n24.1\tShould a Winner be required in drawn matches, the following Drop-Off\ \ \nprocedure is used to determine a Winner.\n24.1.1\tEach Team will reduce their\ \ on-field Team to four (4) players and within \n60 seconds take up a position\ \ to restart play from the Halfway Line, \ndefending the same end of the field\ \ as at the End of Play.\n24.1.2\tThe Drop-Off commences with a Tap from the centre\ \ of the Halfway Line \nby the Team that did not commence the match with Possession.\n\ 24.1.3\tThe Drop-Off will commence with a two (2) minute period of extra time.\n\ 24.1.4\tShould a Team be leading at the expiration of the two (2) minute period\ \ \nof extra time then that Team will be declared the Winner and Match \ncomplete.\n\ 24.1.5\tShould neither Team be leading at the expiration of two (2) minutes, a\ \ \nsignal is given and the match will pause at the next Touch or Dead Ball. \n\ Each Team will then remove another player from the Field of Play.\n24.1.6\tThe\ \ Match will recommence immediately after the players have left the \nfield at\ \ the same place where it paused (i.e. the Team retains Possession \nat the designated\ \ number of Touches, or at Change of Possession due to \nsome Infringement or\ \ the sixth Touch) and the Match will continue until" - source_sentence: Under what circumstances can a player perform a Rollball seven (7) metres in-field? sentences: - "\tIf a player mishandles the ball and even if in an effort to gain control, the\ \ ball \nis accidentally knocked Forward into any other Player, a Change of Possession\ \ \nresults.\n10  The Touch \n10.1\tA Touch may be made by either a defending\ \ player or a player in Possession.\n10.2\tA defending player may not claim a\ \ Touch if contact has not been made. If a \nplayer claims a Touch has been made,\ \ but the Referee is unsure the Touch will \ncount.\nRuling = A Penalty to the\ \ Attacking Team at the point of the Infringement and the offending \nplayer sent\ \ to the Sin Bin.\n10.3\tPlayers of both Defending and Attacking Teams are to\ \ use the minimum force \nnecessary to make a Touch. Players must ensure that\ \ the method employed in \nmaking a Touch does not pose an unnecessary risk to\ \ player safety.\nRuling = A Penalty to the non-offending Team at the point of\ \ the Infringement.\n10.4\tIf the ball is accidentally knocked from the hands\ \ of a player in Possession \nduring a Touch, the Touch counts and the Attacking\ \ Team retains Possession.\n10.5\tThe defending player must not deliberately knock\ \ the ball from the hands of a \nplayer in Possession during a Touch.\n Ruling\ \ = A Penalty to the Attacking Team at the point of the Infringement.\n10.6\t\ A player must not pass or otherwise deliver the ball after a Touch has been \n\ made.\nRuling = A Penalty to the Defending Team at the point of the Infringement,\ \ or if In-Goal the \nnearest point on the seven (7) metre line.\n10.7\tThe Half\ \ may pass or run with the ball but cannot get Touched while in \nPossession of\ \ the ball.\nRuling = A Change of Possession occurs at the point of the Touch,\ \ or if In-Goal the nearest \npoint on the seven (7) metre line.\n10.8\tIf a Touch\ \ is made in the In-Goal Area before the ball is grounded, the player in \nPossession\ \ is to perform a Rollball seven (7) metres from the Team’s Attacking \nTry Line,\ \ provided it is not the sixth Touch and the player is not Half.\n10.9\tIf a\ \ player in Possession is Touched while on or behind their Defending Try Line,\ \ \nthe Touch counts and once the Referee sets the Mark seven (" - " a player enters the Field of Play but does not impede the scoring of a Try the\ \ \noffending player will be sent to the Sin Bin.\n17.8\tFollowing a Try, players\ \ may Interchange at will, without having to wait for the \nplayer to enter the\ \ Interchange Area, but must do so prior to the Tap being taken \nto recommence\ \ play.\n18  Penalty \n18.1\tThe Tap must be performed in accordance with the\ \ Definitions.\nRuling = The Referee will instruct the offending Team to return\ \ to the Mark and perform the \nTap again.\n18.2\tFor Infringements that occur\ \ between seven (7) metre lines, the Mark for the \nPenalty Tap is at the point\ \ of Infringement unless otherwise indicated by the \nReferee. \n18.3\tFor Infringements\ \ that occur within the Seven Metre Zone the Tap must be \ntaken at the nearest\ \ seven (7) metre line.\n18.4\tFor Infringements that occur beyond the Field of\ \ Play or in the In-Goal Area \nthe Mark is seven (7) metres infield from the\ \ Sideline, or directly Forward of \nthe Infringement on the seven (7) metre line\ \ nearest the Infringement or at a \nposition indicated by the Referee.\n18.5\t\ The Mark must be indicated by the Referee before a Penalty Tap is taken.\n18.6\t\ The Penalty Tap must be performed without delay after the Referee indicates \n\ the Mark.\nRuling = A Penalty to the non-offending team at the point of Infringement.\n\ 18.7\tA player may perform a Rollball instead of a Penalty Tap and the player\ \ who \nreceives the ball does not become the Half.\n18.8\tIf the Defending Team\ \ is penalised three (3) times upon entering their Seven \nMetre Zone during a\ \ single Possession, the last offending player will be given an \nExclusion until\ \ the end of that Possession.\n18.9\tA Penalty Try is awarded if any action by\ \ a player, Team official or spectator, \ndeemed by the Referee to be contrary\ \ to the Rules or spirit of the game clearly \nprevents the Attacking Team from\ \ scoring a Try.\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football\ \ Australia 2020\n15\n19  Advantage \n19.1\tWhere a Defending Team player is\ \ Offside at a Tap or" - " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n\ 6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement\ \ of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n\ 9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n\ 11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n\ 14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced\ \ Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n\ 17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\n Definitions and Terminology \nUnless the contrary\ \ intention appears, the following definitions and terminology apply \nto the game\ \ of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time\ \ after an Infringement in which the non-offending \nside has the opportunity\ \ to gain Advantage either territorial, tactical \nor in the form of a Try.\n\ Attacking Try Line\nThe line on or over which a player has to place the ball to\ \ \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\n\ Behind\nA position or direction towards a Team’s Defending Try Line.\nChange of\ \ Possession\nThe act of moving control of the ball from one Team to the other.\n\ Dead/Dead Ball\nWhen the ball is out of play including the period following a\ \ Try and \nuntil the match is recommenced and when the ball goes to ground \n\ and/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\n\ Dead Ball Line\nThe end boundaries of the Field of Play. There is one at each\ \ end of \nthe Field of Play. See Appendix 1.\nDef" - source_sentence: What is the primary responsibility of the Referee during a Touch Rugby match? sentences: - " related matters inside the Perimeter \nfor the Duration of a match, has jurisdiction\ \ over all players, coaches and \nofficials and is required to:\n25.1.1\tInspect\ \ the Field of Play, Line Markings and Markers prior to the \ncommencement of\ \ the Match to ensure the safety of all participants.\n25.1.2\tAdjudicate on the\ \ Rules of the game;\n25.1.3\tImpose any sanction necessary to control the match;\n\ 25.1.4\tAward Tries and record the progressive score;\n25.1.5\tMaintain a count\ \ of Touches during each Possession;\n25.1.6\tAward Penalties for Infringements\ \ against the Rules; and\n25.1.7\tReport to the relevant competition administration\ \ any Sin Bins, \nDismissals or injuries to any participant sustained during a\ \ Match.\n25.2\tOnly Team captains are permitted to seek clarification of a decision\ \ directly \nfrom the Referee. An approach may only be made during a break in\ \ play or at \nthe discretion of the Referee.\nFIT Playing Rules - 5th Edition\n\ 18\nCOPYRIGHT © Touch Football Australia 2020\nHALFWAY LINE\nSIN BIN AREAS\nIN-GOAL\ \ AREA\nTRY LINE\n7 M ZONE\nDEAD BALL LINE\nPERIMETER\nINTERCHANGE\nAREA\n20M\n\ 10M\n10M\n1M\n5M\n7 M\n7 M\n7 M\n7 M\n50M\n3M\n70M\nINTERCHANGE\nAREA\n Appendix\ \ 1 – Field of Play\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football\ \ Australia 2020\n19\nFEDERATION OF INTERNATIONAL TOUCH\n" - " Player\nThe player who replaces another player during Interchange. There is\ \ \na maximum of eight (8) substitute players in any Team and except \nwhen interchanging,\ \ in the Sin Bin, dismissed or on the Field of Play, \nthey must remain in the\ \ Substitution Box.\nTap and Tap Penalty\nThe method of commencing the match,\ \ recommencing the match \nafter Half Time and after a Try has been scored. The\ \ Tap is also the \nmethod of recommencing play when a Penalty is awarded. The\ \ Tap \nis taken by placing the ball on the ground at or behind the Mark, \nreleasing\ \ both hands from the ball, tapping the ball gently with either \nfoot or touching\ \ the foot on the ball. The ball must not roll or move \nmore than one (1) metre\ \ in any direction and must be retrieved \ncleanly, without touching the ground\ \ again. The player may face any \ndirection and use either foot. Provided it\ \ is at the Mark, the ball does \nnot have to be lifted from the ground prior\ \ to a Tap being taken.\nTeam\nA group of players constituting one (1) side in\ \ a competition match.\nTFA\nTouch Football Australia Limited\nTouch\nAny contact\ \ between the player in Possession and a defending \nplayer. A Touch includes\ \ contact on the ball, hair or clothing and may \nbe made by a defending player\ \ or by the player in Possession.\nTouch Count\nThe progressive number of Touches\ \ that each Team has before a \nChange of Possession, from zero (0) to six (6).\n\ Try\nThe result of any attacking player, except the Half, placing the ball on\ \ \nor over the Team’s Attacking Try Line before being Touched.\nTry Lines\nThe\ \ lines separating the In-Goal Areas from the Field of Play. See \nAppendix 1.\n\ Voluntary Rollball\nThe player in Possession performs a Rollball before a Touch\ \ is made \nwith a defending player.\nWing\nThe player outside the Link player.\n\ Winner\nThe Team that scores the most Tries during the match.\nFIT Playing Rules\ \ - 5th Edition\n4\nCOPYRIGHT © Touch Football Australia 2020\n Rules of Play\ \ \n Mode of Play \nThe object of the game of Touch is for each Team to score\ \ Tries and to prevent the \nopposition from scoring. The ball may be passed,\ \ knocked or handed between players \nof the Attacking Team who may in turn run" - "1\twhen a Change of Possession takes place due to a player in Possession \nmaking\ \ contact with the Sideline or any ground outside the Field of Play, \nprior to\ \ a Touch being made; or\n13.6.2\twhen the ball not in Possession of a player\ \ makes contact with the \nSideline or any ground outside the Field of Play.\n\ 13.7\tA player may not perform a Tap in replacement of a Rollball.\nRuling = The\ \ offending Team must return to the Mark and perform the Rollball.\n13.8\tAn attacking\ \ player, other than the player performing the Rollball, may receive \nthe ball\ \ at the Rollball and shall do so without delay. That player is referred to as\ \ \nthe Half.\n13.9\tThe Half may control the ball with a foot prior to picking\ \ up the ball. \n13.10\tA player ceases to be the Half once the ball is passed\ \ to another player.\n13.11\tDefending players are not to interfere with the performance\ \ of the Rollball or the \nHalf. \nRuling = A Penalty to the Attacking Team at\ \ a point ten (10) metres directly Forward of the \nInfringement.\n13.12\tPlayers\ \ of the Defending Team must not move Forward of the Onside position \nuntil the\ \ Half has made contact with the ball, unless directed to do so by the \nReferee\ \ or in accordance with 13.12.1.\n13.12.1\tWhen the Half is not within one (1)\ \ metre of the Rollball, Onside players \nof the Defending Team may move Forward\ \ as soon as the player \nperforming the Rollball releases the ball. If the Half\ \ is not in position and \na defending player moves Forward and makes contact\ \ with the ball, a \nChange of Possession results.\n13.13\tIf in the act of performing\ \ the Rollball, the Attacking player makes contact with \nthe Sideline or any\ \ ground outside the Field of Play a Change of Possession will \noccur with the\ \ Rollball to be taken seven (7) metres in field.\n13.14\tAfter a Touch is made\ \ between the Dead Ball Line and the seven (7) metre line, \nan Attacking Team\ \ is permitted to Rollball on the seven (7) metre line at a point \ndirectly in\ \ line with where the Touch was made.\nFIT Playing Rules - 5th Edition\n12\nCOPYRIGHT\ \ © Touch Football Australia" - source_sentence: What happens if a player deliberately delays the changeover procedure after a Change of Possession? sentences: - " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n\ 6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement\ \ of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n\ 9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n\ 11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n\ 14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced\ \ Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n\ 17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\n Definitions and Terminology \nUnless the contrary\ \ intention appears, the following definitions and terminology apply \nto the game\ \ of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time\ \ after an Infringement in which the non-offending \nside has the opportunity\ \ to gain Advantage either territorial, tactical \nor in the form of a Try.\n\ Attacking Try Line\nThe line on or over which a player has to place the ball to\ \ \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\n\ Behind\nA position or direction towards a Team’s Defending Try Line.\nChange of\ \ Possession\nThe act of moving control of the ball from one Team to the other.\n\ Dead/Dead Ball\nWhen the ball is out of play including the period following a\ \ Try and \nuntil the match is recommenced and when the ball goes to ground \n\ and/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\n\ Dead Ball Line\nThe end boundaries of the Field of Play. There is one at each\ \ end of \nthe Field of Play. See Appendix 1.\nDef" - " related matters inside the Perimeter \nfor the Duration of a match, has jurisdiction\ \ over all players, coaches and \nofficials and is required to:\n25.1.1\tInspect\ \ the Field of Play, Line Markings and Markers prior to the \ncommencement of\ \ the Match to ensure the safety of all participants.\n25.1.2\tAdjudicate on the\ \ Rules of the game;\n25.1.3\tImpose any sanction necessary to control the match;\n\ 25.1.4\tAward Tries and record the progressive score;\n25.1.5\tMaintain a count\ \ of Touches during each Possession;\n25.1.6\tAward Penalties for Infringements\ \ against the Rules; and\n25.1.7\tReport to the relevant competition administration\ \ any Sin Bins, \nDismissals or injuries to any participant sustained during a\ \ Match.\n25.2\tOnly Team captains are permitted to seek clarification of a decision\ \ directly \nfrom the Referee. An approach may only be made during a break in\ \ play or at \nthe discretion of the Referee.\nFIT Playing Rules - 5th Edition\n\ 18\nCOPYRIGHT © Touch Football Australia 2020\nHALFWAY LINE\nSIN BIN AREAS\nIN-GOAL\ \ AREA\nTRY LINE\n7 M ZONE\nDEAD BALL LINE\nPERIMETER\nINTERCHANGE\nAREA\n20M\n\ 10M\n10M\n1M\n5M\n7 M\n7 M\n7 M\n7 M\n50M\n3M\n70M\nINTERCHANGE\nAREA\n Appendix\ \ 1 – Field of Play\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football\ \ Australia 2020\n19\nFEDERATION OF INTERNATIONAL TOUCH\n" - " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n\ 6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement\ \ of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n\ 9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n\ 11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n\ 14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced\ \ Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n\ 17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch\ \ Football Australia 2020\n Definitions and Terminology \nUnless the contrary\ \ intention appears, the following definitions and terminology apply \nto the game\ \ of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time\ \ after an Infringement in which the non-offending \nside has the opportunity\ \ to gain Advantage either territorial, tactical \nor in the form of a Try.\n\ Attacking Try Line\nThe line on or over which a player has to place the ball to\ \ \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\n\ Behind\nA position or direction towards a Team’s Defending Try Line.\nChange of\ \ Possession\nThe act of moving control of the ball from one Team to the other.\n\ Dead/Dead Ball\nWhen the ball is out of play including the period following a\ \ Try and \nuntil the match is recommenced and when the ball goes to ground \n\ and/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\n\ Dead Ball Line\nThe end boundaries of the Field of Play. There is one at each\ \ end of \nthe Field of Play. See Appendix 1.\nDef" --- # SentenceTransformer based on sentence-transformers/all-MiniLM-L12-v2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-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:** [sentence-transformers/all-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2) <!-- at revision a05860a77cef7b37e0048a7864658139bc18a854 --> - **Maximum Sequence Length:** 128 tokens - **Output Dimensionality:** 384 tokens - **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': 128, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("Trelis/all-MiniLM-L12-v2-ft-pairs-balanced") # Run inference sentences = [ 'What happens if a player deliberately delays the changeover procedure after a Change of Possession?', ' Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef', ' Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 384] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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 ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: steps - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `learning_rate`: 1e-05 - `num_train_epochs`: 1 - `lr_scheduler_type`: cosine - `warmup_ratio`: 0.3 - `bf16`: True #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 1e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 1 - `max_steps`: -1 - `lr_scheduler_type`: cosine - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.3 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: True - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | loss | |:------:|:----:|:-------------:|:------:| | 0.1053 | 2 | 4.6868 | - | | 0.1579 | 3 | - | 2.7075 | | 0.2105 | 4 | 5.703 | - | | 0.3158 | 6 | 2.1691 | 2.6412 | | 0.4211 | 8 | 1.705 | - | | 0.4737 | 9 | - | 2.6254 | | 0.5263 | 10 | 1.7985 | - | | 0.6316 | 12 | 3.4822 | 2.6087 | | 0.7368 | 14 | 4.2724 | - | | 0.7895 | 15 | - | 2.6000 | | 0.8421 | 16 | 3.1489 | - | | 0.9474 | 18 | 5.7594 | 2.6032 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.41.2 - PyTorch: 2.1.1+cu121 - Accelerate: 0.31.0 - Datasets: 2.17.1 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### CoSENTLoss ```bibtex @online{kexuefm-8847, title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT}, author={Su Jianlin}, year={2022}, month={Jan}, url={https://kexue.fm/archives/8847}, } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SentenceTransformer based on sentence-transformers/all-MiniLM-L12-v2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-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:** [sentence-transformers/all-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2) <!-- at revision a05860a77cef7b37e0048a7864658139bc18a854 --> - **Maximum Sequence Length:** 128 tokens - **Output Dimensionality:** 384 tokens - **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': 128, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("Trelis/all-MiniLM-L12-v2-ft-pairs-balanced") # Run inference sentences = [ 'What happens if a player deliberately delays the changeover procedure after a Change of Possession?', ' Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef', ' Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 384] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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 ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: steps - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `learning_rate`: 1e-05 - `num_train_epochs`: 1 - `lr_scheduler_type`: cosine - `warmup_ratio`: 0.3 - `bf16`: True #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 1e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 1 - `max_steps`: -1 - `lr_scheduler_type`: cosine - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.3 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: True - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | loss | |:------:|:----:|:-------------:|:------:| | 0.1053 | 2 | 4.6868 | - | | 0.1579 | 3 | - | 2.7075 | | 0.2105 | 4 | 5.703 | - | | 0.3158 | 6 | 2.1691 | 2.6412 | | 0.4211 | 8 | 1.705 | - | | 0.4737 | 9 | - | 2.6254 | | 0.5263 | 10 | 1.7985 | - | | 0.6316 | 12 | 3.4822 | 2.6087 | | 0.7368 | 14 | 4.2724 | - | | 0.7895 | 15 | - | 2.6000 | | 0.8421 | 16 | 3.1489 | - | | 0.9474 | 18 | 5.7594 | 2.6032 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.41.2 - PyTorch: 2.1.1+cu121 - Accelerate: 0.31.0 - Datasets: 2.17.1 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### CoSENTLoss ```bibtex @online{kexuefm-8847, title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT}, author={Su Jianlin}, year={2022}, month={Jan}, url={https://kexue.fm/archives/8847}, } ``` <!-- ## 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.* -->
{"base_model": "sentence-transformers/all-MiniLM-L12-v2", "datasets": [], "language": [], "library_name": "sentence-transformers", "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:73", "loss:CoSENTLoss"], "widget": [{"source_sentence": "What happens if a player in possession is touched while on or behind their defending try line?", "sentences": [" the Dead Ball Lines. There are two (2), one (1) at each end of the \nField of Play. See Appendix 1.\nInterchange\nThe act of an on-field player leaving the Field of Play to be replaced \nby an off-field player entering the Field of Play.\nInterchange Area\nA marked rectangle for each Team on opposite sides of the Field \nof Play usually measuring 20 metres long by no more than five (5) \nmetres wide, extending ten (10) metres either side of the Halfway \nLine and not less than one (1) metre from the Sideline. It is the area \nin which all off-field players must remain until an Interchange is \ninitiated. See Appendix 1.\nKick\nStrike or propel forcibly with the foot, a blow or forceful thrust with \nthe foot to the ball. A Tap to commence or recommence play or a \nPenalty Tap is not defined as a kick.\nLine Markings\nMarkings of the Field of Play. See Appendix 1.\nLink\nThe player beside the Wing player.\nMark (for a Tap)\nThe centre of the Halfway Line for the commencement or \nrecommencement of play, or the position where a Penalty Tap is \nawarded as a result of an Infringement.\nMark (for a Touch)\nThe position in the Field of Play where the player in Possession was \nat the time the Touch was made.\nFIT Playing Rules - 5th Edition\n2\nCOPYRIGHT © Touch Football Australia 2020\nMiddle\nThe player inside the Link player.\nNTA\nNational Touch Association\nAs defined in the FIT Constitution.\nObstruction\nA deliberate attempt by either an attacking or defending player \nto gain an unfair Advantage by interfering with the opposition to \nprevent them from gaining a rightful Advantage.\nOffside (Attacker)\nAn attacking player in a position Forward of the ball.\nOffside (Defender)\nA defending player in a position closer than seven (7) metres from \nthe Mark of the Rollball; or ten (10) metres from the Mark of a Tap.\nOnside\nA position whereby a player may legitimately become involved with \nplay. A player with both feet on or behind their Defending Try Line.\nPass\nThe act of changing Possession between individual attacking \nplayers by propelling the ball laterally and/or backwards and may \ninclude a flick, knock or throw.\nPer", " Player\nThe player who replaces another player during Interchange. There is \na maximum of eight (8) substitute players in any Team and except \nwhen interchanging, in the Sin Bin, dismissed or on the Field of Play, \nthey must remain in the Substitution Box.\nTap and Tap Penalty\nThe method of commencing the match, recommencing the match \nafter Half Time and after a Try has been scored. The Tap is also the \nmethod of recommencing play when a Penalty is awarded. The Tap \nis taken by placing the ball on the ground at or behind the Mark, \nreleasing both hands from the ball, tapping the ball gently with either \nfoot or touching the foot on the ball. The ball must not roll or move \nmore than one (1) metre in any direction and must be retrieved \ncleanly, without touching the ground again. The player may face any \ndirection and use either foot. Provided it is at the Mark, the ball does \nnot have to be lifted from the ground prior to a Tap being taken.\nTeam\nA group of players constituting one (1) side in a competition match.\nTFA\nTouch Football Australia Limited\nTouch\nAny contact between the player in Possession and a defending \nplayer. A Touch includes contact on the ball, hair or clothing and may \nbe made by a defending player or by the player in Possession.\nTouch Count\nThe progressive number of Touches that each Team has before a \nChange of Possession, from zero (0) to six (6).\nTry\nThe result of any attacking player, except the Half, placing the ball on \nor over the Team’s Attacking Try Line before being Touched.\nTry Lines\nThe lines separating the In-Goal Areas from the Field of Play. See \nAppendix 1.\nVoluntary Rollball\nThe player in Possession performs a Rollball before a Touch is made \nwith a defending player.\nWing\nThe player outside the Link player.\nWinner\nThe Team that scores the most Tries during the match.\nFIT Playing Rules - 5th Edition\n4\nCOPYRIGHT © Touch Football Australia 2020\n Rules of Play \n Mode of Play \nThe object of the game of Touch is for each Team to score Tries and to prevent the \nopposition from scoring. The ball may be passed, knocked or handed between players \nof the Attacking Team who may in turn run", " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef"]}, {"source_sentence": "What happens to a player who is sent to the Sin Bin Area in Touch Rugby International Rules?", "sentences": [" to the Sin Bin must return to the Interchange Area prior to re-\nentering the Field of Play.\n22.4\tAny action that causes the Touch Count to restart will result in a continuation of \nthat Possession. For the avoidance of doubt, should a defender knock the ball \ndown or give away a Penalty, this does not mean that the Possession has been \ncompleted, but rather the Possession continues. \nFIT Playing Rules - 5th Edition\n16\nCOPYRIGHT © Touch Football Australia 2020\n23  Dismissal \n23.1\tA player or official dismissed for misconduct is to take no further part in that \nmatch and is to move to and remain outside the Perimeter for the remainder of \nthe match.\n23.2\tThe dismissed player or official cannot be replaced and, in accordance with NTA \nDisciplinary Regulations, that player shall receive an automatic two (2) match \nsuspension. \n24  Drop-Off \n24.1\tShould a Winner be required in drawn matches, the following Drop-Off \nprocedure is used to determine a Winner.\n24.1.1\tEach Team will reduce their on-field Team to four (4) players and within \n60 seconds take up a position to restart play from the Halfway Line, \ndefending the same end of the field as at the End of Play.\n24.1.2\tThe Drop-Off commences with a Tap from the centre of the Halfway Line \nby the Team that did not commence the match with Possession.\n24.1.3\tThe Drop-Off will commence with a two (2) minute period of extra time.\n24.1.4\tShould a Team be leading at the expiration of the two (2) minute period \nof extra time then that Team will be declared the Winner and Match \ncomplete.\n24.1.5\tShould neither Team be leading at the expiration of two (2) minutes, a \nsignal is given and the match will pause at the next Touch or Dead Ball. \nEach Team will then remove another player from the Field of Play.\n24.1.6\tThe Match will recommence immediately after the players have left the \nfield at the same place where it paused (i.e. the Team retains Possession \nat the designated number of Touches, or at Change of Possession due to \nsome Infringement or the sixth Touch) and the Match will continue until", " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef", " to the Sin Bin must return to the Interchange Area prior to re-\nentering the Field of Play.\n22.4\tAny action that causes the Touch Count to restart will result in a continuation of \nthat Possession. For the avoidance of doubt, should a defender knock the ball \ndown or give away a Penalty, this does not mean that the Possession has been \ncompleted, but rather the Possession continues. \nFIT Playing Rules - 5th Edition\n16\nCOPYRIGHT © Touch Football Australia 2020\n23  Dismissal \n23.1\tA player or official dismissed for misconduct is to take no further part in that \nmatch and is to move to and remain outside the Perimeter for the remainder of \nthe match.\n23.2\tThe dismissed player or official cannot be replaced and, in accordance with NTA \nDisciplinary Regulations, that player shall receive an automatic two (2) match \nsuspension. \n24  Drop-Off \n24.1\tShould a Winner be required in drawn matches, the following Drop-Off \nprocedure is used to determine a Winner.\n24.1.1\tEach Team will reduce their on-field Team to four (4) players and within \n60 seconds take up a position to restart play from the Halfway Line, \ndefending the same end of the field as at the End of Play.\n24.1.2\tThe Drop-Off commences with a Tap from the centre of the Halfway Line \nby the Team that did not commence the match with Possession.\n24.1.3\tThe Drop-Off will commence with a two (2) minute period of extra time.\n24.1.4\tShould a Team be leading at the expiration of the two (2) minute period \nof extra time then that Team will be declared the Winner and Match \ncomplete.\n24.1.5\tShould neither Team be leading at the expiration of two (2) minutes, a \nsignal is given and the match will pause at the next Touch or Dead Ball. \nEach Team will then remove another player from the Field of Play.\n24.1.6\tThe Match will recommence immediately after the players have left the \nfield at the same place where it paused (i.e. the Team retains Possession \nat the designated number of Touches, or at Change of Possession due to \nsome Infringement or the sixth Touch) and the Match will continue until"]}, {"source_sentence": "Under what circumstances can a player perform a Rollball seven (7) metres in-field?", "sentences": ["\tIf a player mishandles the ball and even if in an effort to gain control, the ball \nis accidentally knocked Forward into any other Player, a Change of Possession \nresults.\n10  The Touch \n10.1\tA Touch may be made by either a defending player or a player in Possession.\n10.2\tA defending player may not claim a Touch if contact has not been made. If a \nplayer claims a Touch has been made, but the Referee is unsure the Touch will \ncount.\nRuling = A Penalty to the Attacking Team at the point of the Infringement and the offending \nplayer sent to the Sin Bin.\n10.3\tPlayers of both Defending and Attacking Teams are to use the minimum force \nnecessary to make a Touch. Players must ensure that the method employed in \nmaking a Touch does not pose an unnecessary risk to player safety.\nRuling = A Penalty to the non-offending Team at the point of the Infringement.\n10.4\tIf the ball is accidentally knocked from the hands of a player in Possession \nduring a Touch, the Touch counts and the Attacking Team retains Possession.\n10.5\tThe defending player must not deliberately knock the ball from the hands of a \nplayer in Possession during a Touch.\n Ruling = A Penalty to the Attacking Team at the point of the Infringement.\n10.6\tA player must not pass or otherwise deliver the ball after a Touch has been \nmade.\nRuling = A Penalty to the Defending Team at the point of the Infringement, or if In-Goal the \nnearest point on the seven (7) metre line.\n10.7\tThe Half may pass or run with the ball but cannot get Touched while in \nPossession of the ball.\nRuling = A Change of Possession occurs at the point of the Touch, or if In-Goal the nearest \npoint on the seven (7) metre line.\n10.8\tIf a Touch is made in the In-Goal Area before the ball is grounded, the player in \nPossession is to perform a Rollball seven (7) metres from the Team’s Attacking \nTry Line, provided it is not the sixth Touch and the player is not Half.\n10.9\tIf a player in Possession is Touched while on or behind their Defending Try Line, \nthe Touch counts and once the Referee sets the Mark seven (", " a player enters the Field of Play but does not impede the scoring of a Try the \noffending player will be sent to the Sin Bin.\n17.8\tFollowing a Try, players may Interchange at will, without having to wait for the \nplayer to enter the Interchange Area, but must do so prior to the Tap being taken \nto recommence play.\n18  Penalty \n18.1\tThe Tap must be performed in accordance with the Definitions.\nRuling = The Referee will instruct the offending Team to return to the Mark and perform the \nTap again.\n18.2\tFor Infringements that occur between seven (7) metre lines, the Mark for the \nPenalty Tap is at the point of Infringement unless otherwise indicated by the \nReferee. \n18.3\tFor Infringements that occur within the Seven Metre Zone the Tap must be \ntaken at the nearest seven (7) metre line.\n18.4\tFor Infringements that occur beyond the Field of Play or in the In-Goal Area \nthe Mark is seven (7) metres infield from the Sideline, or directly Forward of \nthe Infringement on the seven (7) metre line nearest the Infringement or at a \nposition indicated by the Referee.\n18.5\tThe Mark must be indicated by the Referee before a Penalty Tap is taken.\n18.6\tThe Penalty Tap must be performed without delay after the Referee indicates \nthe Mark.\nRuling = A Penalty to the non-offending team at the point of Infringement.\n18.7\tA player may perform a Rollball instead of a Penalty Tap and the player who \nreceives the ball does not become the Half.\n18.8\tIf the Defending Team is penalised three (3) times upon entering their Seven \nMetre Zone during a single Possession, the last offending player will be given an \nExclusion until the end of that Possession.\n18.9\tA Penalty Try is awarded if any action by a player, Team official or spectator, \ndeemed by the Referee to be contrary to the Rules or spirit of the game clearly \nprevents the Attacking Team from scoring a Try.\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n15\n19  Advantage \n19.1\tWhere a Defending Team player is Offside at a Tap or", " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef"]}, {"source_sentence": "What is the primary responsibility of the Referee during a Touch Rugby match?", "sentences": [" related matters inside the Perimeter \nfor the Duration of a match, has jurisdiction over all players, coaches and \nofficials and is required to:\n25.1.1\tInspect the Field of Play, Line Markings and Markers prior to the \ncommencement of the Match to ensure the safety of all participants.\n25.1.2\tAdjudicate on the Rules of the game;\n25.1.3\tImpose any sanction necessary to control the match;\n25.1.4\tAward Tries and record the progressive score;\n25.1.5\tMaintain a count of Touches during each Possession;\n25.1.6\tAward Penalties for Infringements against the Rules; and\n25.1.7\tReport to the relevant competition administration any Sin Bins, \nDismissals or injuries to any participant sustained during a Match.\n25.2\tOnly Team captains are permitted to seek clarification of a decision directly \nfrom the Referee. An approach may only be made during a break in play or at \nthe discretion of the Referee.\nFIT Playing Rules - 5th Edition\n18\nCOPYRIGHT © Touch Football Australia 2020\nHALFWAY LINE\nSIN BIN AREAS\nIN-GOAL AREA\nTRY LINE\n7 M ZONE\nDEAD BALL LINE\nPERIMETER\nINTERCHANGE\nAREA\n20M\n10M\n10M\n1M\n5M\n7 M\n7 M\n7 M\n7 M\n50M\n3M\n70M\nINTERCHANGE\nAREA\n Appendix 1 – Field of Play\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n19\nFEDERATION OF INTERNATIONAL TOUCH\n", " Player\nThe player who replaces another player during Interchange. There is \na maximum of eight (8) substitute players in any Team and except \nwhen interchanging, in the Sin Bin, dismissed or on the Field of Play, \nthey must remain in the Substitution Box.\nTap and Tap Penalty\nThe method of commencing the match, recommencing the match \nafter Half Time and after a Try has been scored. The Tap is also the \nmethod of recommencing play when a Penalty is awarded. The Tap \nis taken by placing the ball on the ground at or behind the Mark, \nreleasing both hands from the ball, tapping the ball gently with either \nfoot or touching the foot on the ball. The ball must not roll or move \nmore than one (1) metre in any direction and must be retrieved \ncleanly, without touching the ground again. The player may face any \ndirection and use either foot. Provided it is at the Mark, the ball does \nnot have to be lifted from the ground prior to a Tap being taken.\nTeam\nA group of players constituting one (1) side in a competition match.\nTFA\nTouch Football Australia Limited\nTouch\nAny contact between the player in Possession and a defending \nplayer. A Touch includes contact on the ball, hair or clothing and may \nbe made by a defending player or by the player in Possession.\nTouch Count\nThe progressive number of Touches that each Team has before a \nChange of Possession, from zero (0) to six (6).\nTry\nThe result of any attacking player, except the Half, placing the ball on \nor over the Team’s Attacking Try Line before being Touched.\nTry Lines\nThe lines separating the In-Goal Areas from the Field of Play. See \nAppendix 1.\nVoluntary Rollball\nThe player in Possession performs a Rollball before a Touch is made \nwith a defending player.\nWing\nThe player outside the Link player.\nWinner\nThe Team that scores the most Tries during the match.\nFIT Playing Rules - 5th Edition\n4\nCOPYRIGHT © Touch Football Australia 2020\n Rules of Play \n Mode of Play \nThe object of the game of Touch is for each Team to score Tries and to prevent the \nopposition from scoring. The ball may be passed, knocked or handed between players \nof the Attacking Team who may in turn run", "1\twhen a Change of Possession takes place due to a player in Possession \nmaking contact with the Sideline or any ground outside the Field of Play, \nprior to a Touch being made; or\n13.6.2\twhen the ball not in Possession of a player makes contact with the \nSideline or any ground outside the Field of Play.\n13.7\tA player may not perform a Tap in replacement of a Rollball.\nRuling = The offending Team must return to the Mark and perform the Rollball.\n13.8\tAn attacking player, other than the player performing the Rollball, may receive \nthe ball at the Rollball and shall do so without delay. That player is referred to as \nthe Half.\n13.9\tThe Half may control the ball with a foot prior to picking up the ball. \n13.10\tA player ceases to be the Half once the ball is passed to another player.\n13.11\tDefending players are not to interfere with the performance of the Rollball or the \nHalf. \nRuling = A Penalty to the Attacking Team at a point ten (10) metres directly Forward of the \nInfringement.\n13.12\tPlayers of the Defending Team must not move Forward of the Onside position \nuntil the Half has made contact with the ball, unless directed to do so by the \nReferee or in accordance with 13.12.1.\n13.12.1\tWhen the Half is not within one (1) metre of the Rollball, Onside players \nof the Defending Team may move Forward as soon as the player \nperforming the Rollball releases the ball. If the Half is not in position and \na defending player moves Forward and makes contact with the ball, a \nChange of Possession results.\n13.13\tIf in the act of performing the Rollball, the Attacking player makes contact with \nthe Sideline or any ground outside the Field of Play a Change of Possession will \noccur with the Rollball to be taken seven (7) metres in field.\n13.14\tAfter a Touch is made between the Dead Ball Line and the seven (7) metre line, \nan Attacking Team is permitted to Rollball on the seven (7) metre line at a point \ndirectly in line with where the Touch was made.\nFIT Playing Rules - 5th Edition\n12\nCOPYRIGHT © Touch Football Australia"]}, {"source_sentence": "What happens if a player deliberately delays the changeover procedure after a Change of Possession?", "sentences": [" Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef", " related matters inside the Perimeter \nfor the Duration of a match, has jurisdiction over all players, coaches and \nofficials and is required to:\n25.1.1\tInspect the Field of Play, Line Markings and Markers prior to the \ncommencement of the Match to ensure the safety of all participants.\n25.1.2\tAdjudicate on the Rules of the game;\n25.1.3\tImpose any sanction necessary to control the match;\n25.1.4\tAward Tries and record the progressive score;\n25.1.5\tMaintain a count of Touches during each Possession;\n25.1.6\tAward Penalties for Infringements against the Rules; and\n25.1.7\tReport to the relevant competition administration any Sin Bins, \nDismissals or injuries to any participant sustained during a Match.\n25.2\tOnly Team captains are permitted to seek clarification of a decision directly \nfrom the Referee. An approach may only be made during a break in play or at \nthe discretion of the Referee.\nFIT Playing Rules - 5th Edition\n18\nCOPYRIGHT © Touch Football Australia 2020\nHALFWAY LINE\nSIN BIN AREAS\nIN-GOAL AREA\nTRY LINE\n7 M ZONE\nDEAD BALL LINE\nPERIMETER\nINTERCHANGE\nAREA\n20M\n10M\n10M\n1M\n5M\n7 M\n7 M\n7 M\n7 M\n50M\n3M\n70M\nINTERCHANGE\nAREA\n Appendix 1 – Field of Play\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n19\nFEDERATION OF INTERNATIONAL TOUCH\n", " Registration\n5\n03 I\nThe Ball\n6\n04 I\nPlaying Uniform\n6\n05 I\nTeam Composition\n6\n06 I\nTeam Coach and Team Officials\n7\n07\nI\nCommencement and Recommencement of Play\n7\n08\nI\nMatch Duration\n8\n09 I\nPossession\n8\n10\nI\nThe Touch\n9\n11\nI\nPassing\n10\n12\nI\nBall Touched in Flight\n10\n13\nI\nThe Rollball\n11\n14\nI\nScoring\n13\n15\nI\nOffside\n13\n16\nI\nObstruction\n14\n17\nI\nInterchange\n14\n18\nI\nPenalty\n15\n19\nI\nAdvantage\n16\n20\nI\nMisconduct\n16\n21\nI\nForced Interchange\n16\n22\nI\nSin Bin\n16\n23\nI\nDismissal\n17\n24\nI\nDrop-Off\n17\n25\nI\nMatch Officials\n18\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\nFIT Playing Rules - 5th Edition\nCOPYRIGHT © Touch Football Australia 2020\n Definitions and Terminology \nUnless the contrary intention appears, the following definitions and terminology apply \nto the game of Touch:\nTERM/PHRASE\nDEFINITION/DESCRIPTION\nAdvantage\nThe period of time after an Infringement in which the non-offending \nside has the opportunity to gain Advantage either territorial, tactical \nor in the form of a Try.\nAttacking Try Line\nThe line on or over which a player has to place the ball to \nscore a Try.\nAttacking Team\nThe Team which has or is gaining Possession.\nBehind\nA position or direction towards a Team’s Defending Try Line.\nChange of Possession\nThe act of moving control of the ball from one Team to the other.\nDead/Dead Ball\nWhen the ball is out of play including the period following a Try and \nuntil the match is recommenced and when the ball goes to ground \nand/or outside the boundaries of the Field of Play prior to the \nsubsequent Rollball.\nDead Ball Line\nThe end boundaries of the Field of Play. There is one at each end of \nthe Field of Play. See Appendix 1.\nDef"]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,426
Sociovestix/lenu_IE
Sociovestix
text-classification
[ "transformers", "pytorch", "safetensors", "bert", "text-classification", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-01-05T14:26:59Z
2024-06-10T12:06:20+00:00
16
0
--- widget: - text: KOREA PRIME FUND - text: DAERO AVIATION 4 LIMITED - text: AXA IM GLOBAL SECURED ASSETS I DESIGNATED ACTIVITY COMPANY - text: Prima EU Leveraged Loan Fund - text: Allianz Share Incentive Plan - text: KERRY GROUP PUBLIC LIMITED COMPANY - text: DARA ROCK UNLIMITED COMPANY - text: Crosshaven-Carrigaline Credit Union Limited - text: ALDER BASSWOOD CLOVER LIMITED PARTNERSHIP - text: BLUE FLAMINGO TRADE COMPANY LIMITED BY GUARANTEE - text: The Richview Partnership - text: FLEXAM INVEST IRELAND 1A DESIGNATED ACTIVITY COMPANY - text: VMWARE INTERNATIONAL UNLIMITED COMPANY - text: FUSION PRIVATE DEBT EVERGREEN ILP - text: Prison Officers Medical Aid Society - text: XL CATLIN SERVICES SE - text: LAKELAND DAIRIES CO-OPERATIVE SOCIETY LIMITED model-index: - name: Sociovestix/lenu_IE results: - task: type: text-classification name: Text Classification dataset: name: lenu type: Sociovestix/lenu config: IE split: test revision: f4d57b8d77a49ec5c62d899c9a213d23cd9f9428 metrics: - type: f1 value: 0.8925014645577036 name: f1 - type: f1 value: 0.5464695861519899 name: f1 macro args: average: macro --- # LENU - Legal Entity Name Understanding for Ireland A [finbert](https://huggingface.co/yiyanghkust/finbert-pretrain) model fine-tuned on irish legal entity names (jurisdiction IE) from the Global [Legal Entity Identifier](https://www.gleif.org/en/about-lei/introducing-the-legal-entity-identifier-lei) (LEI) System with the goal to detect [Entity Legal Form (ELF) Codes](https://www.gleif.org/en/about-lei/code-lists/iso-20275-entity-legal-forms-code-list). --------------- <h1 align="center"> <a href="https://gleif.org"> <img src="http://sdglabs.ai/wp-content/uploads/2022/07/gleif-logo-new.png" width="220px" style="display: inherit"> </a> </h1><br> <h3 align="center">in collaboration with</h3> <h1 align="center"> <a href="https://sociovestix.com"> <img src="https://sociovestix.com/img/svl_logo_centered.svg" width="700px" style="width: 100%"> </a> </h1><br> --------------- ## Model Description <!-- Provide a longer summary of what this model is. --> The model has been created as part of a collaboration of the [Global Legal Entity Identifier Foundation](https://gleif.org) (GLEIF) and [Sociovestix Labs](https://sociovestix.com) with the goal to explore how Machine Learning can support in detecting the ELF Code solely based on an entity's legal name and legal jurisdiction. See also the open source python library [lenu](https://github.com/Sociovestix/lenu), which supports in this task. The model has been trained on the dataset [lenu](https://huggingface.co/datasets/Sociovestix), with a focus on irish legal entities and ELF Codes within the Jurisdiction "IE". - **Developed by:** [GLEIF](https://gleif.org) and [Sociovestix Labs](https://huggingface.co/Sociovestix) - **License:** Creative Commons (CC0) license - **Finetuned from model [optional]:** bert-base-uncased - **Resources for more information:** [Press Release](https://www.gleif.org/en/newsroom/press-releases/machine-learning-new-open-source-tool-developed-by-gleif-and-sociovestix-labs-enables-organizations-everywhere-to-automatically-) # Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> An entity's legal form is a crucial component when verifying and screening organizational identity. The wide variety of entity legal forms that exist within and between jurisdictions, however, has made it difficult for large organizations to capture legal form as structured data. The Jurisdiction specific models of [lenu](https://github.com/Sociovestix/lenu), trained on entities from GLEIF’s Legal Entity Identifier (LEI) database of over two million records, will allow banks, investment firms, corporations, governments, and other large organizations to retrospectively analyze their master data, extract the legal form from the unstructured text of the legal name and uniformly apply an ELF code to each entity type, according to the ISO 20275 standard. # Licensing Information This model, which is trained on LEI data, is available under Creative Commons (CC0) license. See [gleif.org/en/about/open-data](https://gleif.org/en/about/open-data). # Recommendations Users should always consider the score of the suggested ELF Codes. For low score values it may be necessary to manually review the affected entities.
null
Non_BioNLP
# LENU - Legal Entity Name Understanding for Ireland A [finbert](https://huggingface.co/yiyanghkust/finbert-pretrain) model fine-tuned on irish legal entity names (jurisdiction IE) from the Global [Legal Entity Identifier](https://www.gleif.org/en/about-lei/introducing-the-legal-entity-identifier-lei) (LEI) System with the goal to detect [Entity Legal Form (ELF) Codes](https://www.gleif.org/en/about-lei/code-lists/iso-20275-entity-legal-forms-code-list). --------------- <h1 align="center"> <a href="https://gleif.org"> <img src="http://sdglabs.ai/wp-content/uploads/2022/07/gleif-logo-new.png" width="220px" style="display: inherit"> </a> </h1><br> <h3 align="center">in collaboration with</h3> <h1 align="center"> <a href="https://sociovestix.com"> <img src="https://sociovestix.com/img/svl_logo_centered.svg" width="700px" style="width: 100%"> </a> </h1><br> --------------- ## Model Description <!-- Provide a longer summary of what this model is. --> The model has been created as part of a collaboration of the [Global Legal Entity Identifier Foundation](https://gleif.org) (GLEIF) and [Sociovestix Labs](https://sociovestix.com) with the goal to explore how Machine Learning can support in detecting the ELF Code solely based on an entity's legal name and legal jurisdiction. See also the open source python library [lenu](https://github.com/Sociovestix/lenu), which supports in this task. The model has been trained on the dataset [lenu](https://huggingface.co/datasets/Sociovestix), with a focus on irish legal entities and ELF Codes within the Jurisdiction "IE". - **Developed by:** [GLEIF](https://gleif.org) and [Sociovestix Labs](https://huggingface.co/Sociovestix) - **License:** Creative Commons (CC0) license - **Finetuned from model [optional]:** bert-base-uncased - **Resources for more information:** [Press Release](https://www.gleif.org/en/newsroom/press-releases/machine-learning-new-open-source-tool-developed-by-gleif-and-sociovestix-labs-enables-organizations-everywhere-to-automatically-) # Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> An entity's legal form is a crucial component when verifying and screening organizational identity. The wide variety of entity legal forms that exist within and between jurisdictions, however, has made it difficult for large organizations to capture legal form as structured data. The Jurisdiction specific models of [lenu](https://github.com/Sociovestix/lenu), trained on entities from GLEIF’s Legal Entity Identifier (LEI) database of over two million records, will allow banks, investment firms, corporations, governments, and other large organizations to retrospectively analyze their master data, extract the legal form from the unstructured text of the legal name and uniformly apply an ELF code to each entity type, according to the ISO 20275 standard. # Licensing Information This model, which is trained on LEI data, is available under Creative Commons (CC0) license. See [gleif.org/en/about/open-data](https://gleif.org/en/about/open-data). # Recommendations Users should always consider the score of the suggested ELF Codes. For low score values it may be necessary to manually review the affected entities.
{"widget": [{"text": "KOREA PRIME FUND"}, {"text": "DAERO AVIATION 4 LIMITED"}, {"text": "AXA IM GLOBAL SECURED ASSETS I DESIGNATED ACTIVITY COMPANY"}, {"text": "Prima EU Leveraged Loan Fund"}, {"text": "Allianz Share Incentive Plan"}, {"text": "KERRY GROUP PUBLIC LIMITED COMPANY"}, {"text": "DARA ROCK UNLIMITED COMPANY"}, {"text": "Crosshaven-Carrigaline Credit Union Limited"}, {"text": "ALDER BASSWOOD CLOVER LIMITED PARTNERSHIP"}, {"text": "BLUE FLAMINGO TRADE COMPANY LIMITED BY GUARANTEE"}, {"text": "The Richview Partnership"}, {"text": "FLEXAM INVEST IRELAND 1A DESIGNATED ACTIVITY COMPANY"}, {"text": "VMWARE INTERNATIONAL UNLIMITED COMPANY"}, {"text": "FUSION PRIVATE DEBT EVERGREEN ILP"}, {"text": "Prison Officers Medical Aid Society"}, {"text": "XL CATLIN SERVICES SE"}, {"text": "LAKELAND DAIRIES CO-OPERATIVE SOCIETY LIMITED"}], "model-index": [{"name": "Sociovestix/lenu_IE", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "lenu", "type": "Sociovestix/lenu", "config": "IE", "split": "test", "revision": "f4d57b8d77a49ec5c62d899c9a213d23cd9f9428"}, "metrics": [{"type": "f1", "value": 0.8925014645577036, "name": "f1"}, {"type": "f1", "value": 0.5464695861519899, "name": "f1 macro", "args": {"average": "macro"}}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,427
RichardErkhov/databricks_-_dolly-v2-7b-8bits
RichardErkhov
text-generation
[ "transformers", "safetensors", "gpt_neox", "text-generation", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "8-bit", "bitsandbytes", "region:us" ]
2024-04-14T20:53:21Z
2024-04-14T20:59:19+00:00
4
0
--- {} --- Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) dolly-v2-7b - bnb 8bits - Model creator: https://huggingface.co/databricks/ - Original model: https://huggingface.co/databricks/dolly-v2-7b/ Original model description: --- license: mit language: - en library_name: transformers inference: false datasets: - databricks/databricks-dolly-15k --- # dolly-v2-7b Model Card ## Summary Databricks' `dolly-v2-7b`, an instruction-following large language model trained on the Databricks machine learning platform that is licensed for commercial use. Based on `pythia-6.9b`, Dolly is trained on ~15k instruction/response fine tuning records [`databricks-dolly-15k`](https://github.com/databrickslabs/dolly/tree/master/data) generated by Databricks employees in capability domains from the InstructGPT paper, including brainstorming, classification, closed QA, generation, information extraction, open QA and summarization. `dolly-v2-7b` is not a state-of-the-art model, but does exhibit surprisingly high quality instruction following behavior not characteristic of the foundation model on which it is based. Dolly v2 is also available in these other models sizes: * [dolly-v2-12b](https://huggingface.co/databricks/dolly-v2-12b), a 12 billion parameter based on `pythia-12b` * [dolly-v2-3b](https://huggingface.co/databricks/dolly-v2-3b), a 2.8 billion parameter based on `pythia-2.8b` Please refer to the [dolly GitHub repo](https://github.com/databrickslabs/dolly#getting-started-with-response-generation) for tips on running inference for various GPU configurations. **Owner**: Databricks, Inc. ## Model Overview `dolly-v2-7b` is a 6.9 billion parameter causal language model created by [Databricks](https://databricks.com/) that is derived from [EleutherAI's](https://www.eleuther.ai/) [Pythia-6.9b](https://huggingface.co/EleutherAI/pythia-6.9b) and fine-tuned on a [~15K record instruction corpus](https://github.com/databrickslabs/dolly/tree/master/data) generated by Databricks employees and released under a permissive license (CC-BY-SA) ## Usage To use the model with the `transformers` library on a machine with GPUs, first make sure you have the `transformers` and `accelerate` libraries installed. In a Databricks notebook you could run: ```python %pip install "accelerate>=0.16.0,<1" "transformers[torch]>=4.28.1,<5" "torch>=1.13.1,<2" ``` The instruction following pipeline can be loaded using the `pipeline` function as shown below. This loads a custom `InstructionTextGenerationPipeline` found in the model repo [here](https://huggingface.co/databricks/dolly-v2-3b/blob/main/instruct_pipeline.py), which is why `trust_remote_code=True` is required. Including `torch_dtype=torch.bfloat16` is generally recommended if this type is supported in order to reduce memory usage. It does not appear to impact output quality. It is also fine to remove it if there is sufficient memory. ```python import torch from transformers import pipeline generate_text = pipeline(model="databricks/dolly-v2-7b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto") ``` You can then use the pipeline to answer instructions: ```python res = generate_text("Explain to me the difference between nuclear fission and fusion.") print(res[0]["generated_text"]) ``` Alternatively, if you prefer to not use `trust_remote_code=True` you can download [instruct_pipeline.py](https://huggingface.co/databricks/dolly-v2-3b/blob/main/instruct_pipeline.py), store it alongside your notebook, and construct the pipeline yourself from the loaded model and tokenizer: ```python import torch from instruct_pipeline import InstructionTextGenerationPipeline from transformers import AutoModelForCausalLM, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("databricks/dolly-v2-7b", padding_side="left") model = AutoModelForCausalLM.from_pretrained("databricks/dolly-v2-7b", device_map="auto", torch_dtype=torch.bfloat16) generate_text = InstructionTextGenerationPipeline(model=model, tokenizer=tokenizer) ``` ### LangChain Usage To use the pipeline with LangChain, you must set `return_full_text=True`, as LangChain expects the full text to be returned and the default for the pipeline is to only return the new text. ```python import torch from transformers import pipeline generate_text = pipeline(model="databricks/dolly-v2-7b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", return_full_text=True) ``` You can create a prompt that either has only an instruction or has an instruction with context: ```python from langchain import PromptTemplate, LLMChain from langchain.llms import HuggingFacePipeline # template for an instrution with no input prompt = PromptTemplate( input_variables=["instruction"], template="{instruction}") # template for an instruction with input prompt_with_context = PromptTemplate( input_variables=["instruction", "context"], template="{instruction}\n\nInput:\n{context}") hf_pipeline = HuggingFacePipeline(pipeline=generate_text) llm_chain = LLMChain(llm=hf_pipeline, prompt=prompt) llm_context_chain = LLMChain(llm=hf_pipeline, prompt=prompt_with_context) ``` Example predicting using a simple instruction: ```python print(llm_chain.predict(instruction="Explain to me the difference between nuclear fission and fusion.").lstrip()) ``` Example predicting using an instruction with context: ```python context = """George Washington (February 22, 1732[b] - December 14, 1799) was an American military officer, statesman, and Founding Father who served as the first president of the United States from 1789 to 1797.""" print(llm_context_chain.predict(instruction="When was George Washington president?", context=context).lstrip()) ``` ## Known Limitations ### Performance Limitations **`dolly-v2-7b` is not a state-of-the-art generative language model** and, though quantitative benchmarking is ongoing, is not designed to perform competitively with more modern model architectures or models subject to larger pretraining corpuses. The Dolly model family is under active development, and so any list of shortcomings is unlikely to be exhaustive, but we include known limitations and misfires here as a means to document and share our preliminary findings with the community. In particular, `dolly-v2-7b` struggles with: syntactically complex prompts, programming problems, mathematical operations, factual errors, dates and times, open-ended question answering, hallucination, enumerating lists of specific length, stylistic mimicry, having a sense of humor, etc. Moreover, we find that `dolly-v2-7b` does not have some capabilities, such as well-formatted letter writing, present in the original model. ### Dataset Limitations Like all language models, `dolly-v2-7b` reflects the content and limitations of its training corpuses. - **The Pile**: GPT-J's pre-training corpus contains content mostly collected from the public internet, and like most web-scale datasets, it contains content many users would find objectionable. As such, the model is likely to reflect these shortcomings, potentially overtly in the case it is explicitly asked to produce objectionable content, and sometimes subtly, as in the case of biased or harmful implicit associations. - **`databricks-dolly-15k`**: The training data on which `dolly-v2-7b` is instruction tuned represents natural language instructions generated by Databricks employees during a period spanning March and April 2023 and includes passages from Wikipedia as references passages for instruction categories like closed QA and summarization. To our knowledge it does not contain obscenity, intellectual property or personally identifying information about non-public figures, but it may contain typos and factual errors. The dataset may also reflect biases found in Wikipedia. Finally, the dataset likely reflects the interests and semantic choices of Databricks employees, a demographic which is not representative of the global population at large. Databricks is committed to ongoing research and development efforts to develop helpful, honest and harmless AI technologies that maximize the potential of all individuals and organizations. ### Benchmark Metrics Below you'll find various models benchmark performance on the [EleutherAI LLM Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness); model results are sorted by geometric mean to produce an intelligible ordering. As outlined above, these results demonstrate that `dolly-v2-7b` is not state of the art, and in fact underperforms `dolly-v1-6b` in some evaluation benchmarks. We believe this owes to the composition and size of the underlying fine tuning datasets, but a robust statement as to the sources of these variations requires further study. | model | openbookqa | arc_easy | winogrande | hellaswag | arc_challenge | piqa | boolq | gmean | | --------------------------------- | ------------ | ---------- | ------------ | ----------- | --------------- | -------- | -------- | ---------| | EleutherAI/pythia-2.8b | 0.348 | 0.585859 | 0.589582 | 0.591217 | 0.323379 | 0.73395 | 0.638226 | 0.523431 | | EleutherAI/pythia-6.9b | 0.368 | 0.604798 | 0.608524 | 0.631548 | 0.343857 | 0.761153 | 0.6263 | 0.543567 | | databricks/dolly-v2-3b | 0.384 | 0.611532 | 0.589582 | 0.650767 | 0.370307 | 0.742655 | 0.575535 | 0.544886 | | EleutherAI/pythia-12b | 0.364 | 0.627104 | 0.636148 | 0.668094 | 0.346416 | 0.760065 | 0.673394 | 0.559676 | | EleutherAI/gpt-j-6B | 0.382 | 0.621633 | 0.651144 | 0.662617 | 0.363481 | 0.761153 | 0.655963 | 0.565936 | | databricks/dolly-v2-12b | 0.408 | 0.63931 | 0.616417 | 0.707927 | 0.388225 | 0.757889 | 0.568196 | 0.56781 | | databricks/dolly-v2-7b | 0.392 | 0.633838 | 0.607735 | 0.686517 | 0.406997 | 0.750816 | 0.644037 | 0.573487 | | databricks/dolly-v1-6b | 0.41 | 0.62963 | 0.643252 | 0.676758 | 0.384812 | 0.773667 | 0.687768 | 0.583431 | | EleutherAI/gpt-neox-20b | 0.402 | 0.683923 | 0.656669 | 0.7142 | 0.408703 | 0.784004 | 0.695413 | 0.602236 | # Citation ``` @online{DatabricksBlog2023DollyV2, author = {Mike Conover and Matt Hayes and Ankit Mathur and Jianwei Xie and Jun Wan and Sam Shah and Ali Ghodsi and Patrick Wendell and Matei Zaharia and Reynold Xin}, title = {Free Dolly: Introducing the World's First Truly Open Instruction-Tuned LLM}, year = {2023}, url = {https://www.databricks.com/blog/2023/04/12/dolly-first-open-commercially-viable-instruction-tuned-llm}, urldate = {2023-06-30} } ``` # Happy Hacking!
null
Non_BioNLP
Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) dolly-v2-7b - bnb 8bits - Model creator: https://huggingface.co/databricks/ - Original model: https://huggingface.co/databricks/dolly-v2-7b/ Original model description: --- license: mit language: - en library_name: transformers inference: false datasets: - databricks/databricks-dolly-15k --- # dolly-v2-7b Model Card ## Summary Databricks' `dolly-v2-7b`, an instruction-following large language model trained on the Databricks machine learning platform that is licensed for commercial use. Based on `pythia-6.9b`, Dolly is trained on ~15k instruction/response fine tuning records [`databricks-dolly-15k`](https://github.com/databrickslabs/dolly/tree/master/data) generated by Databricks employees in capability domains from the InstructGPT paper, including brainstorming, classification, closed QA, generation, information extraction, open QA and summarization. `dolly-v2-7b` is not a state-of-the-art model, but does exhibit surprisingly high quality instruction following behavior not characteristic of the foundation model on which it is based. Dolly v2 is also available in these other models sizes: * [dolly-v2-12b](https://huggingface.co/databricks/dolly-v2-12b), a 12 billion parameter based on `pythia-12b` * [dolly-v2-3b](https://huggingface.co/databricks/dolly-v2-3b), a 2.8 billion parameter based on `pythia-2.8b` Please refer to the [dolly GitHub repo](https://github.com/databrickslabs/dolly#getting-started-with-response-generation) for tips on running inference for various GPU configurations. **Owner**: Databricks, Inc. ## Model Overview `dolly-v2-7b` is a 6.9 billion parameter causal language model created by [Databricks](https://databricks.com/) that is derived from [EleutherAI's](https://www.eleuther.ai/) [Pythia-6.9b](https://huggingface.co/EleutherAI/pythia-6.9b) and fine-tuned on a [~15K record instruction corpus](https://github.com/databrickslabs/dolly/tree/master/data) generated by Databricks employees and released under a permissive license (CC-BY-SA) ## Usage To use the model with the `transformers` library on a machine with GPUs, first make sure you have the `transformers` and `accelerate` libraries installed. In a Databricks notebook you could run: ```python %pip install "accelerate>=0.16.0,<1" "transformers[torch]>=4.28.1,<5" "torch>=1.13.1,<2" ``` The instruction following pipeline can be loaded using the `pipeline` function as shown below. This loads a custom `InstructionTextGenerationPipeline` found in the model repo [here](https://huggingface.co/databricks/dolly-v2-3b/blob/main/instruct_pipeline.py), which is why `trust_remote_code=True` is required. Including `torch_dtype=torch.bfloat16` is generally recommended if this type is supported in order to reduce memory usage. It does not appear to impact output quality. It is also fine to remove it if there is sufficient memory. ```python import torch from transformers import pipeline generate_text = pipeline(model="databricks/dolly-v2-7b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto") ``` You can then use the pipeline to answer instructions: ```python res = generate_text("Explain to me the difference between nuclear fission and fusion.") print(res[0]["generated_text"]) ``` Alternatively, if you prefer to not use `trust_remote_code=True` you can download [instruct_pipeline.py](https://huggingface.co/databricks/dolly-v2-3b/blob/main/instruct_pipeline.py), store it alongside your notebook, and construct the pipeline yourself from the loaded model and tokenizer: ```python import torch from instruct_pipeline import InstructionTextGenerationPipeline from transformers import AutoModelForCausalLM, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("databricks/dolly-v2-7b", padding_side="left") model = AutoModelForCausalLM.from_pretrained("databricks/dolly-v2-7b", device_map="auto", torch_dtype=torch.bfloat16) generate_text = InstructionTextGenerationPipeline(model=model, tokenizer=tokenizer) ``` ### LangChain Usage To use the pipeline with LangChain, you must set `return_full_text=True`, as LangChain expects the full text to be returned and the default for the pipeline is to only return the new text. ```python import torch from transformers import pipeline generate_text = pipeline(model="databricks/dolly-v2-7b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", return_full_text=True) ``` You can create a prompt that either has only an instruction or has an instruction with context: ```python from langchain import PromptTemplate, LLMChain from langchain.llms import HuggingFacePipeline # template for an instrution with no input prompt = PromptTemplate( input_variables=["instruction"], template="{instruction}") # template for an instruction with input prompt_with_context = PromptTemplate( input_variables=["instruction", "context"], template="{instruction}\n\nInput:\n{context}") hf_pipeline = HuggingFacePipeline(pipeline=generate_text) llm_chain = LLMChain(llm=hf_pipeline, prompt=prompt) llm_context_chain = LLMChain(llm=hf_pipeline, prompt=prompt_with_context) ``` Example predicting using a simple instruction: ```python print(llm_chain.predict(instruction="Explain to me the difference between nuclear fission and fusion.").lstrip()) ``` Example predicting using an instruction with context: ```python context = """George Washington (February 22, 1732[b] - December 14, 1799) was an American military officer, statesman, and Founding Father who served as the first president of the United States from 1789 to 1797.""" print(llm_context_chain.predict(instruction="When was George Washington president?", context=context).lstrip()) ``` ## Known Limitations ### Performance Limitations **`dolly-v2-7b` is not a state-of-the-art generative language model** and, though quantitative benchmarking is ongoing, is not designed to perform competitively with more modern model architectures or models subject to larger pretraining corpuses. The Dolly model family is under active development, and so any list of shortcomings is unlikely to be exhaustive, but we include known limitations and misfires here as a means to document and share our preliminary findings with the community. In particular, `dolly-v2-7b` struggles with: syntactically complex prompts, programming problems, mathematical operations, factual errors, dates and times, open-ended question answering, hallucination, enumerating lists of specific length, stylistic mimicry, having a sense of humor, etc. Moreover, we find that `dolly-v2-7b` does not have some capabilities, such as well-formatted letter writing, present in the original model. ### Dataset Limitations Like all language models, `dolly-v2-7b` reflects the content and limitations of its training corpuses. - **The Pile**: GPT-J's pre-training corpus contains content mostly collected from the public internet, and like most web-scale datasets, it contains content many users would find objectionable. As such, the model is likely to reflect these shortcomings, potentially overtly in the case it is explicitly asked to produce objectionable content, and sometimes subtly, as in the case of biased or harmful implicit associations. - **`databricks-dolly-15k`**: The training data on which `dolly-v2-7b` is instruction tuned represents natural language instructions generated by Databricks employees during a period spanning March and April 2023 and includes passages from Wikipedia as references passages for instruction categories like closed QA and summarization. To our knowledge it does not contain obscenity, intellectual property or personally identifying information about non-public figures, but it may contain typos and factual errors. The dataset may also reflect biases found in Wikipedia. Finally, the dataset likely reflects the interests and semantic choices of Databricks employees, a demographic which is not representative of the global population at large. Databricks is committed to ongoing research and development efforts to develop helpful, honest and harmless AI technologies that maximize the potential of all individuals and organizations. ### Benchmark Metrics Below you'll find various models benchmark performance on the [EleutherAI LLM Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness); model results are sorted by geometric mean to produce an intelligible ordering. As outlined above, these results demonstrate that `dolly-v2-7b` is not state of the art, and in fact underperforms `dolly-v1-6b` in some evaluation benchmarks. We believe this owes to the composition and size of the underlying fine tuning datasets, but a robust statement as to the sources of these variations requires further study. | model | openbookqa | arc_easy | winogrande | hellaswag | arc_challenge | piqa | boolq | gmean | | --------------------------------- | ------------ | ---------- | ------------ | ----------- | --------------- | -------- | -------- | ---------| | EleutherAI/pythia-2.8b | 0.348 | 0.585859 | 0.589582 | 0.591217 | 0.323379 | 0.73395 | 0.638226 | 0.523431 | | EleutherAI/pythia-6.9b | 0.368 | 0.604798 | 0.608524 | 0.631548 | 0.343857 | 0.761153 | 0.6263 | 0.543567 | | databricks/dolly-v2-3b | 0.384 | 0.611532 | 0.589582 | 0.650767 | 0.370307 | 0.742655 | 0.575535 | 0.544886 | | EleutherAI/pythia-12b | 0.364 | 0.627104 | 0.636148 | 0.668094 | 0.346416 | 0.760065 | 0.673394 | 0.559676 | | EleutherAI/gpt-j-6B | 0.382 | 0.621633 | 0.651144 | 0.662617 | 0.363481 | 0.761153 | 0.655963 | 0.565936 | | databricks/dolly-v2-12b | 0.408 | 0.63931 | 0.616417 | 0.707927 | 0.388225 | 0.757889 | 0.568196 | 0.56781 | | databricks/dolly-v2-7b | 0.392 | 0.633838 | 0.607735 | 0.686517 | 0.406997 | 0.750816 | 0.644037 | 0.573487 | | databricks/dolly-v1-6b | 0.41 | 0.62963 | 0.643252 | 0.676758 | 0.384812 | 0.773667 | 0.687768 | 0.583431 | | EleutherAI/gpt-neox-20b | 0.402 | 0.683923 | 0.656669 | 0.7142 | 0.408703 | 0.784004 | 0.695413 | 0.602236 | # Citation ``` @online{DatabricksBlog2023DollyV2, author = {Mike Conover and Matt Hayes and Ankit Mathur and Jianwei Xie and Jun Wan and Sam Shah and Ali Ghodsi and Patrick Wendell and Matei Zaharia and Reynold Xin}, title = {Free Dolly: Introducing the World's First Truly Open Instruction-Tuned LLM}, year = {2023}, url = {https://www.databricks.com/blog/2023/04/12/dolly-first-open-commercially-viable-instruction-tuned-llm}, urldate = {2023-06-30} } ``` # Happy Hacking!
{}
task
[ "QUESTION_ANSWERING", "SUMMARIZATION" ]
46,428
czz23/journal-setfit-model
czz23
text-classification
[ "sentence-transformers", "pytorch", "mpnet", "setfit", "text-classification", "arxiv:2209.11055", "license:apache-2.0", "region:us" ]
2023-06-25T10:34:44Z
2023-06-25T10:37:43+00:00
8
0
--- license: apache-2.0 pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification --- # /var/folders/hy/pfb50fjs4zd8cznz_yjwyw8w0000gp/T/tmpg6l_fkqj/czz23/journal-setfit-model This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("/var/folders/hy/pfb50fjs4zd8cznz_yjwyw8w0000gp/T/tmpg6l_fkqj/czz23/journal-setfit-model") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
null
Non_BioNLP
# /var/folders/hy/pfb50fjs4zd8cznz_yjwyw8w0000gp/T/tmpg6l_fkqj/czz23/journal-setfit-model This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("/var/folders/hy/pfb50fjs4zd8cznz_yjwyw8w0000gp/T/tmpg6l_fkqj/czz23/journal-setfit-model") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
{"license": "apache-2.0", "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification"]}
task
[ "TEXT_CLASSIFICATION" ]
46,429
susnato/distilbert-base-uncased-finetuned-clinc
susnato
text-classification
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "dataset:clinc_oos", "base_model:distilbert/distilbert-base-uncased", "base_model:finetune:distilbert/distilbert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-12-12T15:22:06Z
2023-09-13T18:02:08+00:00
42
0
--- base_model: distilbert-base-uncased datasets: - clinc_oos license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: distilbert-base-uncased-finetuned-clinc results: - task: type: text-classification name: Text Classification dataset: name: clinc_oos type: clinc_oos config: plus split: train args: plus metrics: - type: accuracy value: 0.9161290322580645 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-clinc This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the clinc_oos dataset. It achieves the following results on the evaluation set: - Loss: 0.7767 - Accuracy: 0.9161 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 48 - eval_batch_size: 48 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | No log | 1.0 | 318 | 3.2814 | 0.7410 | | 3.783 | 2.0 | 636 | 1.8740 | 0.8335 | | 3.783 | 3.0 | 954 | 1.1590 | 0.8916 | | 1.6892 | 4.0 | 1272 | 0.8595 | 0.9103 | | 0.9052 | 5.0 | 1590 | 0.7767 | 0.9161 | ### Framework versions - Transformers 4.21.2 - Pytorch 1.13.0+cu117 - Datasets 2.7.1 - Tokenizers 0.12.1
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-clinc This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the clinc_oos dataset. It achieves the following results on the evaluation set: - Loss: 0.7767 - Accuracy: 0.9161 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 48 - eval_batch_size: 48 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | No log | 1.0 | 318 | 3.2814 | 0.7410 | | 3.783 | 2.0 | 636 | 1.8740 | 0.8335 | | 3.783 | 3.0 | 954 | 1.1590 | 0.8916 | | 1.6892 | 4.0 | 1272 | 0.8595 | 0.9103 | | 0.9052 | 5.0 | 1590 | 0.7767 | 0.9161 | ### Framework versions - Transformers 4.21.2 - Pytorch 1.13.0+cu117 - Datasets 2.7.1 - Tokenizers 0.12.1
{"base_model": "distilbert-base-uncased", "datasets": ["clinc_oos"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert-base-uncased-finetuned-clinc", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "clinc_oos", "type": "clinc_oos", "config": "plus", "split": "train", "args": "plus"}, "metrics": [{"type": "accuracy", "value": 0.9161290322580645, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,430
dss107/mp_base
dss107
text-classification
[ "sentence-transformers", "pytorch", "mpnet", "setfit", "text-classification", "arxiv:2209.11055", "license:apache-2.0", "region:us" ]
2023-09-21T11:32:21Z
2023-09-21T11:33:48+00:00
13
0
--- license: apache-2.0 pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification --- # dss107/mp_base This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("dss107/mp_base") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
null
Non_BioNLP
# dss107/mp_base This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("dss107/mp_base") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
{"license": "apache-2.0", "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification"]}
task
[ "TEXT_CLASSIFICATION" ]
46,431
RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf
RichardErkhov
null
[ "gguf", "arxiv:2305.18290", "endpoints_compatible", "region:us", "conversational" ]
2024-08-22T20:05:22Z
2024-08-23T00:02:09+00:00
367
0
--- {} --- Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) ko-gemma-2-9b-it - GGUF - Model creator: https://huggingface.co/rtzr/ - Original model: https://huggingface.co/rtzr/ko-gemma-2-9b-it/ | Name | Quant method | Size | | ---- | ---- | ---- | | [ko-gemma-2-9b-it.Q2_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q2_K.gguf) | Q2_K | 3.54GB | | [ko-gemma-2-9b-it.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ3_XS.gguf) | IQ3_XS | 3.86GB | | [ko-gemma-2-9b-it.IQ3_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ3_S.gguf) | IQ3_S | 4.04GB | | [ko-gemma-2-9b-it.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K_S.gguf) | Q3_K_S | 4.04GB | | [ko-gemma-2-9b-it.IQ3_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ3_M.gguf) | IQ3_M | 4.19GB | | [ko-gemma-2-9b-it.Q3_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K.gguf) | Q3_K | 4.43GB | | [ko-gemma-2-9b-it.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K_M.gguf) | Q3_K_M | 4.43GB | | [ko-gemma-2-9b-it.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K_L.gguf) | Q3_K_L | 4.78GB | | [ko-gemma-2-9b-it.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ4_XS.gguf) | IQ4_XS | 4.86GB | | [ko-gemma-2-9b-it.Q4_0.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_0.gguf) | Q4_0 | 5.07GB | | [ko-gemma-2-9b-it.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ4_NL.gguf) | IQ4_NL | 5.1GB | | [ko-gemma-2-9b-it.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_K_S.gguf) | Q4_K_S | 5.1GB | | [ko-gemma-2-9b-it.Q4_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_K.gguf) | Q4_K | 5.37GB | | [ko-gemma-2-9b-it.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_K_M.gguf) | Q4_K_M | 5.37GB | | [ko-gemma-2-9b-it.Q4_1.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_1.gguf) | Q4_1 | 5.55GB | | [ko-gemma-2-9b-it.Q5_0.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_0.gguf) | Q5_0 | 6.04GB | | [ko-gemma-2-9b-it.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_K_S.gguf) | Q5_K_S | 6.04GB | | [ko-gemma-2-9b-it.Q5_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_K.gguf) | Q5_K | 6.19GB | | [ko-gemma-2-9b-it.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_K_M.gguf) | Q5_K_M | 6.19GB | | [ko-gemma-2-9b-it.Q5_1.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_1.gguf) | Q5_1 | 6.52GB | | [ko-gemma-2-9b-it.Q6_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q6_K.gguf) | Q6_K | 7.07GB | | [ko-gemma-2-9b-it.Q8_0.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q8_0.gguf) | Q8_0 | 9.15GB | Original model description: --- license: gemma library_name: transformers pipeline_tag: text-generation extra_gated_heading: Access Gemma on Hugging Face extra_gated_prompt: >- To access Gemma on Hugging Face, you’re required to review and agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging Face and click below. Requests are processed immediately. extra_gated_button_content: Acknowledge license tags: - conversational base_model: - google/gemma-2-9b language: - ko --- ## Model Details ### Ko-Gemma-2-9B-IT **[Ko-Gemma-2-9B-IT](https://huggingface.co/rtzr/ko-gemma-2-9b-it)** is a Korean-language conversational model that is part of the Gemma family of models. It is a text-to-text, decoder-only large language model, available in Korean. We fine-tuned this model on a carefully curated high-quality dataset using Supervised Fine-Tuning (SFT). And we use [Direct Preference Optimization](https://arxiv.org/abs/2305.18290) training specifically for Human Feedback. The datasets include: - [Orca-Math](https://huggingface.co/datasets/kuotient/orca-math-korean-dpo-pairs) - [dpo-mix-7k](https://huggingface.co/datasets/argilla/dpo-mix-7k) Some of these datasets were partially used and translated for training. In particular, a lot of repetition occurred during the translation process, so preprocessing was performed based on N-gram. #### *Inputs and outputs* - **Input:** Text string, such as a question, a prompt, or a document to be summarized. - **Output:** Generated Korean-language text in response to the input, such as an answer to a question, or a summary of a document. ### Google Gemma 2 Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. They are text-to-text, decoder-only large language models, available in English, with open weights for both pre-trained variants and instruction-tuned variants. Gemma models are well-suited for a variety of text generation tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as a laptop, desktop or your own cloud infrastructure, democratizing access to state of the art AI models and helping foster innovation for everyone. ## Benchmark Scores We evaluated it internally using [LogicKor](https://github.com/instructkr/LogicKor) code. While the public LogicKor code is assessed as GPT-4, our internal evaluation was conducted as GPT-4o. Public scores will be added as they are released. The scores below include only 0-shot evaluations. | Model | Math | Reasoning | Writing | Coding | Understanding | Grammar | Single ALL | Multi ALL | Overall | |:---------:|:-----:|:------:|:-----:|:-----:|:----:|:-----:|:-----:|:-----:|:----:| | [rtzr/ko-gemma-2-9b-it](https://huggingface.co/rtzr/ko-gemma-2-9b-it) | 8.71 / 8.00 | 9.14 / 8.00 | 9.43 / 9.29 | 9.00 / 9.43 | 9.57 / 9.86 | 7.14 / 5.00 | 8.83 | 8.26 | 8.55 | | [google/gemma-2-9b-it](https://huggingface.co/google/gemma-2-9b-it) | 8.57 / 7.71 | 8.86 / 7.00 | 9.29 / 9.29 | 9.29 / 9.57 | 8.57 / 8.29 | 6.86 / 3.86 | 8.57 | 7.62 | 8.10 | | [MLP-KTLim/llama-3-Korean-Bllossom-8B](https://huggingface.co/MLP-KTLim/llama-3-Korean-Bllossom-8B) | 6.43 / 5.71 | 6.86 / 5.14 | 9.14 / 8.57 | 8.29 / 8.14 | 8.43 / 9.29 | 5.71 / 5.29 | 7.48 | 7.02 | 7.25 | | [yanolja/EEVE-Korean-Instruct-10.8B-v1.0](https://huggingface.co/yanolja/EEVE-Korean-Instruct-10.8B-v1.0) | 5.57 / 4.29 | 8.14 / 5.14 | 8.29 / 6.29 | 6.43 / 7.86 | 9.29 / 8.57 | 6.57 / 3.71 | 7.38 | 5.98 | 6.68 | | [allganize/Llama-3-Alpha-Ko-8B-Instruct](https://huggingface.co/allganize/Llama-3-Alpha-Ko-8B-Instruct) | 4.57 / 3.00 | 6.86 / 6.43 | 7.43 / 6.71 | 8.43 / 8.43| 7.71 / 8.71 | 6.71 / 4.43 | 6.95 | 6.29 | 6.62 | ## Usage ### Install Dependencies You must install transformers >= 4.42.3 for gemma2 models. ```bash pip install transformers==4.42.3 accelerate ``` ### Python code with Pipeline ```python import transformers import torch model_id = "rtzr/ko-gemma-2-9b-it" pipeline = transformers.pipeline( "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto", ) pipeline.model.eval() instruction = "서울의 유명한 관광 코스를 만들어줄래?" messages = [ {"role": "user", "content": f"{instruction}"} ] prompt = pipeline.tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) terminators = [ pipeline.tokenizer.eos_token_id, pipeline.tokenizer.convert_tokens_to_ids("<end_of_turn>") ] outputs = pipeline( prompt, max_new_tokens=2048, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9, ) print(outputs[0]["generated_text"][len(prompt):]) ``` ```markdown 서울은 역사, 문화, 현대성이 조화를 이룬 매력적인 도시입니다. 여기서 즐길 수 있는 다양한 관광지와 명소를 소개합니다. 다음은 서울의 유명한 관광 코스 3가지입니다. **1. 역사와 문화를 둘러싼 한국관광코스** 1. **경복궁**: 조선 시대의 웅장한 왕궁을 만끽할 수 있는 곳입니다. 특히 매년 봄에 열리는 '춘추연회'는 경복궁의 아름다움을 더욱 돋보이게 합니다. 2. **북촌 한옥마을**: 고풍스러운 한옥이 모여있는 곳으로, 전통 문화 체험이 가능합니다. '북촌 한옥마을 문화체험관'에서는 한복 체험부터 종이만화, 한글 쓰기 등 다양한 프로그램이 준비되어 있습니다. 3. **인사동**: 서점, 미술관, 한식당이 많은 곳입니다. 특히 '인사동 문화관'에서는 서울의 역사와 문화를 이해하는 데 도움이 되는 전시를 볼 수 있습니다. 4. **광화문** 및 **명동**: 현대적인 쇼핑과 레스토랑이 즐비한 곳입니다. 광화문은 특히 젊은이들이 많은 곳으로, 스트리트 패션을 관찰하거나 밤거리에서 활기를 느낄 수 있습니다. **2. 도시의 모습을 바라보는 뷰투어 코스** 1. **남산타워**: 서울의 상징적인 건물로, 꼭대기에서 펼쳐지는 360도의 경치가 압니다. 특히 밤이 되면 조명이 어우러져 더욱 아름다워집니다. 2. **서울타워**: 남산타워와 비슷한 위치로, 높이가 더 높기 때문에 더 넓은 전망을 볼 수 있습니다. 서울타워 내부에는 다양한 전시관과 레스토랑도 있습니다. 3. **북악산**: 서울의 중심부에 위치한 산으로, 서울의 경치를 조금 다른 관점에서 볼 수 있습니다. 특히 북악산 정상인 북악사에서도 좋은 전망을 볼 수 있습니다. 4. **서울숲**: 녹지 공간으로, 도시의 혼잡함에서 벗어날 수 있는 곳입니다. 또한, 서울숲 내부에는 '서울숲 아트프레젠트'라는 공간이 있어 예술과 자연을 함께 체험할 수 있습니다. **3. 현대 문화를 만나는 코스** 1. **삼성동**: 현대 미술관이 많은 곳으로, '삼성 미술관', '아모리카나스 갤러리' 등이 있습니다. 또한, '코엑스'나 '아포카로포스' 등의 명소도 가까운 곳에 있습니다. 2. **이태원**: 외국인들이 많은 곳으로, 다양한 외국 음식을 즐길 수 있는 곳입니다. 또한, '이태원 글로컬문화센터'에서는 세계 각국의 문화 체험이 가능합니다. 3. **홍대**: 젊은이들의 문화가 넘치는 곳입니다. '홍대 롤링홀'은 특히 많은 사람들이 방문하는 곳입니다. 또한, '홍대 서점거리'에서는 독서와 문화를 만날 수 있습니다. 4. **강남**: 서울의 현대적 모습을 잘 보여주는 곳입니다. '강남역'을 중심으로 많은 고급 쇼핑몰과 레스토랑이 있습니다. 이러한 코스를 통해 서울의 다양한 모습을 한 번에 만나볼 수 있을 거예요. 각자의 취향에 맞춰 코스를 조절하시면 좋겠습니다. 즐거운 여행 되세요! ``` ### Python code with AutoModel ```python import os import torch from transformers import AutoTokenizer, AutoModelForCausalLM model_id = "rtzr/ko-gemma-2-9b-it" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.bfloat16, device_map="auto", ) model.eval() instruction = "서울의 유명한 관광 코스를 만들어줄래?" messages = [ {"role": "user", "content": f"{instruction}"} ] input_ids = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt" ).to(model.device) terminators = [ tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<end_of_turn>") ] outputs = model.generate( input_ids, max_new_tokens=2048, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9, ) print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)) ``` ```markdown 서울 관광 코스를 제안해드릴게요. 하루 종일 즐겁게 여행할 수 있는 루트로 구성했습니다. ### 1. 서울역사관 및 북촌한옥마을(오전) - 서울역사관: 서울의 역사와 문화를 체험할 수 있는 곳입니다. 다양한 전시물과 상설전시를 통해 서울의 변화를 살펴볼 수 있습니다. - 북촌한옥마을: 서울의 한옥을 보존하고 관리하는 곳입니다. 조선 시대의 분위기를 느낄 수 있으며, 한옥에서 문화 콘텐츠도 제공하는 곳도 많습니다. ### 2. 북악산 입장과 북악산 등산(오전) - 북악산은 서울의 북쪽에 위치한 산으로, 서울 한복판에서도 자연을 만날 수 있는 곳입니다. 북악산 입구에서 등산을 시작하여, 북악산 정상까지 올라가면 서울의 전경을 볼 수 있습니다. ### 3. 종로 명동 쇼핑과 맛집 투어(낮) - 명동: 다양한 쇼핑몰과 매장이 있는 곳입니다. 명동 쇼핑타운, 미스터트위스터, 미스터리마켓 등을 방문해보세요. - 맛집 투어: 명동에는 다양한 지역 음식을 먹을 수 있는 곳이 많습니다. 떡볶이, 순대, 닭강정 등을 맛볼 수 있는 곳을 추천드립니다. ### 4. 서울시립미술관과 덕수궁(오후) - 서울시립미술관: 현대미술을 전시하는 곳입니다. 특별전이 열린다면 방문해 볼 수 있습니다. - 덕수궁: 조선시대의 궁궐입니다. 특히 봄에는 벚꽃이 아름답게 만발합니다. ### 5. 남산타워와 남산공원 산책(오후) - 남산타워: 남산에 있는 관람대입니다. 남산타워에 올라가면 서울의 360도 전경을 볼 수 있습니다. - 남산공원: 남산에 있는 공원입니다. 다양한 테마 공원과 조경이 잘 된 곳입니다. 남산공원을 산책하며 휴식을 취할 수 있습니다. ### 6. 명동 또는 이태원에서의 저녁 식사와 문화 활동(저녁) - 명동: 다양한 전통적인 한국 음식을 먹을 수 있는 곳입니다. 또한, 명동은 밤에도 활기차게 활발한 문화 생활을 할 수 있는 곳입니다. - 이태원: 외국인 관광객들이 많이 찾는 곳으로, 다양한 세계 음식을 먹을 수 있으며, 클럽이나 바가 많은 문화적 활동이 가능한 곳입니다. 이 코스는 하루 종일 활발하게 여행을 할 수 있도록 계획했습니다. 각 지역에 따라 이동 시간을 고려하시고, 개장 시간과 전시 일정 등을 미리 확인하시는 것이 좋습니다. 즐거운 여행 되세요! ``` ### Quantized Versions through bitsandbytes - *Using 8-bit precision* - *Using 4-bit precision* ```python # pip install bitsandbytes from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig model_id = "rtzr/ko-gemma-2-9b-it" quantization_config_8bit = BitsAndBytesConfig(load_in_8bit=True) # quantization_config_4bit = BitsAndBytesConfig(load_in_4bit=True) tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.bfloat16, device_map="auto", quantization_config=quantization_config_8bit, # quantization_config=quantization_config_4bit, low_cpu_mem_usage=True, ) model.eval() instruction = "서울의 유명한 관광 코스를 만들어줄래?" messages = [ {"role": "user", "content": f"{instruction}"} ] input_ids = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt" ).to(model.device) terminators = [ tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<end_of_turn>") ] outputs = model.generate( input_ids, max_new_tokens=2048, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9, ) print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)) ``` ### VLLM Usage When we use `vllm==0.5.1`, the gemma2 model cannot be loaded yet and the following [issue](https://github.com/vllm-project/vllm/issues/6237) occurs. So it is recommended to use `vllm/vllm-openai:latest` docker or [`vllm==0.5.0.post1`](https://github.com/vllm-project/vllm/releases/tag/v0.5.0.post1). ```bash #!/bin/bash VLLM_ATTENTION_BACKEND=FLASHINFER MODEL_NAME="rtzr/ko-gemma-2-9b-it" MODEL_PATH="YOUR_PATH/${MODEL_NAME}" docker run --rm --gpus all \ -p 8000:8000 \ --shm-size=12gb --ulimit memlock=-1 --ulimit stack=67108864 \ -e VLLM_ATTENTION_BACKEND=${VLLM_ATTENTION_BACKEND} \ -v $MODEL_PATH:/vllm-workspace/${MODEL_NAME} \ vllm/vllm-openai:latest \ --model ${MODEL_NAME} --dtype auto \ --gpu-memory-utilization 0.8 ``` ## License Gemma 2 License: <https://ai.google.dev/gemma/terms> ## Citation ```none @article{RTZR, title={ko-gemma-2-9b-it}, author={Return Zero Team}, year={2024}, url={https://huggingface.co/rtzr/ko-gemma-2-9b-it} } ``` ```none @article{gemma_2024, title={Gemma}, url={https://www.kaggle.com/m/3301}, DOI={10.34740/KAGGLE/M/3301}, publisher={Kaggle}, author={Gemma Team}, year={2024} } ```
null
Non_BioNLP
Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) ko-gemma-2-9b-it - GGUF - Model creator: https://huggingface.co/rtzr/ - Original model: https://huggingface.co/rtzr/ko-gemma-2-9b-it/ | Name | Quant method | Size | | ---- | ---- | ---- | | [ko-gemma-2-9b-it.Q2_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q2_K.gguf) | Q2_K | 3.54GB | | [ko-gemma-2-9b-it.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ3_XS.gguf) | IQ3_XS | 3.86GB | | [ko-gemma-2-9b-it.IQ3_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ3_S.gguf) | IQ3_S | 4.04GB | | [ko-gemma-2-9b-it.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K_S.gguf) | Q3_K_S | 4.04GB | | [ko-gemma-2-9b-it.IQ3_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ3_M.gguf) | IQ3_M | 4.19GB | | [ko-gemma-2-9b-it.Q3_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K.gguf) | Q3_K | 4.43GB | | [ko-gemma-2-9b-it.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K_M.gguf) | Q3_K_M | 4.43GB | | [ko-gemma-2-9b-it.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q3_K_L.gguf) | Q3_K_L | 4.78GB | | [ko-gemma-2-9b-it.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ4_XS.gguf) | IQ4_XS | 4.86GB | | [ko-gemma-2-9b-it.Q4_0.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_0.gguf) | Q4_0 | 5.07GB | | [ko-gemma-2-9b-it.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.IQ4_NL.gguf) | IQ4_NL | 5.1GB | | [ko-gemma-2-9b-it.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_K_S.gguf) | Q4_K_S | 5.1GB | | [ko-gemma-2-9b-it.Q4_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_K.gguf) | Q4_K | 5.37GB | | [ko-gemma-2-9b-it.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_K_M.gguf) | Q4_K_M | 5.37GB | | [ko-gemma-2-9b-it.Q4_1.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q4_1.gguf) | Q4_1 | 5.55GB | | [ko-gemma-2-9b-it.Q5_0.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_0.gguf) | Q5_0 | 6.04GB | | [ko-gemma-2-9b-it.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_K_S.gguf) | Q5_K_S | 6.04GB | | [ko-gemma-2-9b-it.Q5_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_K.gguf) | Q5_K | 6.19GB | | [ko-gemma-2-9b-it.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_K_M.gguf) | Q5_K_M | 6.19GB | | [ko-gemma-2-9b-it.Q5_1.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q5_1.gguf) | Q5_1 | 6.52GB | | [ko-gemma-2-9b-it.Q6_K.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q6_K.gguf) | Q6_K | 7.07GB | | [ko-gemma-2-9b-it.Q8_0.gguf](https://huggingface.co/RichardErkhov/rtzr_-_ko-gemma-2-9b-it-gguf/blob/main/ko-gemma-2-9b-it.Q8_0.gguf) | Q8_0 | 9.15GB | Original model description: --- license: gemma library_name: transformers pipeline_tag: text-generation extra_gated_heading: Access Gemma on Hugging Face extra_gated_prompt: >- To access Gemma on Hugging Face, you’re required to review and agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging Face and click below. Requests are processed immediately. extra_gated_button_content: Acknowledge license tags: - conversational base_model: - google/gemma-2-9b language: - ko --- ## Model Details ### Ko-Gemma-2-9B-IT **[Ko-Gemma-2-9B-IT](https://huggingface.co/rtzr/ko-gemma-2-9b-it)** is a Korean-language conversational model that is part of the Gemma family of models. It is a text-to-text, decoder-only large language model, available in Korean. We fine-tuned this model on a carefully curated high-quality dataset using Supervised Fine-Tuning (SFT). And we use [Direct Preference Optimization](https://arxiv.org/abs/2305.18290) training specifically for Human Feedback. The datasets include: - [Orca-Math](https://huggingface.co/datasets/kuotient/orca-math-korean-dpo-pairs) - [dpo-mix-7k](https://huggingface.co/datasets/argilla/dpo-mix-7k) Some of these datasets were partially used and translated for training. In particular, a lot of repetition occurred during the translation process, so preprocessing was performed based on N-gram. #### *Inputs and outputs* - **Input:** Text string, such as a question, a prompt, or a document to be summarized. - **Output:** Generated Korean-language text in response to the input, such as an answer to a question, or a summary of a document. ### Google Gemma 2 Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. They are text-to-text, decoder-only large language models, available in English, with open weights for both pre-trained variants and instruction-tuned variants. Gemma models are well-suited for a variety of text generation tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as a laptop, desktop or your own cloud infrastructure, democratizing access to state of the art AI models and helping foster innovation for everyone. ## Benchmark Scores We evaluated it internally using [LogicKor](https://github.com/instructkr/LogicKor) code. While the public LogicKor code is assessed as GPT-4, our internal evaluation was conducted as GPT-4o. Public scores will be added as they are released. The scores below include only 0-shot evaluations. | Model | Math | Reasoning | Writing | Coding | Understanding | Grammar | Single ALL | Multi ALL | Overall | |:---------:|:-----:|:------:|:-----:|:-----:|:----:|:-----:|:-----:|:-----:|:----:| | [rtzr/ko-gemma-2-9b-it](https://huggingface.co/rtzr/ko-gemma-2-9b-it) | 8.71 / 8.00 | 9.14 / 8.00 | 9.43 / 9.29 | 9.00 / 9.43 | 9.57 / 9.86 | 7.14 / 5.00 | 8.83 | 8.26 | 8.55 | | [google/gemma-2-9b-it](https://huggingface.co/google/gemma-2-9b-it) | 8.57 / 7.71 | 8.86 / 7.00 | 9.29 / 9.29 | 9.29 / 9.57 | 8.57 / 8.29 | 6.86 / 3.86 | 8.57 | 7.62 | 8.10 | | [MLP-KTLim/llama-3-Korean-Bllossom-8B](https://huggingface.co/MLP-KTLim/llama-3-Korean-Bllossom-8B) | 6.43 / 5.71 | 6.86 / 5.14 | 9.14 / 8.57 | 8.29 / 8.14 | 8.43 / 9.29 | 5.71 / 5.29 | 7.48 | 7.02 | 7.25 | | [yanolja/EEVE-Korean-Instruct-10.8B-v1.0](https://huggingface.co/yanolja/EEVE-Korean-Instruct-10.8B-v1.0) | 5.57 / 4.29 | 8.14 / 5.14 | 8.29 / 6.29 | 6.43 / 7.86 | 9.29 / 8.57 | 6.57 / 3.71 | 7.38 | 5.98 | 6.68 | | [allganize/Llama-3-Alpha-Ko-8B-Instruct](https://huggingface.co/allganize/Llama-3-Alpha-Ko-8B-Instruct) | 4.57 / 3.00 | 6.86 / 6.43 | 7.43 / 6.71 | 8.43 / 8.43| 7.71 / 8.71 | 6.71 / 4.43 | 6.95 | 6.29 | 6.62 | ## Usage ### Install Dependencies You must install transformers >= 4.42.3 for gemma2 models. ```bash pip install transformers==4.42.3 accelerate ``` ### Python code with Pipeline ```python import transformers import torch model_id = "rtzr/ko-gemma-2-9b-it" pipeline = transformers.pipeline( "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto", ) pipeline.model.eval() instruction = "서울의 유명한 관광 코스를 만들어줄래?" messages = [ {"role": "user", "content": f"{instruction}"} ] prompt = pipeline.tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) terminators = [ pipeline.tokenizer.eos_token_id, pipeline.tokenizer.convert_tokens_to_ids("<end_of_turn>") ] outputs = pipeline( prompt, max_new_tokens=2048, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9, ) print(outputs[0]["generated_text"][len(prompt):]) ``` ```markdown 서울은 역사, 문화, 현대성이 조화를 이룬 매력적인 도시입니다. 여기서 즐길 수 있는 다양한 관광지와 명소를 소개합니다. 다음은 서울의 유명한 관광 코스 3가지입니다. **1. 역사와 문화를 둘러싼 한국관광코스** 1. **경복궁**: 조선 시대의 웅장한 왕궁을 만끽할 수 있는 곳입니다. 특히 매년 봄에 열리는 '춘추연회'는 경복궁의 아름다움을 더욱 돋보이게 합니다. 2. **북촌 한옥마을**: 고풍스러운 한옥이 모여있는 곳으로, 전통 문화 체험이 가능합니다. '북촌 한옥마을 문화체험관'에서는 한복 체험부터 종이만화, 한글 쓰기 등 다양한 프로그램이 준비되어 있습니다. 3. **인사동**: 서점, 미술관, 한식당이 많은 곳입니다. 특히 '인사동 문화관'에서는 서울의 역사와 문화를 이해하는 데 도움이 되는 전시를 볼 수 있습니다. 4. **광화문** 및 **명동**: 현대적인 쇼핑과 레스토랑이 즐비한 곳입니다. 광화문은 특히 젊은이들이 많은 곳으로, 스트리트 패션을 관찰하거나 밤거리에서 활기를 느낄 수 있습니다. **2. 도시의 모습을 바라보는 뷰투어 코스** 1. **남산타워**: 서울의 상징적인 건물로, 꼭대기에서 펼쳐지는 360도의 경치가 압니다. 특히 밤이 되면 조명이 어우러져 더욱 아름다워집니다. 2. **서울타워**: 남산타워와 비슷한 위치로, 높이가 더 높기 때문에 더 넓은 전망을 볼 수 있습니다. 서울타워 내부에는 다양한 전시관과 레스토랑도 있습니다. 3. **북악산**: 서울의 중심부에 위치한 산으로, 서울의 경치를 조금 다른 관점에서 볼 수 있습니다. 특히 북악산 정상인 북악사에서도 좋은 전망을 볼 수 있습니다. 4. **서울숲**: 녹지 공간으로, 도시의 혼잡함에서 벗어날 수 있는 곳입니다. 또한, 서울숲 내부에는 '서울숲 아트프레젠트'라는 공간이 있어 예술과 자연을 함께 체험할 수 있습니다. **3. 현대 문화를 만나는 코스** 1. **삼성동**: 현대 미술관이 많은 곳으로, '삼성 미술관', '아모리카나스 갤러리' 등이 있습니다. 또한, '코엑스'나 '아포카로포스' 등의 명소도 가까운 곳에 있습니다. 2. **이태원**: 외국인들이 많은 곳으로, 다양한 외국 음식을 즐길 수 있는 곳입니다. 또한, '이태원 글로컬문화센터'에서는 세계 각국의 문화 체험이 가능합니다. 3. **홍대**: 젊은이들의 문화가 넘치는 곳입니다. '홍대 롤링홀'은 특히 많은 사람들이 방문하는 곳입니다. 또한, '홍대 서점거리'에서는 독서와 문화를 만날 수 있습니다. 4. **강남**: 서울의 현대적 모습을 잘 보여주는 곳입니다. '강남역'을 중심으로 많은 고급 쇼핑몰과 레스토랑이 있습니다. 이러한 코스를 통해 서울의 다양한 모습을 한 번에 만나볼 수 있을 거예요. 각자의 취향에 맞춰 코스를 조절하시면 좋겠습니다. 즐거운 여행 되세요! ``` ### Python code with AutoModel ```python import os import torch from transformers import AutoTokenizer, AutoModelForCausalLM model_id = "rtzr/ko-gemma-2-9b-it" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.bfloat16, device_map="auto", ) model.eval() instruction = "서울의 유명한 관광 코스를 만들어줄래?" messages = [ {"role": "user", "content": f"{instruction}"} ] input_ids = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt" ).to(model.device) terminators = [ tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<end_of_turn>") ] outputs = model.generate( input_ids, max_new_tokens=2048, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9, ) print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)) ``` ```markdown 서울 관광 코스를 제안해드릴게요. 하루 종일 즐겁게 여행할 수 있는 루트로 구성했습니다. ### 1. 서울역사관 및 북촌한옥마을(오전) - 서울역사관: 서울의 역사와 문화를 체험할 수 있는 곳입니다. 다양한 전시물과 상설전시를 통해 서울의 변화를 살펴볼 수 있습니다. - 북촌한옥마을: 서울의 한옥을 보존하고 관리하는 곳입니다. 조선 시대의 분위기를 느낄 수 있으며, 한옥에서 문화 콘텐츠도 제공하는 곳도 많습니다. ### 2. 북악산 입장과 북악산 등산(오전) - 북악산은 서울의 북쪽에 위치한 산으로, 서울 한복판에서도 자연을 만날 수 있는 곳입니다. 북악산 입구에서 등산을 시작하여, 북악산 정상까지 올라가면 서울의 전경을 볼 수 있습니다. ### 3. 종로 명동 쇼핑과 맛집 투어(낮) - 명동: 다양한 쇼핑몰과 매장이 있는 곳입니다. 명동 쇼핑타운, 미스터트위스터, 미스터리마켓 등을 방문해보세요. - 맛집 투어: 명동에는 다양한 지역 음식을 먹을 수 있는 곳이 많습니다. 떡볶이, 순대, 닭강정 등을 맛볼 수 있는 곳을 추천드립니다. ### 4. 서울시립미술관과 덕수궁(오후) - 서울시립미술관: 현대미술을 전시하는 곳입니다. 특별전이 열린다면 방문해 볼 수 있습니다. - 덕수궁: 조선시대의 궁궐입니다. 특히 봄에는 벚꽃이 아름답게 만발합니다. ### 5. 남산타워와 남산공원 산책(오후) - 남산타워: 남산에 있는 관람대입니다. 남산타워에 올라가면 서울의 360도 전경을 볼 수 있습니다. - 남산공원: 남산에 있는 공원입니다. 다양한 테마 공원과 조경이 잘 된 곳입니다. 남산공원을 산책하며 휴식을 취할 수 있습니다. ### 6. 명동 또는 이태원에서의 저녁 식사와 문화 활동(저녁) - 명동: 다양한 전통적인 한국 음식을 먹을 수 있는 곳입니다. 또한, 명동은 밤에도 활기차게 활발한 문화 생활을 할 수 있는 곳입니다. - 이태원: 외국인 관광객들이 많이 찾는 곳으로, 다양한 세계 음식을 먹을 수 있으며, 클럽이나 바가 많은 문화적 활동이 가능한 곳입니다. 이 코스는 하루 종일 활발하게 여행을 할 수 있도록 계획했습니다. 각 지역에 따라 이동 시간을 고려하시고, 개장 시간과 전시 일정 등을 미리 확인하시는 것이 좋습니다. 즐거운 여행 되세요! ``` ### Quantized Versions through bitsandbytes - *Using 8-bit precision* - *Using 4-bit precision* ```python # pip install bitsandbytes from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig model_id = "rtzr/ko-gemma-2-9b-it" quantization_config_8bit = BitsAndBytesConfig(load_in_8bit=True) # quantization_config_4bit = BitsAndBytesConfig(load_in_4bit=True) tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.bfloat16, device_map="auto", quantization_config=quantization_config_8bit, # quantization_config=quantization_config_4bit, low_cpu_mem_usage=True, ) model.eval() instruction = "서울의 유명한 관광 코스를 만들어줄래?" messages = [ {"role": "user", "content": f"{instruction}"} ] input_ids = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt" ).to(model.device) terminators = [ tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<end_of_turn>") ] outputs = model.generate( input_ids, max_new_tokens=2048, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9, ) print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)) ``` ### VLLM Usage When we use `vllm==0.5.1`, the gemma2 model cannot be loaded yet and the following [issue](https://github.com/vllm-project/vllm/issues/6237) occurs. So it is recommended to use `vllm/vllm-openai:latest` docker or [`vllm==0.5.0.post1`](https://github.com/vllm-project/vllm/releases/tag/v0.5.0.post1). ```bash #!/bin/bash VLLM_ATTENTION_BACKEND=FLASHINFER MODEL_NAME="rtzr/ko-gemma-2-9b-it" MODEL_PATH="YOUR_PATH/${MODEL_NAME}" docker run --rm --gpus all \ -p 8000:8000 \ --shm-size=12gb --ulimit memlock=-1 --ulimit stack=67108864 \ -e VLLM_ATTENTION_BACKEND=${VLLM_ATTENTION_BACKEND} \ -v $MODEL_PATH:/vllm-workspace/${MODEL_NAME} \ vllm/vllm-openai:latest \ --model ${MODEL_NAME} --dtype auto \ --gpu-memory-utilization 0.8 ``` ## License Gemma 2 License: <https://ai.google.dev/gemma/terms> ## Citation ```none @article{RTZR, title={ko-gemma-2-9b-it}, author={Return Zero Team}, year={2024}, url={https://huggingface.co/rtzr/ko-gemma-2-9b-it} } ``` ```none @article{gemma_2024, title={Gemma}, url={https://www.kaggle.com/m/3301}, DOI={10.34740/KAGGLE/M/3301}, publisher={Kaggle}, author={Gemma Team}, year={2024} } ```
{}
task
[ "QUESTION_ANSWERING", "TRANSLATION", "SUMMARIZATION" ]
46,432
thucdangvan020999/marian-finetuned-kde4-en-to-fr
thucdangvan020999
translation
[ "transformers", "pytorch", "tensorboard", "marian", "text2text-generation", "translation", "generated_from_trainer", "dataset:kde4", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-10-19T19:27:37Z
2022-10-19T21:12:47+00:00
12
0
--- datasets: - kde4 license: apache-2.0 metrics: - bleu tags: - translation - generated_from_trainer model-index: - name: marian-finetuned-kde4-en-to-fr results: - task: type: text2text-generation name: Sequence-to-sequence Language Modeling dataset: name: kde4 type: kde4 config: en-fr split: train args: en-fr metrics: - type: bleu value: 52.83113187001415 name: Bleu --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # marian-finetuned-kde4-en-to-fr This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr) on the kde4 dataset. It achieves the following results on the evaluation set: - Loss: 0.8560 - Bleu: 52.8311 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.23.1 - Pytorch 1.12.1+cu113 - Datasets 2.6.1 - Tokenizers 0.13.1
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # marian-finetuned-kde4-en-to-fr This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr) on the kde4 dataset. It achieves the following results on the evaluation set: - Loss: 0.8560 - Bleu: 52.8311 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.23.1 - Pytorch 1.12.1+cu113 - Datasets 2.6.1 - Tokenizers 0.13.1
{"datasets": ["kde4"], "license": "apache-2.0", "metrics": ["bleu"], "tags": ["translation", "generated_from_trainer"], "model-index": [{"name": "marian-finetuned-kde4-en-to-fr", "results": [{"task": {"type": "text2text-generation", "name": "Sequence-to-sequence Language Modeling"}, "dataset": {"name": "kde4", "type": "kde4", "config": "en-fr", "split": "train", "args": "en-fr"}, "metrics": [{"type": "bleu", "value": 52.83113187001415, "name": "Bleu"}]}]}]}
task
[ "TRANSLATION" ]
46,433
simonepapa/setfit-baritoday-multilabel
simonepapa
text-classification
[ "setfit", "safetensors", "bert", "sentence-transformers", "text-classification", "generated_from_setfit_trainer", "arxiv:2209.11055", "base_model:nickprock/sentence-bert-base-italian-uncased", "base_model:finetune:nickprock/sentence-bert-base-italian-uncased", "region:us" ]
2024-12-17T16:21:02Z
2024-12-19T08:55:33+00:00
5
0
--- base_model: nickprock/sentence-bert-base-italian-uncased library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: "Danze, canti, bandiere gialloazzurre e messaggi di pace davanti al piazzale\ \ della chiesa di San Ferdinando di Bari. Si è riunita in via Sparano, come annunciato\ \ ieri, la comunità ucraina barese, per protestare contro la guerra attualmente\ \ in atto e contro gli invasori russi. Adulti e bambini hanno sfilato nel centro\ \ murattiano nel 'Giorno dell'unità', in cui si celebra la firma dell'Atto di\ \ Unificazione, un accordo siglato il 22 gennaio 1919 dalla Repubblica Popolare\ \ Ucraina e dalla Repubblica Nazionale dell'Ucraina Occidentale nella piazza di\ \ Santa Sofia a Kiev. \n\"Ringraziamo non solo i baresi ma tutta l'Italia per\ \ la generosità. Grazie a loro possiamo ogni giorno cibo, vestiti e altri aiuti\ \ in Ucraina. Ogni giorno di guerra che passa, è un giorno di dolore anche per\ \ i nostri piccoli. Con tutto il cuore vogliamo ringraziarvi per queste unità:\ \ questo periodo ha dimostrato che tutto il mondo è unito a favore dell'umanità\"\ \ spiega una partecipante all'evento." - text: 'L’ultimo appuntamento della prima parte della rassegna all’aperto “Ar/Giro Di Accordi”, ideata e promossa dall’omonimo luogo di incontro e club raffinato Argiro52 a Bari (info: 331.401.39.02), è previsto per giovedì 25 luglio alle 21.30 con il concerto del quintetto Interaction. Alla formazione composta da Guido di Leone (chitarra), Giampaolo Laurentaci (contrabbasso) e Giovanni Scasciamacchia (batteria), si aggiungeranno due guest: il sassofonista norvegese Martin Jacobsen e il flicornista Fabrizio Gaudino. “West Coast jazz” è il titolo del live in cui il quintetto eseguirà musiche di Art Farmer, Jim Hall, Chet Baker, Jerry Mulligan, Paul Desmond e Stan Getz. Il progetto nasce sulle orme del trombettista Art Farmer ed il chitarrista Jim Hall, una delle più riuscite collaborazioni fra artisti “cool”. Il sound, l’idea del jazz e parte del repertorio, vengono dai nostri musicisti riecheggiati con discrezione e personalità, nel rispetto del passato e del linguaggio del jazz. In ogni momento della tua vita, l''energia può fare la differenza. Con Acea Energia, Luce e Gas, mobilità elettrica e servizi smart Scegli Acea Contenuto Sponsor Jerry Mulligan e Chet Baker si incontrano e nasce il pianoless quartet, un nuovo modo di proporre gli standards, senza strumenti armonici, rifacendosi alla tecnica del contrappunto classico, Paul Desmond, Stan Getz disegnano assoli inconfondibili caratterizzati da tecnica, lirismo e timbri morbidi. Gli Interaction ci proiettano in un jazz raffinato, swing, armonicamente intrigante, melodicamente gradevole e sorprendente.' - text: 'Un''auto è finita, nel primo pomeriggio, sui paletti parapedonali del t5eatro petruzzelli, danneggiandoli: a guidare il mezzo, un uomo di 75 anni. Sul posto sono intervenute le pattuglie della Polizia Locale e un''autogru. Accertamenti in corso per stabilire la dinamica degli episodi. Il conducente sarà segnalato per richiesta di revisione accertamenti psicofisici e sanzionato per i danni causati.' - text: 'Domenica 12 ore 10.30 appuntamento con il nuovo itinerario “BARI ECLETTICA”. Alla scoperta dei palazzi simboli della borghesia e del commercio barese del secolo scorso. Costo: 10 euro Punto d’incontro: Piazza Eroi del Mare c/o statua Araldo di Crollalanza Prenotazione obbligatoria a [email protected] o tramite whatsapp al 3403394708 indicando il numero di partecipanti, un cognome e un contatto telefonico. 200 GB e minuti illimitati a 7,90€/mese. Attivazione e 1° mese gratis. Vedi Offerta Contenuto Sponsor Ottieni indicazioni con i mezzi pubblici verso: Madonnella Linee che fermano vicino a Piazza Eroi del Mare Crea il tuo widget' - text: '"Non esistono professioni sanitarie di serie A e serie B": è il motto della protesta che nella mattinata ha portato i laureati in psicologia, biologia e farmacia a manifestare a Bari. Riunitisi in piazza Cesare Battisti, i manifestanti hanno esposto striscioni e cartelli, chiedendo una modifica del sistema di abilitazione professionale. "Esattamente come è avvenuto per medici e infermieri con il decreto Cura Italia - spiegano i laureati- Chiediamo che il tirocinio venga riconosciuto per l''abilitazione all''esercizio della professione". Una manifestazione che è stata replicata in altre 12 città italiane, a supporto di quella romana, che ha l''obiettivo di portare le istanze dei manifestanti al ministro dell''Università e della ricerca Gaetano Manfredi. "Noi psicologi - aggiunge Eugenio Trotta - ci ritroviamo a sostenere un’unica prova orale per l''esame, a distanza e omnicomprensiva di tutte le materie previste dall’Esame di Stato canonico, che normalmente consta di più prove ed è spalmato su più mesi". Con tutti i limiti che i colloqui via internet portano con sé: "Non è possibile rischiare una bocciatura in caso di problemi alla connessione, come indicato nel regolamento dell''Università La Sapienza di Roma" conclude. GALLERY' inference: false --- # SetFit with nickprock/sentence-bert-base-italian-uncased This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [nickprock/sentence-bert-base-italian-uncased](https://huggingface.co/nickprock/sentence-bert-base-italian-uncased) as the Sentence Transformer embedding model. A OneVsRestClassifier instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [nickprock/sentence-bert-base-italian-uncased](https://huggingface.co/nickprock/sentence-bert-base-italian-uncased) - **Classification head:** a OneVsRestClassifier instance - **Maximum Sequence Length:** 512 tokens <!-- - **Number of Classes:** Unknown --> <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("simonepapa/setfit-baritoday-multilabel") # Run inference preds = model("Un'auto è finita, nel primo pomeriggio, sui paletti parapedonali del t5eatro petruzzelli, danneggiandoli: a guidare il mezzo, un uomo di 75 anni. Sul posto sono intervenute le pattuglie della Polizia Locale e un'autogru. Accertamenti in corso per stabilire la dinamica degli episodi. Il conducente sarà segnalato per richiesta di revisione accertamenti psicofisici e sanzionato per i danni causati.") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:---------|:-----| | Word count | 42 | 154.4615 | 1030 | ### Training Hyperparameters - batch_size: (16, 16) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 20 - body_learning_rate: (2e-05, 2e-05) - head_learning_rate: 2e-05 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0038 | 1 | 0.1775 | - | | 0.1923 | 50 | 0.1375 | - | | 0.3846 | 100 | 0.0755 | - | | 0.5769 | 150 | 0.0521 | - | | 0.7692 | 200 | 0.0456 | - | | 0.9615 | 250 | 0.0446 | - | ### Framework Versions - Python: 3.10.5 - SetFit: 1.1.0 - Sentence Transformers: 3.3.1 - Transformers: 4.42.2 - PyTorch: 2.5.1+cu124 - Datasets: 3.1.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SetFit with nickprock/sentence-bert-base-italian-uncased This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [nickprock/sentence-bert-base-italian-uncased](https://huggingface.co/nickprock/sentence-bert-base-italian-uncased) as the Sentence Transformer embedding model. A OneVsRestClassifier instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [nickprock/sentence-bert-base-italian-uncased](https://huggingface.co/nickprock/sentence-bert-base-italian-uncased) - **Classification head:** a OneVsRestClassifier instance - **Maximum Sequence Length:** 512 tokens <!-- - **Number of Classes:** Unknown --> <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("simonepapa/setfit-baritoday-multilabel") # Run inference preds = model("Un'auto è finita, nel primo pomeriggio, sui paletti parapedonali del t5eatro petruzzelli, danneggiandoli: a guidare il mezzo, un uomo di 75 anni. Sul posto sono intervenute le pattuglie della Polizia Locale e un'autogru. Accertamenti in corso per stabilire la dinamica degli episodi. Il conducente sarà segnalato per richiesta di revisione accertamenti psicofisici e sanzionato per i danni causati.") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:---------|:-----| | Word count | 42 | 154.4615 | 1030 | ### Training Hyperparameters - batch_size: (16, 16) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 20 - body_learning_rate: (2e-05, 2e-05) - head_learning_rate: 2e-05 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0038 | 1 | 0.1775 | - | | 0.1923 | 50 | 0.1375 | - | | 0.3846 | 100 | 0.0755 | - | | 0.5769 | 150 | 0.0521 | - | | 0.7692 | 200 | 0.0456 | - | | 0.9615 | 250 | 0.0446 | - | ### Framework Versions - Python: 3.10.5 - SetFit: 1.1.0 - Sentence Transformers: 3.3.1 - Transformers: 4.42.2 - PyTorch: 2.5.1+cu124 - Datasets: 3.1.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
{"base_model": "nickprock/sentence-bert-base-italian-uncased", "library_name": "setfit", "metrics": ["accuracy"], "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification", "generated_from_setfit_trainer"], "widget": [{"text": "Danze, canti, bandiere gialloazzurre e messaggi di pace davanti al piazzale della chiesa di San Ferdinando di Bari. Si è riunita in via Sparano, come annunciato ieri, la comunità ucraina barese, per protestare contro la guerra attualmente in atto e contro gli invasori russi. Adulti e bambini hanno sfilato nel centro murattiano nel 'Giorno dell'unità', in cui si celebra la firma dell'Atto di Unificazione, un accordo siglato il 22 gennaio 1919 dalla Repubblica Popolare Ucraina e dalla Repubblica Nazionale dell'Ucraina Occidentale nella piazza di Santa Sofia a Kiev. \n\"Ringraziamo non solo i baresi ma tutta l'Italia per la generosità. Grazie a loro possiamo ogni giorno cibo, vestiti e altri aiuti in Ucraina. Ogni giorno di guerra che passa, è un giorno di dolore anche per i nostri piccoli. Con tutto il cuore vogliamo ringraziarvi per queste unità: questo periodo ha dimostrato che tutto il mondo è unito a favore dell'umanità\" spiega una partecipante all'evento."}, {"text": "L’ultimo appuntamento della prima parte della rassegna all’aperto “Ar/Giro Di Accordi”, ideata e promossa dall’omonimo luogo di incontro e club raffinato Argiro52 a Bari (info: 331.401.39.02), è previsto per giovedì 25 luglio alle 21.30 con il concerto del quintetto Interaction. Alla formazione composta da Guido di Leone (chitarra), Giampaolo Laurentaci (contrabbasso) e Giovanni Scasciamacchia (batteria), si aggiungeranno due guest: il sassofonista norvegese Martin Jacobsen e il flicornista Fabrizio Gaudino.\n“West Coast jazz” è il titolo del live in cui il quintetto eseguirà musiche di Art Farmer, Jim Hall, Chet Baker, Jerry Mulligan, Paul Desmond e Stan Getz. Il progetto nasce sulle orme del trombettista Art Farmer ed il chitarrista Jim Hall, una delle più riuscite collaborazioni fra artisti “cool”. Il sound, l’idea del jazz e parte del repertorio, vengono dai nostri musicisti riecheggiati con discrezione e personalità, nel rispetto del passato e del linguaggio del jazz.\nIn ogni momento della tua vita, l'energia può fare la differenza. Con Acea Energia, Luce e Gas, mobilità elettrica e servizi smart\nScegli Acea\nContenuto Sponsor\nJerry Mulligan e Chet Baker si incontrano e nasce il pianoless quartet, un nuovo modo di proporre gli standards, senza strumenti armonici, rifacendosi alla tecnica del contrappunto classico, Paul Desmond, Stan Getz disegnano assoli inconfondibili caratterizzati da tecnica, lirismo e timbri morbidi. Gli Interaction ci proiettano in un jazz raffinato, swing, armonicamente intrigante, melodicamente gradevole e sorprendente."}, {"text": "Un'auto è finita, nel primo pomeriggio, sui paletti parapedonali del t5eatro petruzzelli, danneggiandoli: a guidare il mezzo, un uomo di 75 anni. Sul posto sono intervenute le pattuglie della Polizia Locale e un'autogru. Accertamenti in corso per stabilire la dinamica degli episodi. Il conducente sarà segnalato per richiesta di revisione accertamenti psicofisici e sanzionato per i danni causati."}, {"text": "Domenica 12 ore 10.30 appuntamento con il nuovo itinerario “BARI ECLETTICA”. Alla scoperta dei palazzi simboli della borghesia e del commercio barese del secolo scorso.\n\nCosto: 10 euro\n\nPunto d’incontro: Piazza Eroi del Mare c/o statua Araldo di Crollalanza\n\nPrenotazione obbligatoria a [email protected] o tramite whatsapp al 3403394708 indicando il numero di partecipanti, un cognome e un contatto telefonico.\n200 GB e minuti illimitati a 7,90€/mese. Attivazione e 1° mese gratis.\nVedi Offerta\nContenuto Sponsor\nOttieni indicazioni con i mezzi pubblici verso: Madonnella\nLinee che fermano vicino a Piazza Eroi del Mare\nCrea il tuo widget"}, {"text": "\"Non esistono professioni sanitarie di serie A e serie B\": è il motto della protesta che nella mattinata ha portato i laureati in psicologia, biologia e farmacia a manifestare a Bari. Riunitisi in piazza Cesare Battisti, i manifestanti hanno esposto striscioni e cartelli, chiedendo una modifica del sistema di abilitazione professionale. \"Esattamente come è avvenuto per medici e infermieri con il decreto Cura Italia - spiegano i laureati- Chiediamo che il tirocinio venga riconosciuto per l'abilitazione all'esercizio della professione\". Una manifestazione che è stata replicata in altre 12 città italiane, a supporto di quella romana, che ha l'obiettivo di portare le istanze dei manifestanti al ministro dell'Università e della ricerca Gaetano Manfredi.\n\"Noi psicologi - aggiunge Eugenio Trotta - ci ritroviamo a sostenere un’unica prova orale per l'esame, a distanza e omnicomprensiva di tutte le materie previste dall’Esame di Stato canonico, che normalmente consta di più prove ed è spalmato su più mesi\". Con tutti i limiti che i colloqui via internet portano con sé: \"Non è possibile rischiare una bocciatura in caso di problemi alla connessione, come indicato nel regolamento dell'Università La Sapienza di Roma\" conclude.\nGALLERY"}], "inference": false}
task
[ "TEXT_CLASSIFICATION" ]
46,434
jimboHsueh/HW1
jimboHsueh
multiple-choice
[ "transformers", "pytorch", "bert", "multiple-choice", "endpoints_compatible", "region:us" ]
2023-10-06T15:39:35Z
2023-10-18T11:48:39+00:00
98
0
--- {} --- # **Reproduce my result** **#Environment** ``` pip install -r requirements.txt ``` ##**Download** Download training, validation, testing data, as well as multiple choice model and question answering model. ``` bash ./download.sh ``` ##**Multiple Choice** ``` python run_multiple_choice.py \ --context_data <context.json> \ --train_data <train.json> \ --valid_data <valid.json> \ --test_data <test.json> \ --max_seq_length 512 \ --gradient_accumulation_steps 8 \ --model_name_or_path bert-base-chinese \ --learning_rate 2e-5 \ --output_dir <output directory> \ --per_device_train_batch_size 8 ``` -**model_name_or_path**: Path to pretrained model. -**output_dir**: Path to directory which saves the model outputs. -**context_data**: Path to context.json. -**train_data**: Path to train.json. -**valid_data**: Path to valid.json. -**test_data**: Path to test.json. ##**Question Answering** ``` python run_question_answering.py \ --context_data <context.json> \ --train_data <train.json> \ --valid_data <valid.json> \ --test_data <test.json> \ --max_seq_length 512 \ --gradient_accumulation_steps 8 \ --model_name_or_path hfl/chinese-roberta-wwm-ext-large \ --learning_rate 2e-5 \ --output_dir <output directory> \ --per_device_train_batch_size 8 ``` -**model_name_or_path**: Path to pretrained model. -**output_dir**: Path to directory which saves the model outputs. -**context_data**: Path to context.json. -**train_data**: Path to train.json. -**valid_data**: Path to valid.json. -**test_data**: Path to test.json. ##**Reproduce my result** ``` bash ./download.sh bash ./run.sh /path/to/context.json /path/to/test.json /path/to/pred/prediction.csv ```
null
Non_BioNLP
# **Reproduce my result** **#Environment** ``` pip install -r requirements.txt ``` ##**Download** Download training, validation, testing data, as well as multiple choice model and question answering model. ``` bash ./download.sh ``` ##**Multiple Choice** ``` python run_multiple_choice.py \ --context_data <context.json> \ --train_data <train.json> \ --valid_data <valid.json> \ --test_data <test.json> \ --max_seq_length 512 \ --gradient_accumulation_steps 8 \ --model_name_or_path bert-base-chinese \ --learning_rate 2e-5 \ --output_dir <output directory> \ --per_device_train_batch_size 8 ``` -**model_name_or_path**: Path to pretrained model. -**output_dir**: Path to directory which saves the model outputs. -**context_data**: Path to context.json. -**train_data**: Path to train.json. -**valid_data**: Path to valid.json. -**test_data**: Path to test.json. ##**Question Answering** ``` python run_question_answering.py \ --context_data <context.json> \ --train_data <train.json> \ --valid_data <valid.json> \ --test_data <test.json> \ --max_seq_length 512 \ --gradient_accumulation_steps 8 \ --model_name_or_path hfl/chinese-roberta-wwm-ext-large \ --learning_rate 2e-5 \ --output_dir <output directory> \ --per_device_train_batch_size 8 ``` -**model_name_or_path**: Path to pretrained model. -**output_dir**: Path to directory which saves the model outputs. -**context_data**: Path to context.json. -**train_data**: Path to train.json. -**valid_data**: Path to valid.json. -**test_data**: Path to test.json. ##**Reproduce my result** ``` bash ./download.sh bash ./run.sh /path/to/context.json /path/to/test.json /path/to/pred/prediction.csv ```
{}
task
[ "QUESTION_ANSWERING" ]
46,435
YakovElm/Hyperledger15SetFitModel_balance_ratio_1
YakovElm
text-classification
[ "sentence-transformers", "pytorch", "mpnet", "setfit", "text-classification", "arxiv:2209.11055", "license:apache-2.0", "region:us" ]
2023-06-01T14:47:19Z
2023-06-01T14:47:54+00:00
8
0
--- license: apache-2.0 pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification --- # YakovElm/Hyperledger15SetFitModel_balance_ratio_1 This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("YakovElm/Hyperledger15SetFitModel_balance_ratio_1") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
null
Non_BioNLP
# YakovElm/Hyperledger15SetFitModel_balance_ratio_1 This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("YakovElm/Hyperledger15SetFitModel_balance_ratio_1") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
{"license": "apache-2.0", "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification"]}
task
[ "TEXT_CLASSIFICATION" ]
46,436
kennethge123/entailed_after_rte-bert-base-uncased
kennethge123
text-classification
[ "transformers", "tensorboard", "safetensors", "bert", "text-classification", "generated_from_trainer", "dataset:bigbench", "base_model:kennethge123/superglue_rte-bert-base-uncased", "base_model:finetune:kennethge123/superglue_rte-bert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-03-27T03:54:11Z
2024-03-27T03:58:52+00:00
8
0
--- base_model: kennethge123/superglue_rte-bert-base-uncased datasets: - bigbench license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: entailed_after_rte-bert-base-uncased results: - task: type: text-classification name: Text Classification dataset: name: bigbench type: bigbench config: entailed_polarity split: validation args: entailed_polarity metrics: - type: accuracy value: 0.5714285714285714 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # entailed_after_rte-bert-base-uncased This model is a fine-tuned version of [kennethge123/superglue_rte-bert-base-uncased](https://huggingface.co/kennethge123/superglue_rte-bert-base-uncased) on the bigbench dataset. It achieves the following results on the evaluation set: - Loss: 0.7322 - Accuracy: 0.5714 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 4 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | No log | 1.0 | 30 | 0.6876 | 0.5714 | | No log | 2.0 | 60 | 0.8029 | 0.5714 | | No log | 3.0 | 90 | 0.7246 | 0.5714 | | No log | 4.0 | 120 | 0.7152 | 0.5714 | | No log | 5.0 | 150 | 0.7887 | 0.5714 | | No log | 6.0 | 180 | 0.7498 | 0.5714 | | No log | 7.0 | 210 | 0.8149 | 0.4286 | | No log | 8.0 | 240 | 0.7055 | 0.5714 | | No log | 9.0 | 270 | 0.7209 | 0.5714 | | No log | 10.0 | 300 | 0.6922 | 0.5714 | | No log | 11.0 | 330 | 0.7186 | 0.5714 | | No log | 12.0 | 360 | 0.6916 | 0.5714 | | No log | 13.0 | 390 | 0.7233 | 0.5714 | | No log | 14.0 | 420 | 0.7109 | 0.5714 | | No log | 15.0 | 450 | 0.7051 | 0.5714 | | No log | 16.0 | 480 | 0.6968 | 0.5714 | | 0.7046 | 17.0 | 510 | 0.7068 | 0.5714 | | 0.7046 | 18.0 | 540 | 0.7319 | 0.5714 | | 0.7046 | 19.0 | 570 | 0.7301 | 0.5714 | | 0.7046 | 20.0 | 600 | 0.7322 | 0.5714 | ### Framework versions - Transformers 4.37.0 - Pytorch 1.13.1+cu117 - Datasets 2.15.0 - Tokenizers 0.15.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # entailed_after_rte-bert-base-uncased This model is a fine-tuned version of [kennethge123/superglue_rte-bert-base-uncased](https://huggingface.co/kennethge123/superglue_rte-bert-base-uncased) on the bigbench dataset. It achieves the following results on the evaluation set: - Loss: 0.7322 - Accuracy: 0.5714 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 4 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | No log | 1.0 | 30 | 0.6876 | 0.5714 | | No log | 2.0 | 60 | 0.8029 | 0.5714 | | No log | 3.0 | 90 | 0.7246 | 0.5714 | | No log | 4.0 | 120 | 0.7152 | 0.5714 | | No log | 5.0 | 150 | 0.7887 | 0.5714 | | No log | 6.0 | 180 | 0.7498 | 0.5714 | | No log | 7.0 | 210 | 0.8149 | 0.4286 | | No log | 8.0 | 240 | 0.7055 | 0.5714 | | No log | 9.0 | 270 | 0.7209 | 0.5714 | | No log | 10.0 | 300 | 0.6922 | 0.5714 | | No log | 11.0 | 330 | 0.7186 | 0.5714 | | No log | 12.0 | 360 | 0.6916 | 0.5714 | | No log | 13.0 | 390 | 0.7233 | 0.5714 | | No log | 14.0 | 420 | 0.7109 | 0.5714 | | No log | 15.0 | 450 | 0.7051 | 0.5714 | | No log | 16.0 | 480 | 0.6968 | 0.5714 | | 0.7046 | 17.0 | 510 | 0.7068 | 0.5714 | | 0.7046 | 18.0 | 540 | 0.7319 | 0.5714 | | 0.7046 | 19.0 | 570 | 0.7301 | 0.5714 | | 0.7046 | 20.0 | 600 | 0.7322 | 0.5714 | ### Framework versions - Transformers 4.37.0 - Pytorch 1.13.1+cu117 - Datasets 2.15.0 - Tokenizers 0.15.2
{"base_model": "kennethge123/superglue_rte-bert-base-uncased", "datasets": ["bigbench"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "entailed_after_rte-bert-base-uncased", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "bigbench", "type": "bigbench", "config": "entailed_polarity", "split": "validation", "args": "entailed_polarity"}, "metrics": [{"type": "accuracy", "value": 0.5714285714285714, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,437
dil99x/SummLlama3.2-3B-Q5_K_M-GGUF
dil99x
summarization
[ "transformers", "gguf", "llama-cpp", "gguf-my-repo", "summarization", "base_model:DISLab/SummLlama3.2-3B", "base_model:quantized:DISLab/SummLlama3.2-3B", "endpoints_compatible", "region:us", "conversational" ]
2024-11-21T03:31:46Z
2024-11-21T03:32:00+00:00
0
0
--- base_model: DISLab/SummLlama3.2-3B library_name: transformers pipeline_tag: summarization tags: - llama-cpp - gguf-my-repo widget: - text: '<|begin_of_text|><|start_header_id|>user<|end_header_id|> Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Please summarize the input documnet. ### Input: The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct. ### Response:<|eot_id|>' --- # dil99x/SummLlama3.2-3B-Q5_K_M-GGUF This model was converted to GGUF format from [`DISLab/SummLlama3.2-3B`](https://huggingface.co/DISLab/SummLlama3.2-3B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/DISLab/SummLlama3.2-3B) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -c 2048 ```
null
Non_BioNLP
# dil99x/SummLlama3.2-3B-Q5_K_M-GGUF This model was converted to GGUF format from [`DISLab/SummLlama3.2-3B`](https://huggingface.co/DISLab/SummLlama3.2-3B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/DISLab/SummLlama3.2-3B) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo dil99x/SummLlama3.2-3B-Q5_K_M-GGUF --hf-file summllama3.2-3b-q5_k_m.gguf -c 2048 ```
{"base_model": "DISLab/SummLlama3.2-3B", "library_name": "transformers", "pipeline_tag": "summarization", "tags": ["llama-cpp", "gguf-my-repo"], "widget": [{"text": "<|begin_of_text|><|start_header_id|>user<|end_header_id|>\nBelow is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\nPlease summarize the input documnet.\n\n### Input:\nThe tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.\n\n### Response:<|eot_id|>"}]}
task
[ "SUMMARIZATION" ]
46,438
SEBIS/code_trans_t5_base_code_documentation_generation_javascript_multitask
SEBIS
summarization
[ "transformers", "pytorch", "jax", "t5", "feature-extraction", "summarization", "text-generation-inference", "endpoints_compatible", "region:us" ]
2022-03-02T23:29:04Z
2021-06-23T04:29:50+00:00
131
0
--- tags: - summarization widget: - text: function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; } --- # CodeTrans model for code documentation generation javascript Pretrained model on programming language javascript using the t5 base model architecture. It was first released in [this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions. ## Model description This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. ## Intended uses & limitations The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better. ### How to use Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline: ```python from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline pipeline = SummarizationPipeline( model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_code_documentation_generation_javascript_multitask"), tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_code_documentation_generation_javascript_multitask", skip_special_tokens=True), device=0 ) tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }" pipeline([tokenized_code]) ``` Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/javascript/base_model.ipynb). ## Training data The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1) ## Training procedure ### Multi-task Pretraining The model was trained on a single TPU Pod V3-8 for 440,000 steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training. ## Evaluation results For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score): Test results : | Language / Model | Python | Java | Go | Php | Ruby | JavaScript | | -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: | | CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 | | CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 | | CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 | | CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 | | CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** | | CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 | | CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 | | CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 | | CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 | | CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 | | CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 | | State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 | > Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
null
Non_BioNLP
# CodeTrans model for code documentation generation javascript Pretrained model on programming language javascript using the t5 base model architecture. It was first released in [this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions. ## Model description This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. ## Intended uses & limitations The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better. ### How to use Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline: ```python from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline pipeline = SummarizationPipeline( model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_code_documentation_generation_javascript_multitask"), tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_code_documentation_generation_javascript_multitask", skip_special_tokens=True), device=0 ) tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }" pipeline([tokenized_code]) ``` Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/javascript/base_model.ipynb). ## Training data The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1) ## Training procedure ### Multi-task Pretraining The model was trained on a single TPU Pod V3-8 for 440,000 steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training. ## Evaluation results For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score): Test results : | Language / Model | Python | Java | Go | Php | Ruby | JavaScript | | -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: | | CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 | | CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 | | CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 | | CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 | | CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** | | CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 | | CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 | | CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 | | CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 | | CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 | | CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 | | State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 | > Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
{"tags": ["summarization"], "widget": [{"text": "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"}]}
task
[ "SUMMARIZATION" ]
46,439
hybrinfox/ukraine-operation_propaganda-detection-FR
hybrinfox
text-classification
[ "transformers", "safetensors", "camembert", "text-classification", "fr", "arxiv:1910.09700", "license:mit", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-01-29T13:10:37Z
2024-03-20T12:56:12+00:00
4
0
--- language: - fr license: mit pipeline_tag: text-classification --- # Model Card for Model hybrinfox/ukraine-invasion_propaganda-detection-FR This model aims at identifying propaganda on the topic of the Ukrainian invasion in press articles. ## Model Details ### Model Description The model is a fine-tuned version of camembert-base (https://huggingface.co/camembert-base) on the Propagandist Pseudo-News dataset (https://github.com/hybrinfox/ppn) - **Owned by:** Airbus Defence and Space - **Developed for:** HYBRINFOX consortium (Airbus Defence and Space - Paris Sciences et Lettres, Ecole Normale Supérieure Ulm, Institut Jean-Nicod - Université de Rennes, Inria, IRISA, Mondeca) - **Funded by :** French National Research Agency (ANR-21-ASIA-0003) - **Model type:** Text classification - **Language(s) (NLP):** fr - **License:** CC BY-NB 4.0 - **Finetuned from model :** camembert-base ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> The model can be used directly to classify press articles written in French about the Ukraine invasion or related topic. The output corresponds to the probability of belonging to each class, 0 for regular press articles and 1 for propagandist article. ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> This model should not be used to categorize news sources as propagandist or not, but can help identify pro-Russian narratives and Russian values. This model is not trained to identify the auhors' intentions and should not be used to make such conclusions. ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> This model has been trained with articles from different sources, but all articles from the propaganda class share the same narrative. Moreover, all articles shared the same topic of the Russio-Ukrainian conflict. The model is not infaillible and shouldn't be use to make critical decisions when judging an article, its authors, or the corresponding news outlet. ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> We recommend that you use this model for research purposes and to always cross its predictions with the informed opinion of other sources before taking any conclusion. ## How to Get Started with the Model Use the code below to get started with the model. ``` # Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hybrinfox/ukraine-invasion_propaganda-detection-FR") # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("hybrinfox/ukraine-invasion_propaganda-detection-FR") model = AutoModelForSequenceClassification.from_pretrained("hybrinfox/ukraine-invasion_propaganda-detection-FR") ``` ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> The model has been trained using the data from the Propagandist Pseudo-News dataset available at https://github.com/hybrinfox/ppn for the positive class. Additional articles on the same topic, but from mainstream sources has been used for the negative class. Please, read the paper for more details. ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Training Hyperparameters - **Training regime:** Batch size: 8 Learning rate: 5e-5 Number of fine-tuning epochs: 3 Optimizer: Adam with default settings Loss function: Binary Cross-Entropy ## Evaluation The model was evaluated during training with the training metrics, as well as with the validation loss ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> The previously described dataset has been split between train/val/test with a 80/10/10 ratio. The reported results are on the test set, after using the training set for training and validation for controling the model learning. #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> The reported metrics are the F1 scores and losses on the three sets. ### Results | Split | Loss | F1 score | |---|---|---| | Train |0.0012|1.0000| | Val |0.0179|0.9973| | Test |0.0796|0.9873| #### Summary ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** T4 - **Hours used:** 0.3 - **Cloud Provider:** GCP - **Compute Region:** europe-west1 - **Carbon Emitted:** 0.01 kg.CO2 eq Thanks to fine-tuning a general foundation model, the environmental impact of training our propaganda detector is negligible, being the equivalent of 40 meters traveled by an internal combustion engine car. The low-carbon energy used in the compute region also helped to reduce the environmental impact of the training. ## Citation <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> Géraud Faye, Benjamin Icard, Morgane Casanova, Julien Chanson, François Maine, François Bancilhon, Guillaume Gadek, Guillaume Gravier, and Paul Égré. 2024. Exposing propaganda: an analysis of stylistic cues comparing human annotations and machine classification. In Proceedings of the Third Workshop on Understanding Implicit and Underspecified Language, pages 62–72, Malta. Association for Computational Linguistics. **BibTeX:** ``` @inproceedings{faye-etal-2024-exposing, title = "Exposing propaganda: an analysis of stylistic cues comparing human annotations and machine classification", author = "Faye, G{\'e}raud and Icard, Benjamin and Casanova, Morgane and Chanson, Julien and Maine, Fran{\c{c}}ois and Bancilhon, Fran{\c{c}}ois and Gadek, Guillaume and Gravier, Guillaume and {\'E}gr{\'e}, Paul", editor = "Pyatkin, Valentina and Fried, Daniel and Stengel-Eskin, Elias and Stengel-Eskin, Elias and Liu, Alisa and Pezzelle, Sandro", booktitle = "Proceedings of the Third Workshop on Understanding Implicit and Underspecified Language", month = mar, year = "2024", address = "Malta", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2024.unimplicit-1.6", pages = "62--72", } ``` ## Model Card Authors HYBRINFOX consortium ## Model Card Contact [email protected]
null
Non_BioNLP
# Model Card for Model hybrinfox/ukraine-invasion_propaganda-detection-FR This model aims at identifying propaganda on the topic of the Ukrainian invasion in press articles. ## Model Details ### Model Description The model is a fine-tuned version of camembert-base (https://huggingface.co/camembert-base) on the Propagandist Pseudo-News dataset (https://github.com/hybrinfox/ppn) - **Owned by:** Airbus Defence and Space - **Developed for:** HYBRINFOX consortium (Airbus Defence and Space - Paris Sciences et Lettres, Ecole Normale Supérieure Ulm, Institut Jean-Nicod - Université de Rennes, Inria, IRISA, Mondeca) - **Funded by :** French National Research Agency (ANR-21-ASIA-0003) - **Model type:** Text classification - **Language(s) (NLP):** fr - **License:** CC BY-NB 4.0 - **Finetuned from model :** camembert-base ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> The model can be used directly to classify press articles written in French about the Ukraine invasion or related topic. The output corresponds to the probability of belonging to each class, 0 for regular press articles and 1 for propagandist article. ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> This model should not be used to categorize news sources as propagandist or not, but can help identify pro-Russian narratives and Russian values. This model is not trained to identify the auhors' intentions and should not be used to make such conclusions. ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> This model has been trained with articles from different sources, but all articles from the propaganda class share the same narrative. Moreover, all articles shared the same topic of the Russio-Ukrainian conflict. The model is not infaillible and shouldn't be use to make critical decisions when judging an article, its authors, or the corresponding news outlet. ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> We recommend that you use this model for research purposes and to always cross its predictions with the informed opinion of other sources before taking any conclusion. ## How to Get Started with the Model Use the code below to get started with the model. ``` # Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hybrinfox/ukraine-invasion_propaganda-detection-FR") # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("hybrinfox/ukraine-invasion_propaganda-detection-FR") model = AutoModelForSequenceClassification.from_pretrained("hybrinfox/ukraine-invasion_propaganda-detection-FR") ``` ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> The model has been trained using the data from the Propagandist Pseudo-News dataset available at https://github.com/hybrinfox/ppn for the positive class. Additional articles on the same topic, but from mainstream sources has been used for the negative class. Please, read the paper for more details. ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Training Hyperparameters - **Training regime:** Batch size: 8 Learning rate: 5e-5 Number of fine-tuning epochs: 3 Optimizer: Adam with default settings Loss function: Binary Cross-Entropy ## Evaluation The model was evaluated during training with the training metrics, as well as with the validation loss ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> The previously described dataset has been split between train/val/test with a 80/10/10 ratio. The reported results are on the test set, after using the training set for training and validation for controling the model learning. #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> The reported metrics are the F1 scores and losses on the three sets. ### Results | Split | Loss | F1 score | |---|---|---| | Train |0.0012|1.0000| | Val |0.0179|0.9973| | Test |0.0796|0.9873| #### Summary ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** T4 - **Hours used:** 0.3 - **Cloud Provider:** GCP - **Compute Region:** europe-west1 - **Carbon Emitted:** 0.01 kg.CO2 eq Thanks to fine-tuning a general foundation model, the environmental impact of training our propaganda detector is negligible, being the equivalent of 40 meters traveled by an internal combustion engine car. The low-carbon energy used in the compute region also helped to reduce the environmental impact of the training. ## Citation <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> Géraud Faye, Benjamin Icard, Morgane Casanova, Julien Chanson, François Maine, François Bancilhon, Guillaume Gadek, Guillaume Gravier, and Paul Égré. 2024. Exposing propaganda: an analysis of stylistic cues comparing human annotations and machine classification. In Proceedings of the Third Workshop on Understanding Implicit and Underspecified Language, pages 62–72, Malta. Association for Computational Linguistics. **BibTeX:** ``` @inproceedings{faye-etal-2024-exposing, title = "Exposing propaganda: an analysis of stylistic cues comparing human annotations and machine classification", author = "Faye, G{\'e}raud and Icard, Benjamin and Casanova, Morgane and Chanson, Julien and Maine, Fran{\c{c}}ois and Bancilhon, Fran{\c{c}}ois and Gadek, Guillaume and Gravier, Guillaume and {\'E}gr{\'e}, Paul", editor = "Pyatkin, Valentina and Fried, Daniel and Stengel-Eskin, Elias and Stengel-Eskin, Elias and Liu, Alisa and Pezzelle, Sandro", booktitle = "Proceedings of the Third Workshop on Understanding Implicit and Underspecified Language", month = mar, year = "2024", address = "Malta", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2024.unimplicit-1.6", pages = "62--72", } ``` ## Model Card Authors HYBRINFOX consortium ## Model Card Contact [email protected]
{"language": ["fr"], "license": "mit", "pipeline_tag": "text-classification"}
task
[ "TEXT_CLASSIFICATION" ]
46,440
amanpreet7/llama-2-7b-uj1
amanpreet7
null
[ "pytorch", "llama", "region:us" ]
2024-11-14T06:04:28Z
2024-11-19T07:45:33+00:00
7
0
--- {} --- # [Model Name] - Model Card ## Model Description This is a [task type, e.g., text-generation, question-answering, etc.] model fine-tuned for [specific task or domain, e.g., answering questions about university admission offices]. It has been trained on [brief description of training data], and it can generate answers to questions based on the provided context or prompt. ### Model Architecture This model is based on [base model name, e.g., GPT-3, T5, BERT] architecture, and has been fine-tuned using [describe fine-tuning method, e.g., LoRA, QLoRA, etc.]. ### Intended Use This model is designed to be used for the following tasks: - [text-generation, question-answering, summarization, etc.] - [other use cases specific to your model] ### Example Use ```python from transformers import AutoModelForQuestionAnswering, AutoTokenizer # Load model and tokenizer from local directory model_path = "./path_to_your_model_directory" model = AutoModelForQuestionAnswering.from_pretrained(model_path) tokenizer = AutoTokenizer.from_pretrained(model_path) # Example Question and Context question = "What are the contact details for the JAC-2024 Admission Office?" context = "The contact details for the JAC-2024 Admission Office at University Institute of Engineering & Technology (UIET) are as follows: Address: South Campus, Panjab University, Sector-25, Chandigarh-160014 Phone: 0172-2541242, 2534995." # Tokenize input inputs = tokenizer(question, context, return_tensors="pt") # Get the model's answer outputs = model(**inputs) # Get start and end positions for answer answer_start = outputs.start_logits.argmax() answer_end = outputs.end_logits.argmax() # Decode the answer answer = tokenizer.convert_tokens_to_string(tokenizer.convert_ids_to_tokens(inputs.input_ids[0][answer_start:answer_end+1])) print("Answer:", answer) # Output: The contact details for the JAC-2024 Admission Office at University Institute of Engineering & Technology (UIET) are as follows: Address: South Campus, Panjab University, Sector-25, Chandigarh-160014 Phone: 0172-2541242, 2534995.
null
Non_BioNLP
# [Model Name] - Model Card ## Model Description This is a [task type, e.g., text-generation, question-answering, etc.] model fine-tuned for [specific task or domain, e.g., answering questions about university admission offices]. It has been trained on [brief description of training data], and it can generate answers to questions based on the provided context or prompt. ### Model Architecture This model is based on [base model name, e.g., GPT-3, T5, BERT] architecture, and has been fine-tuned using [describe fine-tuning method, e.g., LoRA, QLoRA, etc.]. ### Intended Use This model is designed to be used for the following tasks: - [text-generation, question-answering, summarization, etc.] - [other use cases specific to your model] ### Example Use ```python from transformers import AutoModelForQuestionAnswering, AutoTokenizer # Load model and tokenizer from local directory model_path = "./path_to_your_model_directory" model = AutoModelForQuestionAnswering.from_pretrained(model_path) tokenizer = AutoTokenizer.from_pretrained(model_path) # Example Question and Context question = "What are the contact details for the JAC-2024 Admission Office?" context = "The contact details for the JAC-2024 Admission Office at University Institute of Engineering & Technology (UIET) are as follows: Address: South Campus, Panjab University, Sector-25, Chandigarh-160014 Phone: 0172-2541242, 2534995." # Tokenize input inputs = tokenizer(question, context, return_tensors="pt") # Get the model's answer outputs = model(**inputs) # Get start and end positions for answer answer_start = outputs.start_logits.argmax() answer_end = outputs.end_logits.argmax() # Decode the answer answer = tokenizer.convert_tokens_to_string(tokenizer.convert_ids_to_tokens(inputs.input_ids[0][answer_start:answer_end+1])) print("Answer:", answer) # Output: The contact details for the JAC-2024 Admission Office at University Institute of Engineering & Technology (UIET) are as follows: Address: South Campus, Panjab University, Sector-25, Chandigarh-160014 Phone: 0172-2541242, 2534995.
{}
task
[ "SUMMARIZATION" ]
46,441
ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B
ZeroXClem
text-generation
[ "transformers", "safetensors", "qwen2", "text-generation", "merge", "mergekit", "lazymergekit", "Locutusque/StockQwen-2.5-7B", "allknowingroger/QwenSlerp8-7B", "conversational", "en", "zh", "base_model:Locutusque/StockQwen-2.5-7B", "base_model:merge:Locutusque/StockQwen-2.5-7B", "base_model:allknowingroger/QwenSlerp8-7B", "base_model:merge:allknowingroger/QwenSlerp8-7B", "license:apache-2.0", "model-index", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2024-11-13T17:35:48Z
2024-11-24T01:22:20+00:00
31
2
--- base_model: - allknowingroger/QwenSlerp8-7B - Locutusque/StockQwen-2.5-7B language: - en - zh library_name: transformers license: apache-2.0 tags: - merge - mergekit - lazymergekit - Locutusque/StockQwen-2.5-7B - allknowingroger/QwenSlerp8-7B model-index: - name: Qwen-2.5-Aether-SlerpFusion-7B results: - task: type: text-generation name: Text Generation dataset: name: IFEval (0-Shot) type: HuggingFaceH4/ifeval args: num_few_shot: 0 metrics: - type: inst_level_strict_acc and prompt_level_strict_acc value: 62.62 name: strict accuracy source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: BBH (3-Shot) type: BBH args: num_few_shot: 3 metrics: - type: acc_norm value: 36.01 name: normalized accuracy source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MATH Lvl 5 (4-Shot) type: hendrycks/competition_math args: num_few_shot: 4 metrics: - type: exact_match value: 24.17 name: exact match source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: GPQA (0-shot) type: Idavidrein/gpqa args: num_few_shot: 0 metrics: - type: acc_norm value: 6.49 name: acc_norm source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MuSR (0-shot) type: TAUR-Lab/MuSR args: num_few_shot: 0 metrics: - type: acc_norm value: 11.29 name: acc_norm source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MMLU-PRO (5-shot) type: TIGER-Lab/MMLU-Pro config: main split: test args: num_few_shot: 5 metrics: - type: acc value: 36.96 name: accuracy source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B name: Open LLM Leaderboard --- # ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B **Qwen-2.5-Aether-SlerpFusion-7B** is a sophisticated model merge that combines the strengths of multiple pre-trained language models using the powerful [mergekit](https://github.com/ZeroXClem/mergekit) framework. This fusion leverages spherical linear interpolation (SLERP) to seamlessly blend architectural layers, resulting in a model that benefits from enhanced performance and versatility. ## 🚀 Merged Models This model merge incorporates the following: - [**Locutusque/StockQwen-2.5-7B**](https://huggingface.co/Locutusque/StockQwen-2.5-7B): Serves as the foundational model, renowned for its robust language understanding and generation capabilities. - [**allknowingroger/QwenSlerp8-7B**](https://huggingface.co/allknowingroger/QwenSlerp8-7B): Contributes advanced task-specific fine-tuning, enhancing the model's adaptability across various applications. ## 🧩 Merge Configuration The configuration below outlines how the models are merged using **spherical linear interpolation (SLERP)**. This method ensures smooth transitions between the layers of both models, facilitating an optimal blend of their unique attributes: ```yaml # ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B Merge Configuration slices: - sources: - model: Locutusque/StockQwen-2.5-7B layer_range: [0, 28] - model: allknowingroger/QwenSlerp8-7B layer_range: [0, 28] merge_method: slerp base_model: Locutusque/StockQwen-2.5-7B parameters: t: - filter: self_attn value: [0, 0.5, 0.3, 0.7, 1] - filter: mlp value: [1, 0.5, 0.7, 0.3, 0] - value: 0.5 dtype: bfloat16 ``` ### 🔑 Key Parameters - **Self-Attention Filtering** (`self_attn`): Controls the blending extent across self-attention layers, allowing for a dynamic mix between the two source models. - **MLP Filtering** (`mlp`): Adjusts the balance within the Multi-Layer Perceptrons, fine-tuning the model’s neural network layers for optimal performance. - **Global Weight (`t.value`)**: Sets a general interpolation factor for all unspecified layers, ensuring an equal contribution from both models. - **Data Type (`dtype`)**: Utilizes `bfloat16` to maintain computational efficiency while preserving high precision. ### 🗣️ Inference Below is an example of how to load and use the model for text generation: ```python from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline import torch # Define the model name model_name = "ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B" # Load the tokenizer tokenizer = AutoTokenizer.from_pretrained(model_name) # Load the model model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype=torch.bfloat16, device_map="auto" ) # Initialize the pipeline text_generator = pipeline( "text-generation", model=model, tokenizer=tokenizer, torch_dtype=torch.bfloat16, device_map="auto" ) # Define the input prompt prompt = "Explain the significance of artificial intelligence in modern healthcare." # Generate the output outputs = text_generator( prompt, max_new_tokens=150, do_sample=True, temperature=0.7, top_k=50, top_p=0.95 ) # Print the generated text print(outputs[0]["generated_text"]) ``` ## 🎯 Use Case & Applications **Qwen-2.5-Aether-SlerpFusion-7B** excels in scenarios that require both robust language understanding and specialized task performance. This merged model is ideal for: - **Advanced Text Generation and Comprehension**: Crafting coherent, contextually accurate, and nuanced text for applications like content creation, summarization, and translation. - **Domain-Specific Tasks**: Enhancing performance in specialized areas such as legal document analysis, medical information processing, and technical support. - **Interactive AI Systems**: Powering conversational agents and chatbots that require both general language capabilities and task-specific expertise. ## 📜 License This model is open-sourced under the **Apache-2.0 License**. ## 💡 Tags - `merge` - `mergekit` - `slerp` - `Qwen` - `Locutusque/StockQwen-2.5-7B` - `allknowingroger/QwenSlerp8-7B` --- # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_ZeroXClem__Qwen-2.5-Aether-SlerpFusion-7B) | Metric |Value| |-------------------|----:| |Avg. |29.59| |IFEval (0-Shot) |62.62| |BBH (3-Shot) |36.01| |MATH Lvl 5 (4-Shot)|24.17| |GPQA (0-shot) | 6.49| |MuSR (0-shot) |11.29| |MMLU-PRO (5-shot) |36.96|
null
Non_BioNLP
# ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B **Qwen-2.5-Aether-SlerpFusion-7B** is a sophisticated model merge that combines the strengths of multiple pre-trained language models using the powerful [mergekit](https://github.com/ZeroXClem/mergekit) framework. This fusion leverages spherical linear interpolation (SLERP) to seamlessly blend architectural layers, resulting in a model that benefits from enhanced performance and versatility. ## 🚀 Merged Models This model merge incorporates the following: - [**Locutusque/StockQwen-2.5-7B**](https://huggingface.co/Locutusque/StockQwen-2.5-7B): Serves as the foundational model, renowned for its robust language understanding and generation capabilities. - [**allknowingroger/QwenSlerp8-7B**](https://huggingface.co/allknowingroger/QwenSlerp8-7B): Contributes advanced task-specific fine-tuning, enhancing the model's adaptability across various applications. ## 🧩 Merge Configuration The configuration below outlines how the models are merged using **spherical linear interpolation (SLERP)**. This method ensures smooth transitions between the layers of both models, facilitating an optimal blend of their unique attributes: ```yaml # ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B Merge Configuration slices: - sources: - model: Locutusque/StockQwen-2.5-7B layer_range: [0, 28] - model: allknowingroger/QwenSlerp8-7B layer_range: [0, 28] merge_method: slerp base_model: Locutusque/StockQwen-2.5-7B parameters: t: - filter: self_attn value: [0, 0.5, 0.3, 0.7, 1] - filter: mlp value: [1, 0.5, 0.7, 0.3, 0] - value: 0.5 dtype: bfloat16 ``` ### 🔑 Key Parameters - **Self-Attention Filtering** (`self_attn`): Controls the blending extent across self-attention layers, allowing for a dynamic mix between the two source models. - **MLP Filtering** (`mlp`): Adjusts the balance within the Multi-Layer Perceptrons, fine-tuning the model’s neural network layers for optimal performance. - **Global Weight (`t.value`)**: Sets a general interpolation factor for all unspecified layers, ensuring an equal contribution from both models. - **Data Type (`dtype`)**: Utilizes `bfloat16` to maintain computational efficiency while preserving high precision. ### 🗣️ Inference Below is an example of how to load and use the model for text generation: ```python from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline import torch # Define the model name model_name = "ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B" # Load the tokenizer tokenizer = AutoTokenizer.from_pretrained(model_name) # Load the model model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype=torch.bfloat16, device_map="auto" ) # Initialize the pipeline text_generator = pipeline( "text-generation", model=model, tokenizer=tokenizer, torch_dtype=torch.bfloat16, device_map="auto" ) # Define the input prompt prompt = "Explain the significance of artificial intelligence in modern healthcare." # Generate the output outputs = text_generator( prompt, max_new_tokens=150, do_sample=True, temperature=0.7, top_k=50, top_p=0.95 ) # Print the generated text print(outputs[0]["generated_text"]) ``` ## 🎯 Use Case & Applications **Qwen-2.5-Aether-SlerpFusion-7B** excels in scenarios that require both robust language understanding and specialized task performance. This merged model is ideal for: - **Advanced Text Generation and Comprehension**: Crafting coherent, contextually accurate, and nuanced text for applications like content creation, summarization, and translation. - **Domain-Specific Tasks**: Enhancing performance in specialized areas such as legal document analysis, medical information processing, and technical support. - **Interactive AI Systems**: Powering conversational agents and chatbots that require both general language capabilities and task-specific expertise. ## 📜 License This model is open-sourced under the **Apache-2.0 License**. ## 💡 Tags - `merge` - `mergekit` - `slerp` - `Qwen` - `Locutusque/StockQwen-2.5-7B` - `allknowingroger/QwenSlerp8-7B` --- # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_ZeroXClem__Qwen-2.5-Aether-SlerpFusion-7B) | Metric |Value| |-------------------|----:| |Avg. |29.59| |IFEval (0-Shot) |62.62| |BBH (3-Shot) |36.01| |MATH Lvl 5 (4-Shot)|24.17| |GPQA (0-shot) | 6.49| |MuSR (0-shot) |11.29| |MMLU-PRO (5-shot) |36.96|
{"base_model": ["allknowingroger/QwenSlerp8-7B", "Locutusque/StockQwen-2.5-7B"], "language": ["en", "zh"], "library_name": "transformers", "license": "apache-2.0", "tags": ["merge", "mergekit", "lazymergekit", "Locutusque/StockQwen-2.5-7B", "allknowingroger/QwenSlerp8-7B"], "model-index": [{"name": "Qwen-2.5-Aether-SlerpFusion-7B", "results": [{"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "IFEval (0-Shot)", "type": "HuggingFaceH4/ifeval", "args": {"num_few_shot": 0}}, "metrics": [{"type": "inst_level_strict_acc and prompt_level_strict_acc", "value": 62.62, "name": "strict accuracy"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "BBH (3-Shot)", "type": "BBH", "args": {"num_few_shot": 3}}, "metrics": [{"type": "acc_norm", "value": 36.01, "name": "normalized accuracy"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "MATH Lvl 5 (4-Shot)", "type": "hendrycks/competition_math", "args": {"num_few_shot": 4}}, "metrics": [{"type": "exact_match", "value": 24.17, "name": "exact match"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "GPQA (0-shot)", "type": "Idavidrein/gpqa", "args": {"num_few_shot": 0}}, "metrics": [{"type": "acc_norm", "value": 6.49, "name": "acc_norm"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "MuSR (0-shot)", "type": "TAUR-Lab/MuSR", "args": {"num_few_shot": 0}}, "metrics": [{"type": "acc_norm", "value": 11.29, "name": "acc_norm"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "MMLU-PRO (5-shot)", "type": "TIGER-Lab/MMLU-Pro", "config": "main", "split": "test", "args": {"num_few_shot": 5}}, "metrics": [{"type": "acc", "value": 36.96, "name": "accuracy"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ZeroXClem/Qwen-2.5-Aether-SlerpFusion-7B", "name": "Open LLM Leaderboard"}}]}]}
task
[ "TRANSLATION", "SUMMARIZATION" ]
46,442
gangyeolkim/kobart-korean-summarizer-v2
gangyeolkim
summarization
[ "transformers", "safetensors", "bart", "text2text-generation", "summarization", "license:cc-by-nc-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-11-23T23:06:08Z
2023-12-04T23:19:38+00:00
776
0
--- license: cc-by-nc-4.0 pipeline_tag: summarization --- ### 베이스 모델 [gogamza/kobart-base-v2](https://huggingface.co/gogamza/kobart-base-v2)을 베이스로 하였고, aihub에 있는 요약 데이터를 사용하여 학습을 진행하였습니다. ### 사용 데이터셋 (683,335건) [추상 요약 사실성 검증 데이터](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=71620) [요약문 및 레포트 생성 데이터](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=582) [문서요약 텍스트](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=97) [도서자료 요약](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=9) ### 학습 Nvidia A100 x 1을 사용하였으며, 3epoch 학습에 17h이 소요되었습니다. ### 사용 예제 ```python from transformers import pipeline # GPU 사용 케이스 # pipe = pipeline("summarization", model="gangyeolkim/kobart-korean-summarizer-v2", device=0) # GPU 미사용 케이스 pipe = pipeline("summarization", model="gangyeolkim/kobart-korean-summarizer-v2") original_text = """ (서울=연합뉴스) 특별취재팀 = 연합뉴스TV에 대한 적대적 인수·합병(M&A)을 시도하는 을지재단이 사실상 박준영 회장 일가의 '족벌경영' 체제 속에 사익을 실현하는 수단으로 활용된다는 지적이 나온다. 을지재단은 산하에 병원, 대학 등 여러 법인을 두고 있지만, 박준영 회장과 아내인 홍성희 을지대 총장이 요직을 주고받으면서 사실상 함께 경영하는 체제다. 비영리법인으로 각종 세제 혜택을 받는 을지재단의 '족벌경영' 폐해는 여러 사례를 통해 여실히 드러나고 있다. 부부가 비상근이사이면서도 재단에서 매달 1천만원씩 '셀프급여'를 받은 것, 박 회장이 '재단 소속 병원'에서 마약성 진통제를 3천회 이상 처방받은 것, 개인 소유의 관계회사를 만들어 병원과 거래에서 생기는 수익을 챙긴 것 등등. 을지재단은 연합뉴스TV의 최대주주 지위를 노리면서 그 운영 방침으로 '소유와 경영의 분리', '공정성 및 공익성 실현'을 내세웠다. 하지만 박 회장 부부의 이익을 위해 철저하게 재단을 '사유화'한 행태가 여러 사례를 통해 드러난 상황에서, 이들의 공영방송 지배를 우려하는 목소리는 갈수록 커지고 있다. """ summarized = pipe(original_text) print(summarized[0]["summary_text"]) # 을지재단이 박 회장 일가의 '족벌경영' 체제 속에 사익을 실현하는 수단으로 활용된다는 지적이 나오고 있다. ```
null
Non_BioNLP
### 베이스 모델 [gogamza/kobart-base-v2](https://huggingface.co/gogamza/kobart-base-v2)을 베이스로 하였고, aihub에 있는 요약 데이터를 사용하여 학습을 진행하였습니다. ### 사용 데이터셋 (683,335건) [추상 요약 사실성 검증 데이터](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=71620) [요약문 및 레포트 생성 데이터](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=582) [문서요약 텍스트](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=97) [도서자료 요약](https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=9) ### 학습 Nvidia A100 x 1을 사용하였으며, 3epoch 학습에 17h이 소요되었습니다. ### 사용 예제 ```python from transformers import pipeline # GPU 사용 케이스 # pipe = pipeline("summarization", model="gangyeolkim/kobart-korean-summarizer-v2", device=0) # GPU 미사용 케이스 pipe = pipeline("summarization", model="gangyeolkim/kobart-korean-summarizer-v2") original_text = """ (서울=연합뉴스) 특별취재팀 = 연합뉴스TV에 대한 적대적 인수·합병(M&A)을 시도하는 을지재단이 사실상 박준영 회장 일가의 '족벌경영' 체제 속에 사익을 실현하는 수단으로 활용된다는 지적이 나온다. 을지재단은 산하에 병원, 대학 등 여러 법인을 두고 있지만, 박준영 회장과 아내인 홍성희 을지대 총장이 요직을 주고받으면서 사실상 함께 경영하는 체제다. 비영리법인으로 각종 세제 혜택을 받는 을지재단의 '족벌경영' 폐해는 여러 사례를 통해 여실히 드러나고 있다. 부부가 비상근이사이면서도 재단에서 매달 1천만원씩 '셀프급여'를 받은 것, 박 회장이 '재단 소속 병원'에서 마약성 진통제를 3천회 이상 처방받은 것, 개인 소유의 관계회사를 만들어 병원과 거래에서 생기는 수익을 챙긴 것 등등. 을지재단은 연합뉴스TV의 최대주주 지위를 노리면서 그 운영 방침으로 '소유와 경영의 분리', '공정성 및 공익성 실현'을 내세웠다. 하지만 박 회장 부부의 이익을 위해 철저하게 재단을 '사유화'한 행태가 여러 사례를 통해 드러난 상황에서, 이들의 공영방송 지배를 우려하는 목소리는 갈수록 커지고 있다. """ summarized = pipe(original_text) print(summarized[0]["summary_text"]) # 을지재단이 박 회장 일가의 '족벌경영' 체제 속에 사익을 실현하는 수단으로 활용된다는 지적이 나오고 있다. ```
{"license": "cc-by-nc-4.0", "pipeline_tag": "summarization"}
task
[ "SUMMARIZATION" ]
46,443
JUNYIDA/my_awesome_model
JUNYIDA
text-classification
[ "transformers", "pytorch", "tensorboard", "bert", "text-classification", "generated_from_trainer", "dataset:rotten_tomatoes", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-06-22T15:26:32Z
2023-06-22T16:56:45+00:00
10
0
--- datasets: - rotten_tomatoes license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: my_awesome_model results: - task: type: text-classification name: Text Classification dataset: name: rotten_tomatoes type: rotten_tomatoes config: default split: test args: default metrics: - type: accuracy value: 0.8555347091932458 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # my_awesome_model This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the rotten_tomatoes dataset. It achieves the following results on the evaluation set: - Loss: 0.4633 - Accuracy: 0.8555 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 0.3945 | 1.0 | 534 | 0.3473 | 0.8527 | | 0.2174 | 2.0 | 1068 | 0.4633 | 0.8555 | ### Framework versions - Transformers 4.30.2 - Pytorch 2.0.1+cu118 - Datasets 2.13.0 - Tokenizers 0.13.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # my_awesome_model This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the rotten_tomatoes dataset. It achieves the following results on the evaluation set: - Loss: 0.4633 - Accuracy: 0.8555 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 0.3945 | 1.0 | 534 | 0.3473 | 0.8527 | | 0.2174 | 2.0 | 1068 | 0.4633 | 0.8555 | ### Framework versions - Transformers 4.30.2 - Pytorch 2.0.1+cu118 - Datasets 2.13.0 - Tokenizers 0.13.3
{"datasets": ["rotten_tomatoes"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "my_awesome_model", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "rotten_tomatoes", "type": "rotten_tomatoes", "config": "default", "split": "test", "args": "default"}, "metrics": [{"type": "accuracy", "value": 0.8555347091932458, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,445
kabelomalapane/Tn-En_update
kabelomalapane
translation
[ "transformers", "pytorch", "tensorboard", "marian", "text2text-generation", "translation", "generated_from_trainer", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-08-11T10:29:51Z
2022-08-11T15:34:58+00:00
0
0
--- license: apache-2.0 metrics: - bleu tags: - translation - generated_from_trainer model-index: - name: Tn-En_update results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # Tn-En_update This model is a fine-tuned version of [Helsinki-NLP/opus-mt-tn-en](https://huggingface.co/Helsinki-NLP/opus-mt-tn-en) on the None dataset. It achieves the following results on the evaluation set: - Loss: 1.2371 - Bleu: 41.6029 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 ### Training results | Training Loss | Epoch | Step | Bleu | Validation Loss | |:-------------:|:-----:|:-----:|:-------:|:---------------:| | 2.1976 | 1.0 | 7554 | 26.8684 | 2.1137 | | 1.871 | 2.0 | 15108 | 30.6829 | 1.8089 | | 1.7084 | 3.0 | 22662 | 33.3106 | 1.6236 | | 1.5871 | 4.0 | 30216 | 36.3656 | 1.5039 | | 1.4967 | 5.0 | 37770 | 37.2840 | 1.4182 | | 1.429 | 6.0 | 45324 | 38.9794 | 1.3521 | | 1.3629 | 7.0 | 52878 | 40.2757 | 1.2992 | | 1.3444 | 8.0 | 60432 | 40.9979 | 1.2632 | | 1.3069 | 9.0 | 67986 | 41.3006 | 1.2438 | | 1.2745 | 10.0 | 75540 | 41.5511 | 1.2371 | ### Framework versions - Transformers 4.21.1 - Pytorch 1.12.0+cu113 - Datasets 2.4.0 - Tokenizers 0.12.1
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # Tn-En_update This model is a fine-tuned version of [Helsinki-NLP/opus-mt-tn-en](https://huggingface.co/Helsinki-NLP/opus-mt-tn-en) on the None dataset. It achieves the following results on the evaluation set: - Loss: 1.2371 - Bleu: 41.6029 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 ### Training results | Training Loss | Epoch | Step | Bleu | Validation Loss | |:-------------:|:-----:|:-----:|:-------:|:---------------:| | 2.1976 | 1.0 | 7554 | 26.8684 | 2.1137 | | 1.871 | 2.0 | 15108 | 30.6829 | 1.8089 | | 1.7084 | 3.0 | 22662 | 33.3106 | 1.6236 | | 1.5871 | 4.0 | 30216 | 36.3656 | 1.5039 | | 1.4967 | 5.0 | 37770 | 37.2840 | 1.4182 | | 1.429 | 6.0 | 45324 | 38.9794 | 1.3521 | | 1.3629 | 7.0 | 52878 | 40.2757 | 1.2992 | | 1.3444 | 8.0 | 60432 | 40.9979 | 1.2632 | | 1.3069 | 9.0 | 67986 | 41.3006 | 1.2438 | | 1.2745 | 10.0 | 75540 | 41.5511 | 1.2371 | ### Framework versions - Transformers 4.21.1 - Pytorch 1.12.0+cu113 - Datasets 2.4.0 - Tokenizers 0.12.1
{"license": "apache-2.0", "metrics": ["bleu"], "tags": ["translation", "generated_from_trainer"], "model-index": [{"name": "Tn-En_update", "results": []}]}
task
[ "TRANSLATION" ]
46,446
Mohsin651/distilbert-base-uncased-finetuned-emotion
Mohsin651
text-classification
[ "transformers", "tensorboard", "safetensors", "distilbert", "text-classification", "generated_from_trainer", "dataset:emotion", "base_model:distilbert/distilbert-base-uncased", "base_model:finetune:distilbert/distilbert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-11-30T16:53:05Z
2023-12-01T03:57:18+00:00
103
0
--- base_model: distilbert-base-uncased datasets: - emotion license: apache-2.0 metrics: - accuracy - f1 tags: - generated_from_trainer model-index: - name: distilbert-base-uncased-finetuned-emotion results: - task: type: text-classification name: Text Classification dataset: name: emotion type: emotion config: split split: validation args: split metrics: - type: accuracy value: 0.929 name: Accuracy - type: f1 value: 0.9294368624155818 name: F1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-emotion This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.1783 - Accuracy: 0.929 - F1: 0.9294 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:| | 0.6231 | 1.0 | 500 | 0.2236 | 0.923 | 0.9229 | | 0.175 | 2.0 | 1000 | 0.1783 | 0.929 | 0.9294 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu118 - Datasets 2.15.0 - Tokenizers 0.15.0
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-emotion This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.1783 - Accuracy: 0.929 - F1: 0.9294 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:| | 0.6231 | 1.0 | 500 | 0.2236 | 0.923 | 0.9229 | | 0.175 | 2.0 | 1000 | 0.1783 | 0.929 | 0.9294 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu118 - Datasets 2.15.0 - Tokenizers 0.15.0
{"base_model": "distilbert-base-uncased", "datasets": ["emotion"], "license": "apache-2.0", "metrics": ["accuracy", "f1"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert-base-uncased-finetuned-emotion", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "emotion", "type": "emotion", "config": "split", "split": "validation", "args": "split"}, "metrics": [{"type": "accuracy", "value": 0.929, "name": "Accuracy"}, {"type": "f1", "value": 0.9294368624155818, "name": "F1"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,447
kno10/ende-chat-0.0.7
kno10
text-generation
[ "transformers", "safetensors", "mistral", "text-generation", "conversational", "en", "de", "dataset:FreedomIntelligence/sharegpt-deutsch", "dataset:mayflowergmbh/oasst_de", "dataset:mayflowergmbh/dolly_15k_de", "dataset:mayflowergmbh/openschnabeltier_de", "dataset:mayflowergmbh/ultrachat_de", "dataset:WizardLM/WizardLM_evol_instruct_V2_196k", "dataset:mayflowergmbh/evol_instruct_de", "dataset:mayflowergmbh/alpaca-gpt4_de", "dataset:mayflowergmbh/dolphin_de", "dataset:mayflowergmbh/airoboros_de", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2024-07-30T20:27:09Z
2024-07-30T20:39:36+00:00
7
0
--- datasets: - FreedomIntelligence/sharegpt-deutsch - mayflowergmbh/oasst_de - mayflowergmbh/dolly_15k_de - mayflowergmbh/openschnabeltier_de - mayflowergmbh/ultrachat_de - WizardLM/WizardLM_evol_instruct_V2_196k - mayflowergmbh/evol_instruct_de - mayflowergmbh/alpaca-gpt4_de - mayflowergmbh/dolphin_de - mayflowergmbh/airoboros_de language: - en - de library_name: transformers license: apache-2.0 pipeline-tag: text-generation model-index: - name: ende-chat-0.0.7 results: [] --- # Model Card for EnDe-chat-0.0.7 Preliminary LoRA finetune of Mistral-7B for German and English quality text. This version has an **extended tokenizer**, to make the model able to handle longer input. This is an experiment to improve the German capabilities of Mistral with continued finetuning. The finetuning also includes English data, in order to retain the English capabilities, to allow the model to be used for translation and for answering German questions on English documents and vice versa. Unfortunately, the compute available for this experiment (2xV100) was not at all sufficient for the amount of training data we would have liked to include. After continued pretraining, this model has received instruction finetuning. # Table of Contents - [Model Details](#model-details) - [Model Description](#model-description) - [Uses](#uses) - [Out-of-Scope Use](#out-of-scope-use) - [Bias, Risks, and Limitations](#bias-risks-and-limitations) - [Recommendations](#recommendations) - [Training Details](#training-details) - [Training Data](#training-data) - [Training Procedure](#training-procedure) - [Evaluation](#evaluation) - [Examples](#examples) # Model Details ## Model Description LoRA finetune of Mistral-7B for German and English quality text. - **Developed by:** Erich Schubert - **Model type:** Language model - **Language(s) (NLP):** deu, eng - **License:** apache-2.0 - **Parent Model:** mistralai/Mistral-7B-v0.1 - **Resources for more information:** n/a # Uses Model finetuned for chat in German and English. ## Out-of-Scope Use The model has not received alignment or instruction finetuning, this is intended as a chat foundation model. # Bias, Risks, and Limitations Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. ## Recommendations Further finetuning necessary! # Training Details ## Training Data Pretrained on proprietary text collected from the internet, with a focus on quality German and English text. Typical benchmarking data should not be present in this data set. This is no longer as clear for the finetuning data sets, but the amount of data and compute for instruction tuning was much less. ## Training Procedure Initial LoRA finetuning with LLaMA-Factory using a mixture of **English and German** data, with a focus on data quality. Unfortunately, I could use 100x as much GPU power as I had available for this experiment, and had to heavily subsample the data. As is, this is largely a proof of concept to see if we can improve model quality with better data. This version then received basic chat/instruction training with ``` --stage sft \ --model_name_or_path ende-0.0.7 \ --finetuning_type lora \ --template default \ --dataset_dir data \ --dataset sharegpt-deutsch,oasst_de,dolly_15k_de,openschnabeltier_de,ultrachat_de,evol_instruct,evol_instruct_de,alpaca-gpt4_de,dolphin_de,airoboros_de \ --cutoff_len 1024 \ --learning_rate 5e-05 \ --num_train_epochs 1.0 \ --per_device_train_batch_size 4 \ --gradient_accumulation_steps 8 \ --lr_scheduler_type cosine \ --neftune_noise_alpha 0 \ --lora_target all \ --lora_rank 8 \ --lora_dropout 0 \ --fp16 True \ ``` Unfortunately, **most of this fine-tuning data is just automatically translated from English**. I do not think this leads to particularly high-quality data. # Evaluation Not fully evaluated, as it has not been completely trained. Also, I believe that our **benchmarks tend to be misleading**. In particular the huggingface leaderboard is flooded with overfitted models with little to no value. Real-world performance may be task specific and needs to be evaluated carefully on a case basis. I hope some will find this model to be useful! **You are welcome to contribute evaluation scores!**
null
Non_BioNLP
# Model Card for EnDe-chat-0.0.7 Preliminary LoRA finetune of Mistral-7B for German and English quality text. This version has an **extended tokenizer**, to make the model able to handle longer input. This is an experiment to improve the German capabilities of Mistral with continued finetuning. The finetuning also includes English data, in order to retain the English capabilities, to allow the model to be used for translation and for answering German questions on English documents and vice versa. Unfortunately, the compute available for this experiment (2xV100) was not at all sufficient for the amount of training data we would have liked to include. After continued pretraining, this model has received instruction finetuning. # Table of Contents - [Model Details](#model-details) - [Model Description](#model-description) - [Uses](#uses) - [Out-of-Scope Use](#out-of-scope-use) - [Bias, Risks, and Limitations](#bias-risks-and-limitations) - [Recommendations](#recommendations) - [Training Details](#training-details) - [Training Data](#training-data) - [Training Procedure](#training-procedure) - [Evaluation](#evaluation) - [Examples](#examples) # Model Details ## Model Description LoRA finetune of Mistral-7B for German and English quality text. - **Developed by:** Erich Schubert - **Model type:** Language model - **Language(s) (NLP):** deu, eng - **License:** apache-2.0 - **Parent Model:** mistralai/Mistral-7B-v0.1 - **Resources for more information:** n/a # Uses Model finetuned for chat in German and English. ## Out-of-Scope Use The model has not received alignment or instruction finetuning, this is intended as a chat foundation model. # Bias, Risks, and Limitations Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. ## Recommendations Further finetuning necessary! # Training Details ## Training Data Pretrained on proprietary text collected from the internet, with a focus on quality German and English text. Typical benchmarking data should not be present in this data set. This is no longer as clear for the finetuning data sets, but the amount of data and compute for instruction tuning was much less. ## Training Procedure Initial LoRA finetuning with LLaMA-Factory using a mixture of **English and German** data, with a focus on data quality. Unfortunately, I could use 100x as much GPU power as I had available for this experiment, and had to heavily subsample the data. As is, this is largely a proof of concept to see if we can improve model quality with better data. This version then received basic chat/instruction training with ``` --stage sft \ --model_name_or_path ende-0.0.7 \ --finetuning_type lora \ --template default \ --dataset_dir data \ --dataset sharegpt-deutsch,oasst_de,dolly_15k_de,openschnabeltier_de,ultrachat_de,evol_instruct,evol_instruct_de,alpaca-gpt4_de,dolphin_de,airoboros_de \ --cutoff_len 1024 \ --learning_rate 5e-05 \ --num_train_epochs 1.0 \ --per_device_train_batch_size 4 \ --gradient_accumulation_steps 8 \ --lr_scheduler_type cosine \ --neftune_noise_alpha 0 \ --lora_target all \ --lora_rank 8 \ --lora_dropout 0 \ --fp16 True \ ``` Unfortunately, **most of this fine-tuning data is just automatically translated from English**. I do not think this leads to particularly high-quality data. # Evaluation Not fully evaluated, as it has not been completely trained. Also, I believe that our **benchmarks tend to be misleading**. In particular the huggingface leaderboard is flooded with overfitted models with little to no value. Real-world performance may be task specific and needs to be evaluated carefully on a case basis. I hope some will find this model to be useful! **You are welcome to contribute evaluation scores!**
{"datasets": ["FreedomIntelligence/sharegpt-deutsch", "mayflowergmbh/oasst_de", "mayflowergmbh/dolly_15k_de", "mayflowergmbh/openschnabeltier_de", "mayflowergmbh/ultrachat_de", "WizardLM/WizardLM_evol_instruct_V2_196k", "mayflowergmbh/evol_instruct_de", "mayflowergmbh/alpaca-gpt4_de", "mayflowergmbh/dolphin_de", "mayflowergmbh/airoboros_de"], "language": ["en", "de"], "library_name": "transformers", "license": "apache-2.0", "pipeline-tag": "text-generation", "model-index": [{"name": "ende-chat-0.0.7", "results": []}]}
task
[ "TRANSLATION" ]
46,448
KETI-AIR-Downstream/long-ke-t5-base-translation-aihub-bidirection_e1
KETI-AIR-Downstream
translation
[ "transformers", "pytorch", "safetensors", "longt5", "text2text-generation", "translation", "ko", "en", "base_model:KETI-AIR/long-ke-t5-base", "base_model:finetune:KETI-AIR/long-ke-t5-base", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-07-03T00:20:57Z
2023-09-18T01:28:26+00:00
20
1
--- base_model: KETI-AIR/long-ke-t5-base language: - ko - en license: apache-2.0 pipeline_tag: translation widget: - text: 'translate_ko2en: IBM 왓슨X는 AI 및 데이터 플랫폼이다. 신뢰할 수 있는 데이터, 속도, 거버넌스를 갖고 파운데이션 모델 및 머신 러닝 기능을 포함한 AI 모델을 학습시키고, 조정해, 조직 전체에서 활용하기 위한 전 과정을 아우르는 기술과 서비스를 제공한다.' example_title: KO2EN 1 - text: 'translate_ko2en: 이용자는 신뢰할 수 있고 개방된 환경에서 자신의 데이터에 대해 자체적인 AI를 구축하거나, 시장에 출시된 AI 모델을 정교하게 조정할 수 있다. 대규모로 활용하기 위한 도구 세트, 기술, 인프라 및 전문 컨설팅 서비스를 활용할 수 있다.' example_title: KO2EN 2 - text: 'translate_en2ko: The Seoul Metropolitan Government said Wednesday that it would develop an AI-based congestion monitoring system to provide better information to passengers about crowd density at each subway station.' example_title: EN2KO 1 - text: 'translate_en2ko: According to Seoul Metro, the operator of the subway service in Seoul, the new service will help analyze the real-time flow of passengers and crowd levels in subway compartments, improving operational efficiency.' example_title: EN2KO 2 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # ko2en_bidirection This model is a fine-tuned version of [KETI-AIR/long-ke-t5-base](https://huggingface.co/KETI-AIR/long-ke-t5-base) on the csv_dataset.py dataset. It achieves the following results on the evaluation set: - Loss: 0.6808 - Bleu: 52.2152 - Gen Len: 396.0215 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.001 - train_batch_size: 8 - eval_batch_size: 4 - seed: 42 - distributed_type: multi-GPU - num_devices: 8 - total_train_batch_size: 64 - total_eval_batch_size: 32 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 1.0 ### Training results | Training Loss | Epoch | Step | Validation Loss | Bleu | Gen Len | |:-------------:|:-----:|:------:|:---------------:|:----:|:-------:| | 0.5962 | 1.0 | 750093 | 0.6808 | 0.0 | 18.369 | ### Framework versions - Transformers 4.28.1 - Pytorch 1.13.0 - Datasets 2.9.0 - Tokenizers 0.13.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # ko2en_bidirection This model is a fine-tuned version of [KETI-AIR/long-ke-t5-base](https://huggingface.co/KETI-AIR/long-ke-t5-base) on the csv_dataset.py dataset. It achieves the following results on the evaluation set: - Loss: 0.6808 - Bleu: 52.2152 - Gen Len: 396.0215 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.001 - train_batch_size: 8 - eval_batch_size: 4 - seed: 42 - distributed_type: multi-GPU - num_devices: 8 - total_train_batch_size: 64 - total_eval_batch_size: 32 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 1.0 ### Training results | Training Loss | Epoch | Step | Validation Loss | Bleu | Gen Len | |:-------------:|:-----:|:------:|:---------------:|:----:|:-------:| | 0.5962 | 1.0 | 750093 | 0.6808 | 0.0 | 18.369 | ### Framework versions - Transformers 4.28.1 - Pytorch 1.13.0 - Datasets 2.9.0 - Tokenizers 0.13.2
{"base_model": "KETI-AIR/long-ke-t5-base", "language": ["ko", "en"], "license": "apache-2.0", "pipeline_tag": "translation", "widget": [{"text": "translate_ko2en: IBM 왓슨X는 AI 및 데이터 플랫폼이다. 신뢰할 수 있는 데이터, 속도, 거버넌스를 갖고 파운데이션 모델 및 머신 러닝 기능을 포함한 AI 모델을 학습시키고, 조정해, 조직 전체에서 활용하기 위한 전 과정을 아우르는 기술과 서비스를 제공한다.", "example_title": "KO2EN 1"}, {"text": "translate_ko2en: 이용자는 신뢰할 수 있고 개방된 환경에서 자신의 데이터에 대해 자체적인 AI를 구축하거나, 시장에 출시된 AI 모델을 정교하게 조정할 수 있다. 대규모로 활용하기 위한 도구 세트, 기술, 인프라 및 전문 컨설팅 서비스를 활용할 수 있다.", "example_title": "KO2EN 2"}, {"text": "translate_en2ko: The Seoul Metropolitan Government said Wednesday that it would develop an AI-based congestion monitoring system to provide better information to passengers about crowd density at each subway station.", "example_title": "EN2KO 1"}, {"text": "translate_en2ko: According to Seoul Metro, the operator of the subway service in Seoul, the new service will help analyze the real-time flow of passengers and crowd levels in subway compartments, improving operational efficiency.", "example_title": "EN2KO 2"}]}
task
[ "TRANSLATION" ]
46,449
spacemanidol/flan-t5-small-4-6-cnndm
spacemanidol
text2text-generation
[ "transformers", "pytorch", "t5", "text2text-generation", "generated_from_trainer", "dataset:cnn_dailymail", "model-index", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2023-02-18T20:08:25Z
2023-03-06T17:05:09+00:00
10
0
--- datasets: - cnn_dailymail metrics: - rouge tags: - generated_from_trainer model-index: - name: small-4-6 results: - task: type: summarization name: Summarization dataset: name: cnn_dailymail 3.0.0 type: cnn_dailymail config: 3.0.0 split: validation args: 3.0.0 metrics: - type: rouge value: 39.1243 name: Rouge1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # small-4-6 This model is a fine-tuned version of [cnn/small-4-6/](https://huggingface.co/cnn/small-4-6/) on the cnn_dailymail 3.0.0 dataset. It achieves the following results on the evaluation set: - Loss: 1.7018 - Rouge1: 39.1243 - Rouge2: 17.3503 - Rougel: 27.7252 - Rougelsum: 36.3821 - Gen Len: 76.2216 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 4 - eval_batch_size: 4 - seed: 42 - gradient_accumulation_steps: 16 - total_train_batch_size: 64 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: constant - num_epochs: 3.0 ### Training results ### Framework versions - Transformers 4.27.0.dev0 - Pytorch 1.13.0+cu117 - Datasets 2.7.1 - Tokenizers 0.12.1
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # small-4-6 This model is a fine-tuned version of [cnn/small-4-6/](https://huggingface.co/cnn/small-4-6/) on the cnn_dailymail 3.0.0 dataset. It achieves the following results on the evaluation set: - Loss: 1.7018 - Rouge1: 39.1243 - Rouge2: 17.3503 - Rougel: 27.7252 - Rougelsum: 36.3821 - Gen Len: 76.2216 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 4 - eval_batch_size: 4 - seed: 42 - gradient_accumulation_steps: 16 - total_train_batch_size: 64 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: constant - num_epochs: 3.0 ### Training results ### Framework versions - Transformers 4.27.0.dev0 - Pytorch 1.13.0+cu117 - Datasets 2.7.1 - Tokenizers 0.12.1
{"datasets": ["cnn_dailymail"], "metrics": ["rouge"], "tags": ["generated_from_trainer"], "model-index": [{"name": "small-4-6", "results": [{"task": {"type": "summarization", "name": "Summarization"}, "dataset": {"name": "cnn_dailymail 3.0.0", "type": "cnn_dailymail", "config": "3.0.0", "split": "validation", "args": "3.0.0"}, "metrics": [{"type": "rouge", "value": 39.1243, "name": "Rouge1"}]}]}]}
task
[ "SUMMARIZATION" ]
46,450
TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML
TheBloke
null
[ "transformers", "llama", "dataset:jondurbin/airoboros-gpt4-m2.0", "base_model:jondurbin/airoboros-l2-70b-gpt4-m2.0", "base_model:finetune:jondurbin/airoboros-l2-70b-gpt4-m2.0", "license:llama2", "region:us" ]
2023-08-04T11:19:20Z
2023-09-27T13:00:57+00:00
18
15
--- base_model: jondurbin/airoboros-l2-70b-gpt4-m2.0 datasets: - jondurbin/airoboros-gpt4-m2.0 license: llama2 model_name: Airoboros L2 70B GPT4 m2.0 inference: false model_creator: Jon Durbin model_link: https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0 model_type: llama quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Airoboros L2 70B GPT4 m2.0 - GGML - Model creator: [Jon Durbin](https://huggingface.co/jondurbin) - Original model: [Airoboros L2 70B GPT4 m2.0](https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0) ## Description This repo contains GGML format model files for [Jon Durbin's Airoboros L2 70B GPT4 m2.0](https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0). ### Important note regarding GGML files. The GGML format has now been superseded by GGUF. As of August 21st 2023, [llama.cpp](https://github.com/ggerganov/llama.cpp) no longer supports GGML models. Third party clients and libraries are expected to still support it for a time, but many may also drop support. Please use the GGUF models instead. ### About GGML GPU acceleration is now available for Llama 2 70B GGML files, with both CUDA (NVidia) and Metal (macOS). The following clients/libraries are known to work with these files, including with GPU acceleration: * [llama.cpp](https://github.com/ggerganov/llama.cpp), commit `e76d630` and later. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), version 1.37 and later. A powerful GGML web UI, especially good for story telling. * [LM Studio](https://lmstudio.ai/), a fully featured local GUI with GPU acceleration for both Windows and macOS. Use 0.1.11 or later for macOS GPU acceleration with 70B models. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), version 0.1.77 and later. A Python library with LangChain support, and OpenAI-compatible API server. * [ctransformers](https://github.com/marella/ctransformers), version 0.2.15 and later. A Python library with LangChain support, and OpenAI-compatible API server. ## Repositories available * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGUF) * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML) * [Jon Durbin's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0) ## Prompt template: Airoboros ``` A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request. USER: {prompt} ASSISTANT: ``` <!-- compatibility_ggml start --> ## Compatibility ### Works with llama.cpp [commit `e76d630`](https://github.com/ggerganov/llama.cpp/commit/e76d630df17e235e6b9ef416c45996765d2e36fb) until August 21st, 2023 Will not work with `llama.cpp` after commit [dadbed99e65252d79f81101a392d0d6497b86caa](https://github.com/ggerganov/llama.cpp/commit/dadbed99e65252d79f81101a392d0d6497b86caa). For compatibility with latest llama.cpp, please use GGUF files instead. Or one of the other tools and libraries listed above. To use in llama.cpp, you must add `-gqa 8` argument. For other UIs and libraries, please check the docs. ## Explanation of the new k-quant methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw * GGML_TYPE_Q8_K - "type-0" 8-bit quantization. Only used for quantizing intermediate results. The difference to the existing Q8_0 is that the block size is 256. All 2-6 bit dot products are implemented for this quantization type. Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_ggml end --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q2_K.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q2_K.bin) | q2_K | 2 | 28.59 GB| 31.09 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.vw and feed_forward.w2 tensors, GGML_TYPE_Q2_K for the other tensors. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_S.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_S.bin) | q3_K_S | 3 | 29.75 GB| 32.25 GB | New k-quant method. Uses GGML_TYPE_Q3_K for all tensors | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_M.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_M.bin) | q3_K_M | 3 | 33.04 GB| 35.54 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_L.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_L.bin) | q3_K_L | 3 | 36.15 GB| 38.65 GB | New k-quant method. Uses GGML_TYPE_Q5_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_0.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_0.bin) | q4_0 | 4 | 38.87 GB| 41.37 GB | Original quant method, 4-bit. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_S.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_S.bin) | q4_K_S | 4 | 38.87 GB| 41.37 GB | New k-quant method. Uses GGML_TYPE_Q4_K for all tensors | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_M.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_M.bin) | q4_K_M | 4 | 41.38 GB| 43.88 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q4_K | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_1.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_1.bin) | q4_1 | 4 | 43.17 GB| 45.67 GB | Original quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_0.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_0.bin) | q5_0 | 5 | 47.46 GB| 49.96 GB | Original quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_S.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_S.bin) | q5_K_S | 5 | 47.46 GB| 49.96 GB | New k-quant method. Uses GGML_TYPE_Q5_K for all tensors | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_M.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_M.bin) | q5_K_M | 5 | 48.75 GB| 51.25 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q5_K | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. ## How to run in `llama.cpp` Make sure you are using `llama.cpp` from commit [dadbed99e65252d79f81101a392d0d6497b86caa](https://github.com/ggerganov/llama.cpp/commit/dadbed99e65252d79f81101a392d0d6497b86caa) or earlier. For compatibility with latest llama.cpp, please use GGUF files instead. I use the following command line; adjust for your tastes and needs: ``` ./main -t 10 -ngl 40 -gqa 8 -m airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_M.bin --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request. USER: Write a story about llamas ASSISTANT:" ``` Change `-t 10` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`. If you are fully offloading the model to GPU, use `-t 1` Change `-ngl 40` to the number of GPU layers you have VRAM for. Use `-ngl 100` to offload all layers to VRAM - if you have a 48GB card, or 2 x 24GB, or similar. Otherwise you can partially offload as many as you have VRAM for, on one or more GPUs. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` Remember the `-gqa 8` argument, required for Llama 70B models. Change `-c 4096` to the desired sequence length for this model. For models that use RoPE, add `--rope-freq-base 10000 --rope-freq-scale 0.5` for doubled context, or `--rope-freq-base 10000 --rope-freq-scale 0.25` for 4x context. For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions here: [text-generation-webui/docs/llama.cpp-models.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp-models.md). <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute. Thanks to the [chirper.ai](https://chirper.ai) team! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieł, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, 阿明, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjäreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: Jon Durbin's Airoboros L2 70B GPT4 m2.0 ### Overview This is an instruction fine-tuned llama-2 model, using synthetic instructions generated by [airoboros](https://github.com/jondurbin/airoboros) - The 2.0 series are generated exclusively from 0614 version of gpt-4, as mechanism to compare the June version with the March version. - The m2.0 series have the 1.4.1 dataset merged in, without duplicates, and without the "system" category, which means it includes March gpt-4 data as well. - 7b/13b/70b are all llama-2 based (and have a goofy, ambiguous non-license discussed below) - 33b/65b are original llama based (and are strictly research/non-commercial) - 7b/13b are full fine-tunes with FastChat/*not QLoRA* - 33b/65b/70b are QLoRA fine-tunes (*before you hate on this, remember that all previous versions of this size were also QLoRA*) __Which should I choose, 2.0 or m2.0?__ I have no idea, try them both and see which is better. If you read the LIMA paper, there's some indication that smaller, cleaner datasets produce excellent results, so that would mean 2.0 is probably a better choice. If you really enjoyed 1.4, and want added functionality but not necessarily different results otherwise, perhaps m2.0. ### Prompt format ``` A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request. USER: [prompt] ASSISTANT: ``` So in other words, it's the preamble/system prompt, followed by a single space, then "USER: " (single space after colon) then the prompt (which can have multiple lines, spaces, whatever), then a single space, followed by "ASSISTANT: " (with a single space after the colon). Why the "regardless of ..." part? - laws vary widely based on time and location - language model may conflate certain words with laws, e.g. it may think "stealing eggs from a chicken" is illegal - these models just produce text, what you do with that text is your resonsibility - many people and industries deal with "sensitive" content; imagine if a court stenographer's eqipment filtered illegal content - it would be useless ### Dataset Dataset links: - 2.0 series https://hf.co/datasets/jondurbin/airoboros-gpt4-2.0 - merged/m2.0 series https://hf.co/datasets/jondurbin/airoboros-gpt4-m2.0 Dataset creation details/configuration: https://gist.github.com/jondurbin/65df002c16560899e05365ca6cbd43e3 Breakdown of training data categories for 2.0/m2.0 datasets: ![categories](categories.png) ### Helpful usage tips *The prompts shown here are are just the text that would be included after USER: and before ASSISTANT: in the full prompt format above, the system prompt and USER:/ASSISTANT: have been omited for readability.* #### Context obedient question answering By obedient, I mean the model was trained to ignore what it thinks it knows, and uses the context to answer the question. The model was also tuned to limit the values to the provided context as much as possible to reduce hallucinations. The format for a closed-context prompt is as follows: ``` BEGININPUT BEGINCONTEXT [key0: value0] [key1: value1] ... other metdata ... ENDCONTEXT [insert your text blocks here] ENDINPUT [add as many other blocks, in the exact same format] BEGININSTRUCTION [insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.] ENDINSTRUCTION ``` It's also helpful to add "Don't make up answers if you don't know." to your instruction block to make sure if the context is completely unrelated it doesn't make something up. *The __only__ prompts that need this closed context formating are closed-context instructions. Normal questions/instructions do not!* I know it's a bit verbose and annoying, but after much trial and error, using these explicit delimiters helps the model understand where to find the responses and how to associate specific sources with it. - `BEGININPUT` - denotes a new input block - `BEGINCONTEXT` - denotes the block of context (metadata key/value pairs) to associate with the current input block - `ENDCONTEXT` - denotes the end of the metadata block for the current input - [text] - Insert whatever text you want for the input block, as many paragraphs as can fit in the context. - `ENDINPUT` - denotes the end of the current input block - [repeat as many input blocks in this format as you want] - `BEGININSTRUCTION` - denotes the start of the list (or one) instruction(s) to respond to for all of the input blocks above. - [instruction(s)] - `ENDINSTRUCTION` - denotes the end of instruction set It sometimes works without `ENDINSTRUCTION`, but by explicitly including that in the prompt, the model better understands that all of the instructions in the block should be responded to. Here's a trivial, but important example to prove the point: ``` BEGININPUT BEGINCONTEXT date: 2021-01-01 url: https://web.site/123 ENDCONTEXT In a shocking turn of events, blueberries are now green, but will be sticking with the same name. ENDINPUT BEGININSTRUCTION What color are bluberries? Source? ENDINSTRUCTION ``` And the response: ``` Blueberries are now green. Source: date: 2021-01-01 url: https://web.site/123 ``` #### Coding You can ask for fairly complex coding instructions with multiple criteria, e.g.: ``` Create a python application with the following requirements: - Asyncio FastAPI webserver - ping endpoint that returns the current date in JSON format - file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate ``` Or inline criteria: ``` Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values. ``` You can also optionally add a single space and "PLAINFORMAT" at the end of your prompt to avoid backticks, explanations, etc. and just print the code, e.g.: ``` Write a websocket application in node.js. PLAINFORMAT ``` #### Agent/function calling The dataset includes many examples of function/args generation based on input criteria. This is somewhat similar to the OpenAI function calling, but the output is either JSON or YAML. Example prompt: ``` As an AI assistant, please select the most suitable function and parameters from the list of available functions below, based on the user's input. Provide your response in JSON format. Input: I want to know how many times 'Python' is mentioned in my text file. Available functions: file_analytics: description: This tool performs various operations on a text file. params: action: The operation we want to perform on the data, such as "count_occurrences", "find_line", etc. filters: keyword: The word or phrase we want to search for. ``` Response: ```json { "function": "file_analytics", "params": { "action": "count_occurrences", "filters": { "keyword": "Python" } } } ``` #### Chain-of-thought You can ask for several possible responses to a given problem, with a ranking and final answer selection. Example prompt: ``` A group of people decide to play a round-robin tournament where every player plays every other player exactly once. If a total of 45 games were played, how many players participated in the tournament? Offer several potential answers, rank them according to mathematical logic, and pick the most feasible one. ``` Example response: ``` Solution 1: In a round-robin tournament, each player plays every other player exactly once. This means that the total number of games played is equal to the combination of all players taken two at a time (since a game involves two players). The formula for combinations is nC2 = n(n-1)/2, where n is the total number of players. We know that nC2 equals 45 (the total number of games), so we can set up the equation as follows: n(n-1)/2 = 45 Solving this equation gives us n=10. Final answer: There were 10 players in the tournament. Solution 2: Another way to approach this problem is by using the concept of triangular numbers. Triangular numbers are a sequence of numbers where each number can be represented as a triangle with dots. The nth triangular number is given by the sum of the first n natural numbers. If we consider each game as a dot and each player as a side of the triangle, then the total number of games (45) would correspond to the 9th triangular number because 1+2+3+4+5+6+7+8+9=45. However, since each side of the triangle represents a player, and there's one more player than sides in our model (because the last player has no one left to play against), we need to add one more to get the total number of players. Final answer: There were 10 players in the tournament. Solution 3: We could also use trial and error to solve this problem. Starting from a small number of players, we calculate how many games would be played in a round-robin tournament until we reach 45 games. For example, with 2 players, only 1 game is played; with 3 players, 3 games are played; with 4 players, 6 games are played, and so on. Continuing this process, we find that with 10 players, 45 games are played. Final answer: There were 10 players in the tournament. Ranking of solutions from best to worst: 1. Solution 1: This solution uses direct mathematical reasoning based on the properties of a round-robin tournament and solves an equation to find the answer. 2. Solution 2: This solution uses the concept of triangular numbers which requires additional steps and knowledge beyond the immediate problem context, but still arrives at the correct answer. 3. Solution 3: This solution relies on trial and error, which is less efficient and reliable than the other methods, but it eventually gets to the right answer. Best and final answer: There were 10 players in the tournament. ``` #### reWOO style execution planning The model now supports execution planning for complex instructions that would require making use of several tools. The output is just the plan, you must implement a mechanism to parse the output and actually call the functions! Example prompt: ``` Please construct a systematic plan to generate an optimal response to the user instruction, utilizing a set of provided tools. Each plan will correspond to an evidence value, which will be the output of one of the available functions given an input string that could be the user's question, one or more prior evidence values, or a combination of both. Here are the tools available to be called: DuckDuckGo[input]: Tool that enables the user to search for information using the DuckDuckGo search engine. This tool is helpful in locating a suitable list of sites that may contain the answer to the user's query. It does not directly answer the question but finds a list of sites that might have the answer. TextScraper[input]: Load one or more websites from the input string containing newline delimited links, where input is one or more links, and produces plain text output containing the content of the links. HyperlinkExtractor[input]: Extract links from plain text and produces a plain text, newline delimited response of links. KnowledgeModel[input]: Question answering language model, particularly useful in answering questions based on an input passage of text. The input must be a text question that references an :evidence[n]: variable, e.g. What color is the cat, given :evidence1:? The output should be in format: Plan: [first action to take based on input question] :evidence0: = [function to call with input parameter] Plan: [next action to take, based on result of :evidence0:] :evidence1: = [next function to call and input parameter, which may include reference to previous evidence, e.g. "Given context :evidence0"] ... Answer: [:evidence[n]: containing the final answer.] Question: Who won the Nobel Prize in Literature in 2020 and what is their most famous work? ``` Response: ``` Plan: Begin by conducting a web search to find out who won the Nobel Prize in Literature in 2020. :evidence0: = DuckDuckGo[Nobel Prize in Literature 2020 winner] Plan: Utilize the KnowledgeModel to interpret the search results and find the name of the laureate. :evidence1: = KnowledgeModel[Who won the Nobel Prize in Literature in 2020, given :evidence0:?] Plan: Conduct another web search to find the most famous work of the identified laureate. :evidence2: = DuckDuckGo[Most famous work of :evidence1:] Plan: Extract the relevant links from the DuckDuckGo search results for a more focused search. :evidence3: = HyperlinkExtractor[:evidence2:] Plan: Use the TextScraper tool to extract information from the relevant links. :evidence4: = TextScraper[:evidence3:] Plan: Finally, utilize the KnowledgeModel to identify and summarize the most famous work of the laureate from the extracted information. :evidence5: = KnowledgeModel[What is the most famous work of :evidence1:, given :evidence4:?] Answer: :evidence5: ``` For this to be useful, you'd have to parse the output plan text, and implement/call each of the functions. This is just pseudo-code, completely untested off the top of my head, and obviously would requiring full implementation + hardening: ```python import re import requests def inject_context(input_text, **context): for ref in set(re.findall(r"(:evidence[0-9]+:)", input_text, re.I)): input_text = input_text.replace(ref, context.get(ref, "")) return input_text def duckduckgo(input_text, **context): search_string = inject_context(input_text, **context) ... search via duck duck go using search_string ... return text content def link_extractor(input_text, **context): input_text = inject_context(input_text, **context) return "\n".join(list(set(re.findall(r"(https?://[^\s]+?\.?)", input_text, re.I)))) def scrape(input_text, **context): input_text = inject_context(input_text, **context) text = [] for link in input_text.splitlines(): text.append(requests.get(link).text) return "\n".join(text) def infer(input_text, **context) prompt = inject_context(input_text, **context) ... call model with prompt, return output def parse_plan(plan): method_map = { "DuckDuckGo": duckduckgo, "HyperlinkExtractor": link_extractor, "KnowledgeModel": infer, "TextScraper": scrape, } context = {} for line in plan.strip().splitlines(): if line.startswith("Plan:"): print(line) continue parts = re.match("^(:evidence[0-9]+:")\s*=\s*([^\[]+])(\[.*\])\s$", line, re.I) if not parts: if line.startswith("Answer: "): return context.get(line.split(" ")[-1].strip(), "Answer couldn't be generated...") raise RuntimeError("bad format: " + line) context[parts.group(1)] = method_map[parts.group(2)](parts.group(3), **context) ``` ### Contribute If you're interested in new functionality, particularly a new "instructor" type to generate a specific type of training data, take a look at the dataset generation tool repo: https://github.com/jondurbin/airoboros and either make a PR or open an issue with details. To help me with the OpenAI/compute costs: - https://bmc.link/jondurbin - ETH 0xce914eAFC2fe52FdceE59565Dd92c06f776fcb11 - BTC bc1qdwuth4vlg8x37ggntlxu5cjfwgmdy5zaa7pswf ### Licence and usage restrictions The airoboros 2.0/m2.0 models are built on top of either llama or llama-2. Any model with `-l2-` in the name uses llama2, `..-33b-...` and `...-65b-...` are based on the original llama. #### Llama (original) models If the model was based on the original llama (33b/65b), the license is __cc-by-nc-4.0__ and is for research/academic use only -- no commercial usage whatsoever! #### Llama-2 models Base model has a custom Meta license: - See the [meta-license/LICENSE.txt](meta-license/LICENSE.txt) file attached for the original license provided by Meta. - See also [meta-license/USE_POLICY.md](meta-license/USE_POLICY.md) and [meta-license/Responsible-Use-Guide.pdf](meta-license/Responsible-Use-Guide.pdf), also provided by Meta. The fine-tuning data was generated by OpenAI API calls to gpt-4, via [airoboros](https://github.com/jondurbin/airoboros) The ToS for OpenAI API usage has a clause preventing the output from being used to train a model that __competes__ with OpenAI - what does *compete* actually mean here? - these small open source models will not produce output anywhere near the quality of gpt-4, or even gpt-3.5, so I can't imagine this could credibly be considered competing in the first place - if someone else uses the dataset to do the same, they wouldn't necessarily be violating the ToS because they didn't call the API, so I don't know how that works - the training data used in essentially all large language models includes a significant amount of copyrighted or otherwise non-permissive licensing in the first place - other work using the self-instruct method, e.g. the original here: https://github.com/yizhongw/self-instruct released the data and model as apache-2 I am purposingly leaving this license ambiguous (other than the fact you must comply with the Meta original license for llama-2) because I am not a lawyer and refuse to attempt to interpret all of the terms accordingly. Your best bet is probably to avoid using this commercially due to the OpenAI API usage. Either way, by using this model, you agree to completely indemnify me.
null
Non_BioNLP
<!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Airoboros L2 70B GPT4 m2.0 - GGML - Model creator: [Jon Durbin](https://huggingface.co/jondurbin) - Original model: [Airoboros L2 70B GPT4 m2.0](https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0) ## Description This repo contains GGML format model files for [Jon Durbin's Airoboros L2 70B GPT4 m2.0](https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0). ### Important note regarding GGML files. The GGML format has now been superseded by GGUF. As of August 21st 2023, [llama.cpp](https://github.com/ggerganov/llama.cpp) no longer supports GGML models. Third party clients and libraries are expected to still support it for a time, but many may also drop support. Please use the GGUF models instead. ### About GGML GPU acceleration is now available for Llama 2 70B GGML files, with both CUDA (NVidia) and Metal (macOS). The following clients/libraries are known to work with these files, including with GPU acceleration: * [llama.cpp](https://github.com/ggerganov/llama.cpp), commit `e76d630` and later. * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI. * [KoboldCpp](https://github.com/LostRuins/koboldcpp), version 1.37 and later. A powerful GGML web UI, especially good for story telling. * [LM Studio](https://lmstudio.ai/), a fully featured local GUI with GPU acceleration for both Windows and macOS. Use 0.1.11 or later for macOS GPU acceleration with 70B models. * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), version 0.1.77 and later. A Python library with LangChain support, and OpenAI-compatible API server. * [ctransformers](https://github.com/marella/ctransformers), version 0.2.15 and later. A Python library with LangChain support, and OpenAI-compatible API server. ## Repositories available * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGUF) * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML) * [Jon Durbin's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0) ## Prompt template: Airoboros ``` A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request. USER: {prompt} ASSISTANT: ``` <!-- compatibility_ggml start --> ## Compatibility ### Works with llama.cpp [commit `e76d630`](https://github.com/ggerganov/llama.cpp/commit/e76d630df17e235e6b9ef416c45996765d2e36fb) until August 21st, 2023 Will not work with `llama.cpp` after commit [dadbed99e65252d79f81101a392d0d6497b86caa](https://github.com/ggerganov/llama.cpp/commit/dadbed99e65252d79f81101a392d0d6497b86caa). For compatibility with latest llama.cpp, please use GGUF files instead. Or one of the other tools and libraries listed above. To use in llama.cpp, you must add `-gqa 8` argument. For other UIs and libraries, please check the docs. ## Explanation of the new k-quant methods <details> <summary>Click to see details</summary> The new methods available are: * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw) * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw. * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw. * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw * GGML_TYPE_Q8_K - "type-0" 8-bit quantization. Only used for quantizing intermediate results. The difference to the existing Q8_0 is that the block size is 256. All 2-6 bit dot products are implemented for this quantization type. Refer to the Provided Files table below to see what files use which methods, and how. </details> <!-- compatibility_ggml end --> ## Provided files | Name | Quant method | Bits | Size | Max RAM required | Use case | | ---- | ---- | ---- | ---- | ---- | ----- | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q2_K.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q2_K.bin) | q2_K | 2 | 28.59 GB| 31.09 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.vw and feed_forward.w2 tensors, GGML_TYPE_Q2_K for the other tensors. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_S.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_S.bin) | q3_K_S | 3 | 29.75 GB| 32.25 GB | New k-quant method. Uses GGML_TYPE_Q3_K for all tensors | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_M.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_M.bin) | q3_K_M | 3 | 33.04 GB| 35.54 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_L.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q3_K_L.bin) | q3_K_L | 3 | 36.15 GB| 38.65 GB | New k-quant method. Uses GGML_TYPE_Q5_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_0.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_0.bin) | q4_0 | 4 | 38.87 GB| 41.37 GB | Original quant method, 4-bit. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_S.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_S.bin) | q4_K_S | 4 | 38.87 GB| 41.37 GB | New k-quant method. Uses GGML_TYPE_Q4_K for all tensors | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_M.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_M.bin) | q4_K_M | 4 | 41.38 GB| 43.88 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q4_K | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_1.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_1.bin) | q4_1 | 4 | 43.17 GB| 45.67 GB | Original quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_0.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_0.bin) | q5_0 | 5 | 47.46 GB| 49.96 GB | Original quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_S.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_S.bin) | q5_K_S | 5 | 47.46 GB| 49.96 GB | New k-quant method. Uses GGML_TYPE_Q5_K for all tensors | | [airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_M.bin](https://huggingface.co/TheBloke/Airoboros-L2-70B-GPT4-m2.0-GGML/blob/main/airoboros-l2-70b-gpt4-m2.0.ggmlv3.q5_K_M.bin) | q5_K_M | 5 | 48.75 GB| 51.25 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q5_K | **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead. ## How to run in `llama.cpp` Make sure you are using `llama.cpp` from commit [dadbed99e65252d79f81101a392d0d6497b86caa](https://github.com/ggerganov/llama.cpp/commit/dadbed99e65252d79f81101a392d0d6497b86caa) or earlier. For compatibility with latest llama.cpp, please use GGUF files instead. I use the following command line; adjust for your tastes and needs: ``` ./main -t 10 -ngl 40 -gqa 8 -m airoboros-l2-70b-gpt4-m2.0.ggmlv3.q4_K_M.bin --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request. USER: Write a story about llamas ASSISTANT:" ``` Change `-t 10` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`. If you are fully offloading the model to GPU, use `-t 1` Change `-ngl 40` to the number of GPU layers you have VRAM for. Use `-ngl 100` to offload all layers to VRAM - if you have a 48GB card, or 2 x 24GB, or similar. Otherwise you can partially offload as many as you have VRAM for, on one or more GPUs. If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins` Remember the `-gqa 8` argument, required for Llama 70B models. Change `-c 4096` to the desired sequence length for this model. For models that use RoPE, add `--rope-freq-base 10000 --rope-freq-scale 0.5` for doubled context, or `--rope-freq-base 10000 --rope-freq-scale 0.25` for 4x context. For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) ## How to run in `text-generation-webui` Further instructions here: [text-generation-webui/docs/llama.cpp-models.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp-models.md). <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute. Thanks to the [chirper.ai](https://chirper.ai) team! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieł, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, 阿明, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjäreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: Jon Durbin's Airoboros L2 70B GPT4 m2.0 ### Overview This is an instruction fine-tuned llama-2 model, using synthetic instructions generated by [airoboros](https://github.com/jondurbin/airoboros) - The 2.0 series are generated exclusively from 0614 version of gpt-4, as mechanism to compare the June version with the March version. - The m2.0 series have the 1.4.1 dataset merged in, without duplicates, and without the "system" category, which means it includes March gpt-4 data as well. - 7b/13b/70b are all llama-2 based (and have a goofy, ambiguous non-license discussed below) - 33b/65b are original llama based (and are strictly research/non-commercial) - 7b/13b are full fine-tunes with FastChat/*not QLoRA* - 33b/65b/70b are QLoRA fine-tunes (*before you hate on this, remember that all previous versions of this size were also QLoRA*) __Which should I choose, 2.0 or m2.0?__ I have no idea, try them both and see which is better. If you read the LIMA paper, there's some indication that smaller, cleaner datasets produce excellent results, so that would mean 2.0 is probably a better choice. If you really enjoyed 1.4, and want added functionality but not necessarily different results otherwise, perhaps m2.0. ### Prompt format ``` A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request. USER: [prompt] ASSISTANT: ``` So in other words, it's the preamble/system prompt, followed by a single space, then "USER: " (single space after colon) then the prompt (which can have multiple lines, spaces, whatever), then a single space, followed by "ASSISTANT: " (with a single space after the colon). Why the "regardless of ..." part? - laws vary widely based on time and location - language model may conflate certain words with laws, e.g. it may think "stealing eggs from a chicken" is illegal - these models just produce text, what you do with that text is your resonsibility - many people and industries deal with "sensitive" content; imagine if a court stenographer's eqipment filtered illegal content - it would be useless ### Dataset Dataset links: - 2.0 series https://hf.co/datasets/jondurbin/airoboros-gpt4-2.0 - merged/m2.0 series https://hf.co/datasets/jondurbin/airoboros-gpt4-m2.0 Dataset creation details/configuration: https://gist.github.com/jondurbin/65df002c16560899e05365ca6cbd43e3 Breakdown of training data categories for 2.0/m2.0 datasets: ![categories](categories.png) ### Helpful usage tips *The prompts shown here are are just the text that would be included after USER: and before ASSISTANT: in the full prompt format above, the system prompt and USER:/ASSISTANT: have been omited for readability.* #### Context obedient question answering By obedient, I mean the model was trained to ignore what it thinks it knows, and uses the context to answer the question. The model was also tuned to limit the values to the provided context as much as possible to reduce hallucinations. The format for a closed-context prompt is as follows: ``` BEGININPUT BEGINCONTEXT [key0: value0] [key1: value1] ... other metdata ... ENDCONTEXT [insert your text blocks here] ENDINPUT [add as many other blocks, in the exact same format] BEGININSTRUCTION [insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.] ENDINSTRUCTION ``` It's also helpful to add "Don't make up answers if you don't know." to your instruction block to make sure if the context is completely unrelated it doesn't make something up. *The __only__ prompts that need this closed context formating are closed-context instructions. Normal questions/instructions do not!* I know it's a bit verbose and annoying, but after much trial and error, using these explicit delimiters helps the model understand where to find the responses and how to associate specific sources with it. - `BEGININPUT` - denotes a new input block - `BEGINCONTEXT` - denotes the block of context (metadata key/value pairs) to associate with the current input block - `ENDCONTEXT` - denotes the end of the metadata block for the current input - [text] - Insert whatever text you want for the input block, as many paragraphs as can fit in the context. - `ENDINPUT` - denotes the end of the current input block - [repeat as many input blocks in this format as you want] - `BEGININSTRUCTION` - denotes the start of the list (or one) instruction(s) to respond to for all of the input blocks above. - [instruction(s)] - `ENDINSTRUCTION` - denotes the end of instruction set It sometimes works without `ENDINSTRUCTION`, but by explicitly including that in the prompt, the model better understands that all of the instructions in the block should be responded to. Here's a trivial, but important example to prove the point: ``` BEGININPUT BEGINCONTEXT date: 2021-01-01 url: https://web.site/123 ENDCONTEXT In a shocking turn of events, blueberries are now green, but will be sticking with the same name. ENDINPUT BEGININSTRUCTION What color are bluberries? Source? ENDINSTRUCTION ``` And the response: ``` Blueberries are now green. Source: date: 2021-01-01 url: https://web.site/123 ``` #### Coding You can ask for fairly complex coding instructions with multiple criteria, e.g.: ``` Create a python application with the following requirements: - Asyncio FastAPI webserver - ping endpoint that returns the current date in JSON format - file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate ``` Or inline criteria: ``` Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values. ``` You can also optionally add a single space and "PLAINFORMAT" at the end of your prompt to avoid backticks, explanations, etc. and just print the code, e.g.: ``` Write a websocket application in node.js. PLAINFORMAT ``` #### Agent/function calling The dataset includes many examples of function/args generation based on input criteria. This is somewhat similar to the OpenAI function calling, but the output is either JSON or YAML. Example prompt: ``` As an AI assistant, please select the most suitable function and parameters from the list of available functions below, based on the user's input. Provide your response in JSON format. Input: I want to know how many times 'Python' is mentioned in my text file. Available functions: file_analytics: description: This tool performs various operations on a text file. params: action: The operation we want to perform on the data, such as "count_occurrences", "find_line", etc. filters: keyword: The word or phrase we want to search for. ``` Response: ```json { "function": "file_analytics", "params": { "action": "count_occurrences", "filters": { "keyword": "Python" } } } ``` #### Chain-of-thought You can ask for several possible responses to a given problem, with a ranking and final answer selection. Example prompt: ``` A group of people decide to play a round-robin tournament where every player plays every other player exactly once. If a total of 45 games were played, how many players participated in the tournament? Offer several potential answers, rank them according to mathematical logic, and pick the most feasible one. ``` Example response: ``` Solution 1: In a round-robin tournament, each player plays every other player exactly once. This means that the total number of games played is equal to the combination of all players taken two at a time (since a game involves two players). The formula for combinations is nC2 = n(n-1)/2, where n is the total number of players. We know that nC2 equals 45 (the total number of games), so we can set up the equation as follows: n(n-1)/2 = 45 Solving this equation gives us n=10. Final answer: There were 10 players in the tournament. Solution 2: Another way to approach this problem is by using the concept of triangular numbers. Triangular numbers are a sequence of numbers where each number can be represented as a triangle with dots. The nth triangular number is given by the sum of the first n natural numbers. If we consider each game as a dot and each player as a side of the triangle, then the total number of games (45) would correspond to the 9th triangular number because 1+2+3+4+5+6+7+8+9=45. However, since each side of the triangle represents a player, and there's one more player than sides in our model (because the last player has no one left to play against), we need to add one more to get the total number of players. Final answer: There were 10 players in the tournament. Solution 3: We could also use trial and error to solve this problem. Starting from a small number of players, we calculate how many games would be played in a round-robin tournament until we reach 45 games. For example, with 2 players, only 1 game is played; with 3 players, 3 games are played; with 4 players, 6 games are played, and so on. Continuing this process, we find that with 10 players, 45 games are played. Final answer: There were 10 players in the tournament. Ranking of solutions from best to worst: 1. Solution 1: This solution uses direct mathematical reasoning based on the properties of a round-robin tournament and solves an equation to find the answer. 2. Solution 2: This solution uses the concept of triangular numbers which requires additional steps and knowledge beyond the immediate problem context, but still arrives at the correct answer. 3. Solution 3: This solution relies on trial and error, which is less efficient and reliable than the other methods, but it eventually gets to the right answer. Best and final answer: There were 10 players in the tournament. ``` #### reWOO style execution planning The model now supports execution planning for complex instructions that would require making use of several tools. The output is just the plan, you must implement a mechanism to parse the output and actually call the functions! Example prompt: ``` Please construct a systematic plan to generate an optimal response to the user instruction, utilizing a set of provided tools. Each plan will correspond to an evidence value, which will be the output of one of the available functions given an input string that could be the user's question, one or more prior evidence values, or a combination of both. Here are the tools available to be called: DuckDuckGo[input]: Tool that enables the user to search for information using the DuckDuckGo search engine. This tool is helpful in locating a suitable list of sites that may contain the answer to the user's query. It does not directly answer the question but finds a list of sites that might have the answer. TextScraper[input]: Load one or more websites from the input string containing newline delimited links, where input is one or more links, and produces plain text output containing the content of the links. HyperlinkExtractor[input]: Extract links from plain text and produces a plain text, newline delimited response of links. KnowledgeModel[input]: Question answering language model, particularly useful in answering questions based on an input passage of text. The input must be a text question that references an :evidence[n]: variable, e.g. What color is the cat, given :evidence1:? The output should be in format: Plan: [first action to take based on input question] :evidence0: = [function to call with input parameter] Plan: [next action to take, based on result of :evidence0:] :evidence1: = [next function to call and input parameter, which may include reference to previous evidence, e.g. "Given context :evidence0"] ... Answer: [:evidence[n]: containing the final answer.] Question: Who won the Nobel Prize in Literature in 2020 and what is their most famous work? ``` Response: ``` Plan: Begin by conducting a web search to find out who won the Nobel Prize in Literature in 2020. :evidence0: = DuckDuckGo[Nobel Prize in Literature 2020 winner] Plan: Utilize the KnowledgeModel to interpret the search results and find the name of the laureate. :evidence1: = KnowledgeModel[Who won the Nobel Prize in Literature in 2020, given :evidence0:?] Plan: Conduct another web search to find the most famous work of the identified laureate. :evidence2: = DuckDuckGo[Most famous work of :evidence1:] Plan: Extract the relevant links from the DuckDuckGo search results for a more focused search. :evidence3: = HyperlinkExtractor[:evidence2:] Plan: Use the TextScraper tool to extract information from the relevant links. :evidence4: = TextScraper[:evidence3:] Plan: Finally, utilize the KnowledgeModel to identify and summarize the most famous work of the laureate from the extracted information. :evidence5: = KnowledgeModel[What is the most famous work of :evidence1:, given :evidence4:?] Answer: :evidence5: ``` For this to be useful, you'd have to parse the output plan text, and implement/call each of the functions. This is just pseudo-code, completely untested off the top of my head, and obviously would requiring full implementation + hardening: ```python import re import requests def inject_context(input_text, **context): for ref in set(re.findall(r"(:evidence[0-9]+:)", input_text, re.I)): input_text = input_text.replace(ref, context.get(ref, "")) return input_text def duckduckgo(input_text, **context): search_string = inject_context(input_text, **context) ... search via duck duck go using search_string ... return text content def link_extractor(input_text, **context): input_text = inject_context(input_text, **context) return "\n".join(list(set(re.findall(r"(https?://[^\s]+?\.?)", input_text, re.I)))) def scrape(input_text, **context): input_text = inject_context(input_text, **context) text = [] for link in input_text.splitlines(): text.append(requests.get(link).text) return "\n".join(text) def infer(input_text, **context) prompt = inject_context(input_text, **context) ... call model with prompt, return output def parse_plan(plan): method_map = { "DuckDuckGo": duckduckgo, "HyperlinkExtractor": link_extractor, "KnowledgeModel": infer, "TextScraper": scrape, } context = {} for line in plan.strip().splitlines(): if line.startswith("Plan:"): print(line) continue parts = re.match("^(:evidence[0-9]+:")\s*=\s*([^\[]+])(\[.*\])\s$", line, re.I) if not parts: if line.startswith("Answer: "): return context.get(line.split(" ")[-1].strip(), "Answer couldn't be generated...") raise RuntimeError("bad format: " + line) context[parts.group(1)] = method_map[parts.group(2)](parts.group(3), **context) ``` ### Contribute If you're interested in new functionality, particularly a new "instructor" type to generate a specific type of training data, take a look at the dataset generation tool repo: https://github.com/jondurbin/airoboros and either make a PR or open an issue with details. To help me with the OpenAI/compute costs: - https://bmc.link/jondurbin - ETH 0xce914eAFC2fe52FdceE59565Dd92c06f776fcb11 - BTC bc1qdwuth4vlg8x37ggntlxu5cjfwgmdy5zaa7pswf ### Licence and usage restrictions The airoboros 2.0/m2.0 models are built on top of either llama or llama-2. Any model with `-l2-` in the name uses llama2, `..-33b-...` and `...-65b-...` are based on the original llama. #### Llama (original) models If the model was based on the original llama (33b/65b), the license is __cc-by-nc-4.0__ and is for research/academic use only -- no commercial usage whatsoever! #### Llama-2 models Base model has a custom Meta license: - See the [meta-license/LICENSE.txt](meta-license/LICENSE.txt) file attached for the original license provided by Meta. - See also [meta-license/USE_POLICY.md](meta-license/USE_POLICY.md) and [meta-license/Responsible-Use-Guide.pdf](meta-license/Responsible-Use-Guide.pdf), also provided by Meta. The fine-tuning data was generated by OpenAI API calls to gpt-4, via [airoboros](https://github.com/jondurbin/airoboros) The ToS for OpenAI API usage has a clause preventing the output from being used to train a model that __competes__ with OpenAI - what does *compete* actually mean here? - these small open source models will not produce output anywhere near the quality of gpt-4, or even gpt-3.5, so I can't imagine this could credibly be considered competing in the first place - if someone else uses the dataset to do the same, they wouldn't necessarily be violating the ToS because they didn't call the API, so I don't know how that works - the training data used in essentially all large language models includes a significant amount of copyrighted or otherwise non-permissive licensing in the first place - other work using the self-instruct method, e.g. the original here: https://github.com/yizhongw/self-instruct released the data and model as apache-2 I am purposingly leaving this license ambiguous (other than the fact you must comply with the Meta original license for llama-2) because I am not a lawyer and refuse to attempt to interpret all of the terms accordingly. Your best bet is probably to avoid using this commercially due to the OpenAI API usage. Either way, by using this model, you agree to completely indemnify me.
{"base_model": "jondurbin/airoboros-l2-70b-gpt4-m2.0", "datasets": ["jondurbin/airoboros-gpt4-m2.0"], "license": "llama2", "model_name": "Airoboros L2 70B GPT4 m2.0", "inference": false, "model_creator": "Jon Durbin", "model_link": "https://huggingface.co/jondurbin/airoboros-l2-70b-gpt4-m2.0", "model_type": "llama", "quantized_by": "TheBloke"}
task
[ "QUESTION_ANSWERING" ]
46,451
neojex/finetuning-sentiment-model-3000-samples
neojex
text-classification
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "dataset:imdb", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-03-12T18:04:50Z
2023-03-12T18:11:49+00:00
14
0
--- datasets: - imdb license: apache-2.0 metrics: - accuracy - f1 tags: - generated_from_trainer model-index: - name: finetuning-sentiment-model-3000-samples results: - task: type: text-classification name: Text Classification dataset: name: imdb type: imdb config: plain_text split: test args: plain_text metrics: - type: accuracy value: 0.8733333333333333 name: Accuracy - type: f1 value: 0.8741721854304636 name: F1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # finetuning-sentiment-model-3000-samples This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the imdb dataset. It achieves the following results on the evaluation set: - Loss: 0.3076 - Accuracy: 0.8733 - F1: 0.8742 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 1.13.1+cu116 - Datasets 2.10.1 - Tokenizers 0.13.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # finetuning-sentiment-model-3000-samples This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the imdb dataset. It achieves the following results on the evaluation set: - Loss: 0.3076 - Accuracy: 0.8733 - F1: 0.8742 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 1.13.1+cu116 - Datasets 2.10.1 - Tokenizers 0.13.2
{"datasets": ["imdb"], "license": "apache-2.0", "metrics": ["accuracy", "f1"], "tags": ["generated_from_trainer"], "model-index": [{"name": "finetuning-sentiment-model-3000-samples", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "imdb", "type": "imdb", "config": "plain_text", "split": "test", "args": "plain_text"}, "metrics": [{"type": "accuracy", "value": 0.8733333333333333, "name": "Accuracy"}, {"type": "f1", "value": 0.8741721854304636, "name": "F1"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,452
rasyosef/roberta-base-finetuned-sst2
rasyosef
text-classification
[ "transformers", "tf", "roberta", "text-classification", "generated_from_keras_callback", "en", "dataset:sst2", "dataset:glue", "base_model:FacebookAI/roberta-base", "base_model:finetune:FacebookAI/roberta-base", "license:mit", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-12-22T22:30:38Z
2024-01-04T22:00:44+00:00
11
0
--- base_model: roberta-base datasets: - sst2 - glue language: - en library_name: transformers license: mit metrics: - accuracy pipeline_tag: text-classification tags: - generated_from_keras_callback widget: - text: I love video games so much example_title: Positive Example - text: I don't really like this type of food example_title: Negative Example model-index: - name: roberta-base-finetuned-sst2 results: [] --- <!-- This model card has been generated automatically according to the information Keras had access to. You should probably proofread and complete it, then remove this comment. --> # roberta-base-finetuned-sst2 This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the glue [sst2](https://huggingface.co/datasets/sst2) dataset for sentiment classification. It achieves the following results on the evaluation set: - Train Loss: 0.0760 - Train Accuracy: 0.9736 - Validation Loss: 0.2081 - Validation Accuracy: 0.9346 ## Model description More information needed ## Intended uses & limitations More information needed ## How to use You can use this model directly with a pipeline for text classification: ```python >>> from transformers import pipeline >>> roberta_sentiment = pipeline("text-classification", model="rasyosef/roberta-base-finetuned-sst2") >>> roberta_sentiment(["This movie was awesome.", "The movie was boring."]) [{'label': 'positive', 'score': 0.9995689988136292}, {'label': 'negative', 'score': 0.9987605810165405}] ``` ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 3159, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False} - training_precision: float32 ### Training results ### Framework versions - Transformers 4.35.2 - TensorFlow 2.15.0 - Datasets 2.16.0 - Tokenizers 0.15.0
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information Keras had access to. You should probably proofread and complete it, then remove this comment. --> # roberta-base-finetuned-sst2 This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the glue [sst2](https://huggingface.co/datasets/sst2) dataset for sentiment classification. It achieves the following results on the evaluation set: - Train Loss: 0.0760 - Train Accuracy: 0.9736 - Validation Loss: 0.2081 - Validation Accuracy: 0.9346 ## Model description More information needed ## Intended uses & limitations More information needed ## How to use You can use this model directly with a pipeline for text classification: ```python >>> from transformers import pipeline >>> roberta_sentiment = pipeline("text-classification", model="rasyosef/roberta-base-finetuned-sst2") >>> roberta_sentiment(["This movie was awesome.", "The movie was boring."]) [{'label': 'positive', 'score': 0.9995689988136292}, {'label': 'negative', 'score': 0.9987605810165405}] ``` ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 3159, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False} - training_precision: float32 ### Training results ### Framework versions - Transformers 4.35.2 - TensorFlow 2.15.0 - Datasets 2.16.0 - Tokenizers 0.15.0
{"base_model": "roberta-base", "datasets": ["sst2", "glue"], "language": ["en"], "library_name": "transformers", "license": "mit", "metrics": ["accuracy"], "pipeline_tag": "text-classification", "tags": ["generated_from_keras_callback"], "widget": [{"text": "I love video games so much", "example_title": "Positive Example"}, {"text": "I don't really like this type of food", "example_title": "Negative Example"}], "model-index": [{"name": "roberta-base-finetuned-sst2", "results": []}]}
task
[ "TEXT_CLASSIFICATION" ]
46,453
zbigi/bart-base-summarization-cnn-46
zbigi
null
[ "peft", "tensorboard", "safetensors", "generated_from_trainer", "base_model:facebook/bart-base", "base_model:adapter:facebook/bart-base", "license:apache-2.0", "region:us" ]
2024-11-14T04:46:54Z
2024-11-15T18:47:10+00:00
4
0
--- base_model: facebook/bart-base library_name: peft license: apache-2.0 tags: - generated_from_trainer model-index: - name: bart-base-summarization-cnn-46 results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bart-base-summarization-cnn-46 This model is a fine-tuned version of [facebook/bart-base](https://huggingface.co/facebook/bart-base) on an unknown dataset. ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 3e-05 - train_batch_size: 4 - eval_batch_size: 1 - seed: 46 - gradient_accumulation_steps: 4 - total_train_batch_size: 16 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 - mixed_precision_training: Native AMP ### Training results ### Framework versions - PEFT 0.13.2 - Transformers 4.45.2 - Pytorch 2.5.0+cu121 - Datasets 3.1.0 - Tokenizers 0.20.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bart-base-summarization-cnn-46 This model is a fine-tuned version of [facebook/bart-base](https://huggingface.co/facebook/bart-base) on an unknown dataset. ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 3e-05 - train_batch_size: 4 - eval_batch_size: 1 - seed: 46 - gradient_accumulation_steps: 4 - total_train_batch_size: 16 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 - mixed_precision_training: Native AMP ### Training results ### Framework versions - PEFT 0.13.2 - Transformers 4.45.2 - Pytorch 2.5.0+cu121 - Datasets 3.1.0 - Tokenizers 0.20.3
{"base_model": "facebook/bart-base", "library_name": "peft", "license": "apache-2.0", "tags": ["generated_from_trainer"], "model-index": [{"name": "bart-base-summarization-cnn-46", "results": []}]}
task
[ "SUMMARIZATION" ]
46,454
duyntnet/Llama-3.2-1B-Instruct-imatrix-GGUF
duyntnet
text-generation
[ "transformers", "gguf", "imatrix", "Llama-3.2-1B-Instruct", "text-generation", "en", "license:other", "region:us", "conversational" ]
2024-09-25T20:45:51Z
2024-09-25T21:15:24+00:00
225
0
--- language: - en license: other pipeline_tag: text-generation tags: - transformers - gguf - imatrix - Llama-3.2-1B-Instruct inference: false --- Quantizations of https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct ### Inference Clients/UIs * [llama.cpp](https://github.com/ggerganov/llama.cpp) * [KoboldCPP](https://github.com/LostRuins/koboldcpp) * [text-generation-webui](https://github.com/oobabooga/text-generation-webui) * [ollama](https://github.com/ollama/ollama) --- # From original readme The Meta Llama 3.2 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction-tuned generative models in 1B and 3B sizes (text in/text out). The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks. **Model Developer:** Meta **Model Architecture:** Llama 3.2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. ## How to use This repository contains two versions of Llama-3.2-1B-Instruct, for use with `transformers` and with the original `llama` codebase. ### Use with transformers Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function. Make sure to update your transformers installation via `pip install --upgrade transformers`. ```python import torch from transformers import pipeline model_id = "meta-llama/Llama-3.2-1B-Instruct" pipe = pipeline( "text-generation", model=model_id, torch_dtype=torch.bfloat16, device_map="auto", ) messages = [ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"}, {"role": "user", "content": "Who are you?"}, ] outputs = pipe( messages, max_new_tokens=256, ) print(outputs[0]["generated_text"][-1]) ``` Note: You can also find detailed recipes on how to use the model locally, with `torch.compile()`, assisted generations, quantised and more at [`huggingface-llama-recipes`](https://github.com/huggingface/huggingface-llama-recipes) ### Use with `llama` Please, follow the instructions in the [repository](https://github.com/meta-llama/llama) To download Original checkpoints, see the example command below leveraging `huggingface-cli`: ``` huggingface-cli download meta-llama/Llama-3.2-1B-Instruct --include "original/*" --local-dir Llama-3.2-1B-Instruct ```
null
Non_BioNLP
Quantizations of https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct ### Inference Clients/UIs * [llama.cpp](https://github.com/ggerganov/llama.cpp) * [KoboldCPP](https://github.com/LostRuins/koboldcpp) * [text-generation-webui](https://github.com/oobabooga/text-generation-webui) * [ollama](https://github.com/ollama/ollama) --- # From original readme The Meta Llama 3.2 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction-tuned generative models in 1B and 3B sizes (text in/text out). The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks. **Model Developer:** Meta **Model Architecture:** Llama 3.2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. ## How to use This repository contains two versions of Llama-3.2-1B-Instruct, for use with `transformers` and with the original `llama` codebase. ### Use with transformers Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function. Make sure to update your transformers installation via `pip install --upgrade transformers`. ```python import torch from transformers import pipeline model_id = "meta-llama/Llama-3.2-1B-Instruct" pipe = pipeline( "text-generation", model=model_id, torch_dtype=torch.bfloat16, device_map="auto", ) messages = [ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"}, {"role": "user", "content": "Who are you?"}, ] outputs = pipe( messages, max_new_tokens=256, ) print(outputs[0]["generated_text"][-1]) ``` Note: You can also find detailed recipes on how to use the model locally, with `torch.compile()`, assisted generations, quantised and more at [`huggingface-llama-recipes`](https://github.com/huggingface/huggingface-llama-recipes) ### Use with `llama` Please, follow the instructions in the [repository](https://github.com/meta-llama/llama) To download Original checkpoints, see the example command below leveraging `huggingface-cli`: ``` huggingface-cli download meta-llama/Llama-3.2-1B-Instruct --include "original/*" --local-dir Llama-3.2-1B-Instruct ```
{"language": ["en"], "license": "other", "pipeline_tag": "text-generation", "tags": ["transformers", "gguf", "imatrix", "Llama-3.2-1B-Instruct"], "inference": false}
task
[ "SUMMARIZATION" ]
46,455
pt-mteb/average_fasttext_wiki.pt.align.300
pt-mteb
sentence-similarity
[ "sentence-transformers", "feature-extraction", "sentence-similarity", "pt", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-04-17T08:34:46Z
2024-04-17T08:35:19+00:00
0
0
--- language: - pt library_name: sentence-transformers pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity --- # mteb-pt/average_fasttext_wiki.pt.align.300 This is an adaptation of pre-trained Portuguese fastText Word Embeddings to a [sentence-transformers](https://www.SBERT.net) model. The original pre-trained word embeddings can be found at: [https://fasttext.cc/docs/en/aligned-vectors.html](https://fasttext.cc/docs/en/aligned-vectors.html). This model maps sentences & paragraphs to a 300 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('mteb-pt/average_fasttext_wiki.pt.align.300') embeddings = model.encode(sentences) print(embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Portuguese MTEB Leaderboard*: [mteb-pt/leaderboard](https://huggingface.co/spaces/mteb-pt/leaderboard) ## Full Model Architecture ``` SentenceTransformer( (0): WordEmbeddings( (emb_layer): Embedding(592109, 300) ) (1): Pooling({'word_embedding_dimension': 300, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Citing & Authors ```bibtex @InProceedings{joulin2018loss, title={Loss in Translation: Learning Bilingual Word Mapping with a Retrieval Criterion}, author={Joulin, Armand and Bojanowski, Piotr and Mikolov, Tomas and J'egou, Herv'e and Grave, Edouard}, year={2018}, booktitle={Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing}, } @article{bojanowski2017enriching, title={Enriching Word Vectors with Subword Information}, author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas}, journal={Transactions of the Association for Computational Linguistics}, volume={5}, year={2017}, issn={2307-387X}, pages={135--146} } ```
null
Non_BioNLP
# mteb-pt/average_fasttext_wiki.pt.align.300 This is an adaptation of pre-trained Portuguese fastText Word Embeddings to a [sentence-transformers](https://www.SBERT.net) model. The original pre-trained word embeddings can be found at: [https://fasttext.cc/docs/en/aligned-vectors.html](https://fasttext.cc/docs/en/aligned-vectors.html). This model maps sentences & paragraphs to a 300 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('mteb-pt/average_fasttext_wiki.pt.align.300') embeddings = model.encode(sentences) print(embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Portuguese MTEB Leaderboard*: [mteb-pt/leaderboard](https://huggingface.co/spaces/mteb-pt/leaderboard) ## Full Model Architecture ``` SentenceTransformer( (0): WordEmbeddings( (emb_layer): Embedding(592109, 300) ) (1): Pooling({'word_embedding_dimension': 300, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Citing & Authors ```bibtex @InProceedings{joulin2018loss, title={Loss in Translation: Learning Bilingual Word Mapping with a Retrieval Criterion}, author={Joulin, Armand and Bojanowski, Piotr and Mikolov, Tomas and J'egou, Herv'e and Grave, Edouard}, year={2018}, booktitle={Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing}, } @article{bojanowski2017enriching, title={Enriching Word Vectors with Subword Information}, author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas}, journal={Transactions of the Association for Computational Linguistics}, volume={5}, year={2017}, issn={2307-387X}, pages={135--146} } ```
{"language": ["pt"], "library_name": "sentence-transformers", "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "feature-extraction", "sentence-similarity"]}
task
[ "TRANSLATION" ]
46,456
AV10/distilbert-base-uncased-finetuned-emotion
AV10
text-classification
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "dataset:emotion", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-01-10T13:20:29Z
2023-01-10T14:15:29+00:00
12
0
--- datasets: - emotion license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: distilbert-base-uncased-finetuned-emotion results: - task: type: text-classification name: Text Classification dataset: name: emotion type: emotion config: split split: train args: split metrics: - type: accuracy value: 0.936 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-emotion This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.1529 - F1 Score: 0.9362 - Accuracy: 0.936 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | F1 Score | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:| | 0.5258 | 1.0 | 250 | 0.1909 | 0.9255 | 0.9265 | | 0.145 | 2.0 | 500 | 0.1529 | 0.9362 | 0.936 | ### Framework versions - Transformers 4.25.1 - Pytorch 1.13.0+cu116 - Datasets 2.8.0 - Tokenizers 0.13.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-emotion This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.1529 - F1 Score: 0.9362 - Accuracy: 0.936 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | F1 Score | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:| | 0.5258 | 1.0 | 250 | 0.1909 | 0.9255 | 0.9265 | | 0.145 | 2.0 | 500 | 0.1529 | 0.9362 | 0.936 | ### Framework versions - Transformers 4.25.1 - Pytorch 1.13.0+cu116 - Datasets 2.8.0 - Tokenizers 0.13.2
{"datasets": ["emotion"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert-base-uncased-finetuned-emotion", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "emotion", "type": "emotion", "config": "split", "split": "train", "args": "split"}, "metrics": [{"type": "accuracy", "value": 0.936, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,457
Helsinki-NLP/opus-mt-fi-kqn
Helsinki-NLP
translation
[ "transformers", "pytorch", "tf", "marian", "text2text-generation", "translation", "fi", "kqn", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-03-02T23:29:04Z
2023-08-16T11:34:53+00:00
45
0
--- license: apache-2.0 tags: - translation --- ### opus-mt-fi-kqn * source languages: fi * target languages: kqn * OPUS readme: [fi-kqn](https://github.com/Helsinki-NLP/OPUS-MT-train/blob/master/models/fi-kqn/README.md) * dataset: opus * model: transformer-align * pre-processing: normalization + SentencePiece * download original weights: [opus-2020-01-08.zip](https://object.pouta.csc.fi/OPUS-MT-models/fi-kqn/opus-2020-01-08.zip) * test set translations: [opus-2020-01-08.test.txt](https://object.pouta.csc.fi/OPUS-MT-models/fi-kqn/opus-2020-01-08.test.txt) * test set scores: [opus-2020-01-08.eval.txt](https://object.pouta.csc.fi/OPUS-MT-models/fi-kqn/opus-2020-01-08.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | JW300.fi.kqn | 22.3 | 0.476 |
null
Non_BioNLP
### opus-mt-fi-kqn * source languages: fi * target languages: kqn * OPUS readme: [fi-kqn](https://github.com/Helsinki-NLP/OPUS-MT-train/blob/master/models/fi-kqn/README.md) * dataset: opus * model: transformer-align * pre-processing: normalization + SentencePiece * download original weights: [opus-2020-01-08.zip](https://object.pouta.csc.fi/OPUS-MT-models/fi-kqn/opus-2020-01-08.zip) * test set translations: [opus-2020-01-08.test.txt](https://object.pouta.csc.fi/OPUS-MT-models/fi-kqn/opus-2020-01-08.test.txt) * test set scores: [opus-2020-01-08.eval.txt](https://object.pouta.csc.fi/OPUS-MT-models/fi-kqn/opus-2020-01-08.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | JW300.fi.kqn | 22.3 | 0.476 |
{"license": "apache-2.0", "tags": ["translation"]}
task
[ "TRANSLATION" ]
46,458
dslim/bert-base-NER
dslim
token-classification
[ "transformers", "pytorch", "tf", "jax", "onnx", "safetensors", "bert", "token-classification", "en", "dataset:conll2003", "arxiv:1810.04805", "license:mit", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-03-02T23:29:05Z
2024-10-08T07:51:39+00:00
5,863,014
578
--- datasets: - conll2003 language: en license: mit model-index: - name: dslim/bert-base-NER results: - task: type: token-classification name: Token Classification dataset: name: conll2003 type: conll2003 config: conll2003 split: test metrics: - type: accuracy value: 0.9118041001560013 name: Accuracy verified: true - type: precision value: 0.9211550382257732 name: Precision verified: true - type: recall value: 0.9306415698281261 name: Recall verified: true - type: f1 value: 0.9258740048459675 name: F1 verified: true - type: loss value: 0.48325642943382263 name: loss verified: true --- # bert-base-NER If my open source models have been useful to you, please consider supporting me in building small, useful AI models for everyone (and help me afford med school / help out my parents financially). Thanks! <a href="https://www.buymeacoffee.com/dslim" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a> ## Model description **bert-base-NER** is a fine-tuned BERT model that is ready to use for **Named Entity Recognition** and achieves **state-of-the-art performance** for the NER task. It has been trained to recognize four types of entities: location (LOC), organizations (ORG), person (PER) and Miscellaneous (MISC). Specifically, this model is a *bert-base-cased* model that was fine-tuned on the English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. If you'd like to use a larger BERT-large model fine-tuned on the same dataset, a [**bert-large-NER**](https://huggingface.co/dslim/bert-large-NER/) version is also available. ### Available NER models | Model Name | Description | Parameters | |-------------------|-------------|------------------| | [distilbert-NER](https://huggingface.co/dslim/distilbert-NER) **(NEW!)** | Fine-tuned DistilBERT - a smaller, faster, lighter version of BERT | 66M | | [bert-large-NER](https://huggingface.co/dslim/bert-large-NER/) | Fine-tuned bert-large-cased - larger model with slightly better performance | 340M | | [bert-base-NER](https://huggingface.co/dslim/bert-base-NER)-([uncased](https://huggingface.co/dslim/bert-base-NER-uncased)) | Fine-tuned bert-base, available in both cased and uncased versions | 110M | ## Intended uses & limitations #### How to use You can use this model with Transformers *pipeline* for NER. ```python from transformers import AutoTokenizer, AutoModelForTokenClassification from transformers import pipeline tokenizer = AutoTokenizer.from_pretrained("dslim/bert-base-NER") model = AutoModelForTokenClassification.from_pretrained("dslim/bert-base-NER") nlp = pipeline("ner", model=model, tokenizer=tokenizer) example = "My name is Wolfgang and I live in Berlin" ner_results = nlp(example) print(ner_results) ``` #### Limitations and bias This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. Furthermore, the model occassionally tags subword tokens as entities and post-processing of results may be necessary to handle those cases. ## Training data This model was fine-tuned on English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes: Abbreviation|Description -|- O|Outside of a named entity B-MISC |Beginning of a miscellaneous entity right after another miscellaneous entity I-MISC | Miscellaneous entity B-PER |Beginning of a person’s name right after another person’s name I-PER |Person’s name B-ORG |Beginning of an organization right after another organization I-ORG |organization B-LOC |Beginning of a location right after another location I-LOC |Location ### CoNLL-2003 English Dataset Statistics This dataset was derived from the Reuters corpus which consists of Reuters news stories. You can read more about how this dataset was created in the CoNLL-2003 paper. #### # of training examples per entity type Dataset|LOC|MISC|ORG|PER -|-|-|-|- Train|7140|3438|6321|6600 Dev|1837|922|1341|1842 Test|1668|702|1661|1617 #### # of articles/sentences/tokens per dataset Dataset |Articles |Sentences |Tokens -|-|-|- Train |946 |14,987 |203,621 Dev |216 |3,466 |51,362 Test |231 |3,684 |46,435 ## Training procedure This model was trained on a single NVIDIA V100 GPU with recommended hyperparameters from the [original BERT paper](https://arxiv.org/pdf/1810.04805) which trained & evaluated the model on CoNLL-2003 NER task. ## Eval results metric|dev|test -|-|- f1 |95.1 |91.3 precision |95.0 |90.7 recall |95.3 |91.9 The test metrics are a little lower than the official Google BERT results which encoded document context & experimented with CRF. More on replicating the original results [here](https://github.com/google-research/bert/issues/223). ### BibTeX entry and citation info ``` @article{DBLP:journals/corr/abs-1810-04805, author = {Jacob Devlin and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova}, title = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language Understanding}, journal = {CoRR}, volume = {abs/1810.04805}, year = {2018}, url = {http://arxiv.org/abs/1810.04805}, archivePrefix = {arXiv}, eprint = {1810.04805}, timestamp = {Tue, 30 Oct 2018 20:39:56 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1810-04805.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ``` ``` @inproceedings{tjong-kim-sang-de-meulder-2003-introduction, title = "Introduction to the {C}o{NLL}-2003 Shared Task: Language-Independent Named Entity Recognition", author = "Tjong Kim Sang, Erik F. and De Meulder, Fien", booktitle = "Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003", year = "2003", url = "https://www.aclweb.org/anthology/W03-0419", pages = "142--147", } ```
null
Non_BioNLP
# bert-base-NER If my open source models have been useful to you, please consider supporting me in building small, useful AI models for everyone (and help me afford med school / help out my parents financially). Thanks! <a href="https://www.buymeacoffee.com/dslim" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a> ## Model description **bert-base-NER** is a fine-tuned BERT model that is ready to use for **Named Entity Recognition** and achieves **state-of-the-art performance** for the NER task. It has been trained to recognize four types of entities: location (LOC), organizations (ORG), person (PER) and Miscellaneous (MISC). Specifically, this model is a *bert-base-cased* model that was fine-tuned on the English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. If you'd like to use a larger BERT-large model fine-tuned on the same dataset, a [**bert-large-NER**](https://huggingface.co/dslim/bert-large-NER/) version is also available. ### Available NER models | Model Name | Description | Parameters | |-------------------|-------------|------------------| | [distilbert-NER](https://huggingface.co/dslim/distilbert-NER) **(NEW!)** | Fine-tuned DistilBERT - a smaller, faster, lighter version of BERT | 66M | | [bert-large-NER](https://huggingface.co/dslim/bert-large-NER/) | Fine-tuned bert-large-cased - larger model with slightly better performance | 340M | | [bert-base-NER](https://huggingface.co/dslim/bert-base-NER)-([uncased](https://huggingface.co/dslim/bert-base-NER-uncased)) | Fine-tuned bert-base, available in both cased and uncased versions | 110M | ## Intended uses & limitations #### How to use You can use this model with Transformers *pipeline* for NER. ```python from transformers import AutoTokenizer, AutoModelForTokenClassification from transformers import pipeline tokenizer = AutoTokenizer.from_pretrained("dslim/bert-base-NER") model = AutoModelForTokenClassification.from_pretrained("dslim/bert-base-NER") nlp = pipeline("ner", model=model, tokenizer=tokenizer) example = "My name is Wolfgang and I live in Berlin" ner_results = nlp(example) print(ner_results) ``` #### Limitations and bias This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. Furthermore, the model occassionally tags subword tokens as entities and post-processing of results may be necessary to handle those cases. ## Training data This model was fine-tuned on English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes: Abbreviation|Description -|- O|Outside of a named entity B-MISC |Beginning of a miscellaneous entity right after another miscellaneous entity I-MISC | Miscellaneous entity B-PER |Beginning of a person’s name right after another person’s name I-PER |Person’s name B-ORG |Beginning of an organization right after another organization I-ORG |organization B-LOC |Beginning of a location right after another location I-LOC |Location ### CoNLL-2003 English Dataset Statistics This dataset was derived from the Reuters corpus which consists of Reuters news stories. You can read more about how this dataset was created in the CoNLL-2003 paper. #### # of training examples per entity type Dataset|LOC|MISC|ORG|PER -|-|-|-|- Train|7140|3438|6321|6600 Dev|1837|922|1341|1842 Test|1668|702|1661|1617 #### # of articles/sentences/tokens per dataset Dataset |Articles |Sentences |Tokens -|-|-|- Train |946 |14,987 |203,621 Dev |216 |3,466 |51,362 Test |231 |3,684 |46,435 ## Training procedure This model was trained on a single NVIDIA V100 GPU with recommended hyperparameters from the [original BERT paper](https://arxiv.org/pdf/1810.04805) which trained & evaluated the model on CoNLL-2003 NER task. ## Eval results metric|dev|test -|-|- f1 |95.1 |91.3 precision |95.0 |90.7 recall |95.3 |91.9 The test metrics are a little lower than the official Google BERT results which encoded document context & experimented with CRF. More on replicating the original results [here](https://github.com/google-research/bert/issues/223). ### BibTeX entry and citation info ``` @article{DBLP:journals/corr/abs-1810-04805, author = {Jacob Devlin and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova}, title = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language Understanding}, journal = {CoRR}, volume = {abs/1810.04805}, year = {2018}, url = {http://arxiv.org/abs/1810.04805}, archivePrefix = {arXiv}, eprint = {1810.04805}, timestamp = {Tue, 30 Oct 2018 20:39:56 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1810-04805.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ``` ``` @inproceedings{tjong-kim-sang-de-meulder-2003-introduction, title = "Introduction to the {C}o{NLL}-2003 Shared Task: Language-Independent Named Entity Recognition", author = "Tjong Kim Sang, Erik F. and De Meulder, Fien", booktitle = "Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003", year = "2003", url = "https://www.aclweb.org/anthology/W03-0419", pages = "142--147", } ```
{"datasets": ["conll2003"], "language": "en", "license": "mit", "model-index": [{"name": "dslim/bert-base-NER", "results": [{"task": {"type": "token-classification", "name": "Token Classification"}, "dataset": {"name": "conll2003", "type": "conll2003", "config": "conll2003", "split": "test"}, "metrics": [{"type": "accuracy", "value": 0.9118041001560013, "name": "Accuracy", "verified": true}, {"type": "precision", "value": 0.9211550382257732, "name": "Precision", "verified": true}, {"type": "recall", "value": 0.9306415698281261, "name": "Recall", "verified": true}, {"type": "f1", "value": 0.9258740048459675, "name": "F1", "verified": true}, {"type": "loss", "value": 0.48325642943382263, "name": "loss", "verified": true}]}]}]}
task
[ "NAMED_ENTITY_RECOGNITION" ]
46,459
ravch/fine_tuned_bge_small_en_v1.5_another_data_formate
ravch
sentence-similarity
[ "sentence-transformers", "safetensors", "bert", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:664", "loss:DenoisingAutoEncoderLoss", "arxiv:1908.10084", "arxiv:2104.06979", "base_model:BAAI/bge-small-en-v1.5", "base_model:finetune:BAAI/bge-small-en-v1.5", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-08-20T06:21:34Z
2024-08-20T06:21:53+00:00
4
0
--- base_model: BAAI/bge-small-en-v1.5 datasets: [] language: [] library_name: sentence-transformers pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:664 - loss:DenoisingAutoEncoderLoss widget: - source_sentence: of fresh for in for that,, stream_id sentences: - 'Number of functional/operational toilets for boys with disabilities or CWSN(Children with special needs) ' - 'Indicates grant for sports and physical education expenditure (in Rs) spent by the school during the financial year 2022-2023 under Samagra Shiksha, corresponding to the udise_sch_code. ' - 'Number of fresh enrollments for transgenders in class 11 for that school. corresponding to udise_sch_code, caste_id, stream_id. ' - source_sentence: Unique each associated . This in and. sentences: - 'classes in which language 3 i.e (''lang3'' column) is taught as a subject. Its a comma seperated value. ' - 'Unique identifier code each school, associated with school_name in sch_master table. This can be joined with udise_sch_code in sch_profile and sch_facility tables. ' - 'Number of assessments happened for primary section/school ' - source_sentence: urinals sentences: - 'Unique identifier code for the schools providing vocational courses under nsqf and where sectors are available, associated with school name in sch_master table. This can be joined with udise_sch_code in sch_profile and sch_facility tables. ' - 'Indicates whether there is a reading corner/space/room in school. Can only be [''Yes'',''No''] ' - 'Number of functional/operational urinals for boys ' - source_sentence: total of in-service training by of that from district and training) the tch_code_state sentences: - 'Indicates total days of in-service training received by the teacher of that school from district institute of education and training(diet), corresponding to the udise_sch_code, tch_name, tch_code_state. ' - 'Unique identifier code for each school. This column is crucial for aggregating or analyzing data at the school level, such as school-wise attendance, performance metrics, or demographic information. ' - 'Indicates whether it is a special school, specifically for disabled students. Is school CWSN ( Children with Special Needs ). This can only be one of 2 values:[''Yes'',''No''] ' - source_sentence: The teacher_id column . This essential related teacher absenteeism or will column sentences: - 'Indicates Urban local body ID as per LGD - Local Government Directory where the school is present, related to ''lgd_urban_local_body_name'' ' - 'Number of pucca classrooms in good condition in school ' - 'The teacher_id column is a unique identifier used to represent individual teachers. This column is essential for retrieving teacher-specific information.Queries related to teacher attendance, absenteeism, or any teacher-level analysis will likely require this column. ' --- # SentenceTransformer based on BAAI/bge-small-en-v1.5 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). It maps sentences & paragraphs to a 384-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:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 384 tokens - **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': 512, 'do_lower_case': True}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("ravch/fine_tuned_bge_small_en_v1.5_another_data_formate") # Run inference sentences = [ 'The teacher_id column . This essential related teacher absenteeism or will column', 'The teacher_id column is a unique identifier used to represent individual teachers. This column is essential for retrieving teacher-specific information.Queries related to teacher attendance, absenteeism, or any teacher-level analysis will likely require this column. ', "Indicates Urban local body ID as per LGD - Local Government Directory where the school is present, related to 'lgd_urban_local_body_name' ", ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 384] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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 ### Training Dataset #### Unnamed Dataset * Size: 664 training samples * Columns: <code>sentence_0</code> and <code>sentence_1</code> * Approximate statistics based on the first 1000 samples: | | sentence_0 | sentence_1 | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 3 tokens</li><li>mean: 15.88 tokens</li><li>max: 127 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 36.37 tokens</li><li>max: 311 tokens</li></ul> | * Samples: | sentence_0 | sentence_1 | |:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Number of Girls Defense</code> | <code>Number of Girls Student provided Self Defense training </code> | | <code>whether is While filtering, must 0 (int active.</code> | <code>Indicate whether school is active or inactive. While filtering only consider active schools, but When asked for total schools must consider active and inactive schools. 0(int) indicates active schools. </code> | | <code>classes in which language i.e 'lang2 as a subject a comma seperated</code> | <code>classes in which language 2 i.e ('lang2' column) is taught as a subject. Its a comma seperated value. </code> | * Loss: [<code>DenoisingAutoEncoderLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#denoisingautoencoderloss) ### Training Hyperparameters #### Non-Default Hyperparameters - `num_train_epochs`: 50 - `multi_dataset_batch_sampler`: round_robin #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: no - `prediction_loss_only`: True - `per_device_train_batch_size`: 8 - `per_device_eval_batch_size`: 8 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 5e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1 - `num_train_epochs`: 50 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.0 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: round_robin </details> ### Training Logs | Epoch | Step | Training Loss | |:-------:|:----:|:-------------:| | 6.0241 | 500 | 2.0771 | | 12.0482 | 1000 | 0.4663 | | 18.0723 | 1500 | 0.2979 | | 24.0964 | 2000 | 0.2476 | | 30.1205 | 2500 | 0.2341 | | 36.1446 | 3000 | 0.2321 | | 42.1687 | 3500 | 0.2116 | | 48.1928 | 4000 | 0.2012 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.42.4 - PyTorch: 2.3.1+cu121 - Accelerate: 0.32.1 - Datasets: 2.21.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### DenoisingAutoEncoderLoss ```bibtex @inproceedings{wang-2021-TSDAE, title = "TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning", author = "Wang, Kexin and Reimers, Nils and Gurevych, Iryna", booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021", month = nov, year = "2021", address = "Punta Cana, Dominican Republic", publisher = "Association for Computational Linguistics", pages = "671--688", url = "https://arxiv.org/abs/2104.06979", } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SentenceTransformer based on BAAI/bge-small-en-v1.5 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). It maps sentences & paragraphs to a 384-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:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 384 tokens - **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': 512, 'do_lower_case': True}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("ravch/fine_tuned_bge_small_en_v1.5_another_data_formate") # Run inference sentences = [ 'The teacher_id column . This essential related teacher absenteeism or will column', 'The teacher_id column is a unique identifier used to represent individual teachers. This column is essential for retrieving teacher-specific information.Queries related to teacher attendance, absenteeism, or any teacher-level analysis will likely require this column. ', "Indicates Urban local body ID as per LGD - Local Government Directory where the school is present, related to 'lgd_urban_local_body_name' ", ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 384] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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 ### Training Dataset #### Unnamed Dataset * Size: 664 training samples * Columns: <code>sentence_0</code> and <code>sentence_1</code> * Approximate statistics based on the first 1000 samples: | | sentence_0 | sentence_1 | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 3 tokens</li><li>mean: 15.88 tokens</li><li>max: 127 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 36.37 tokens</li><li>max: 311 tokens</li></ul> | * Samples: | sentence_0 | sentence_1 | |:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Number of Girls Defense</code> | <code>Number of Girls Student provided Self Defense training </code> | | <code>whether is While filtering, must 0 (int active.</code> | <code>Indicate whether school is active or inactive. While filtering only consider active schools, but When asked for total schools must consider active and inactive schools. 0(int) indicates active schools. </code> | | <code>classes in which language i.e 'lang2 as a subject a comma seperated</code> | <code>classes in which language 2 i.e ('lang2' column) is taught as a subject. Its a comma seperated value. </code> | * Loss: [<code>DenoisingAutoEncoderLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#denoisingautoencoderloss) ### Training Hyperparameters #### Non-Default Hyperparameters - `num_train_epochs`: 50 - `multi_dataset_batch_sampler`: round_robin #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: no - `prediction_loss_only`: True - `per_device_train_batch_size`: 8 - `per_device_eval_batch_size`: 8 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 5e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1 - `num_train_epochs`: 50 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.0 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: round_robin </details> ### Training Logs | Epoch | Step | Training Loss | |:-------:|:----:|:-------------:| | 6.0241 | 500 | 2.0771 | | 12.0482 | 1000 | 0.4663 | | 18.0723 | 1500 | 0.2979 | | 24.0964 | 2000 | 0.2476 | | 30.1205 | 2500 | 0.2341 | | 36.1446 | 3000 | 0.2321 | | 42.1687 | 3500 | 0.2116 | | 48.1928 | 4000 | 0.2012 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.42.4 - PyTorch: 2.3.1+cu121 - Accelerate: 0.32.1 - Datasets: 2.21.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### DenoisingAutoEncoderLoss ```bibtex @inproceedings{wang-2021-TSDAE, title = "TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning", author = "Wang, Kexin and Reimers, Nils and Gurevych, Iryna", booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021", month = nov, year = "2021", address = "Punta Cana, Dominican Republic", publisher = "Association for Computational Linguistics", pages = "671--688", url = "https://arxiv.org/abs/2104.06979", } ``` <!-- ## 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.* -->
{"base_model": "BAAI/bge-small-en-v1.5", "datasets": [], "language": [], "library_name": "sentence-transformers", "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:664", "loss:DenoisingAutoEncoderLoss"], "widget": [{"source_sentence": "of fresh for in for that,, stream_id", "sentences": ["Number of functional/operational toilets for boys with disabilities or CWSN(Children with special needs) ", "Indicates grant for sports and physical education expenditure (in Rs) spent by the school during the financial year 2022-2023 under Samagra Shiksha, corresponding to the udise_sch_code. ", "Number of fresh enrollments for transgenders in class 11 for that school. corresponding to udise_sch_code, caste_id, stream_id. "]}, {"source_sentence": "Unique each associated . This in and.", "sentences": ["classes in which language 3 i.e ('lang3' column) is taught as a subject. Its a comma seperated value. ", "Unique identifier code each school, associated with school_name in sch_master table. This can be joined with udise_sch_code in sch_profile and sch_facility tables. ", "Number of assessments happened for primary section/school "]}, {"source_sentence": "urinals", "sentences": ["Unique identifier code for the schools providing vocational courses under nsqf and where sectors are available, associated with school name in sch_master table. This can be joined with udise_sch_code in sch_profile and sch_facility tables. ", "Indicates whether there is a reading corner/space/room in school. Can only be ['Yes','No'] ", "Number of functional/operational urinals for boys "]}, {"source_sentence": "total of in-service training by of that from district and training) the tch_code_state", "sentences": ["Indicates total days of in-service training received by the teacher of that school from district institute of education and training(diet), corresponding to the udise_sch_code, tch_name, tch_code_state. ", "Unique identifier code for each school. This column is crucial for aggregating or analyzing data at the school level, such as school-wise attendance, performance metrics, or demographic information. ", "Indicates whether it is a special school, specifically for disabled students. Is school CWSN ( Children with Special Needs ). This can only be one of 2 values:['Yes','No'] "]}, {"source_sentence": "The teacher_id column . This essential related teacher absenteeism or will column", "sentences": ["Indicates Urban local body ID as per LGD - Local Government Directory where the school is present, related to 'lgd_urban_local_body_name' ", "Number of pucca classrooms in good condition in school ", "The teacher_id column is a unique identifier used to represent individual teachers. This column is essential for retrieving teacher-specific information.Queries related to teacher attendance, absenteeism, or any teacher-level analysis will likely require this column. "]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,460
AdapterHub/roberta-base-pf-quoref
AdapterHub
question-answering
[ "adapter-transformers", "question-answering", "roberta", "en", "dataset:quoref", "arxiv:2104.08247", "region:us" ]
2022-03-02T23:29:04Z
2021-11-15T10:41:24+00:00
2
0
--- datasets: - quoref language: - en tags: - question-answering - roberta - adapter-transformers --- # Adapter `AdapterHub/roberta-base-pf-quoref` for roberta-base An [adapter](https://adapterhub.ml) for the `roberta-base` model that was trained on the [quoref](https://huggingface.co/datasets/quoref/) dataset and includes a prediction head for question answering. This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library. ## Usage First, install `adapter-transformers`: ``` pip install -U adapter-transformers ``` _Note: adapter-transformers is a fork of transformers that acts as a drop-in replacement with adapter support. [More](https://docs.adapterhub.ml/installation.html)_ Now, the adapter can be loaded and activated like this: ```python from transformers import AutoModelWithHeads model = AutoModelWithHeads.from_pretrained("roberta-base") adapter_name = model.load_adapter("AdapterHub/roberta-base-pf-quoref", source="hf") model.active_adapters = adapter_name ``` ## Architecture & Training The training code for this adapter is available at https://github.com/adapter-hub/efficient-task-transfer. In particular, training configurations for all tasks can be found [here](https://github.com/adapter-hub/efficient-task-transfer/tree/master/run_configs). ## Evaluation results Refer to [the paper](https://arxiv.org/pdf/2104.08247) for more information on results. ## Citation If you use this adapter, please cite our paper ["What to Pre-Train on? Efficient Intermediate Task Selection"](https://arxiv.org/pdf/2104.08247): ```bibtex @inproceedings{poth-etal-2021-pre, title = "{W}hat to Pre-Train on? {E}fficient Intermediate Task Selection", author = {Poth, Clifton and Pfeiffer, Jonas and R{"u}ckl{'e}, Andreas and Gurevych, Iryna}, booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing", month = nov, year = "2021", address = "Online and Punta Cana, Dominican Republic", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2021.emnlp-main.827", pages = "10585--10605", } ```
null
Non_BioNLP
# Adapter `AdapterHub/roberta-base-pf-quoref` for roberta-base An [adapter](https://adapterhub.ml) for the `roberta-base` model that was trained on the [quoref](https://huggingface.co/datasets/quoref/) dataset and includes a prediction head for question answering. This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library. ## Usage First, install `adapter-transformers`: ``` pip install -U adapter-transformers ``` _Note: adapter-transformers is a fork of transformers that acts as a drop-in replacement with adapter support. [More](https://docs.adapterhub.ml/installation.html)_ Now, the adapter can be loaded and activated like this: ```python from transformers import AutoModelWithHeads model = AutoModelWithHeads.from_pretrained("roberta-base") adapter_name = model.load_adapter("AdapterHub/roberta-base-pf-quoref", source="hf") model.active_adapters = adapter_name ``` ## Architecture & Training The training code for this adapter is available at https://github.com/adapter-hub/efficient-task-transfer. In particular, training configurations for all tasks can be found [here](https://github.com/adapter-hub/efficient-task-transfer/tree/master/run_configs). ## Evaluation results Refer to [the paper](https://arxiv.org/pdf/2104.08247) for more information on results. ## Citation If you use this adapter, please cite our paper ["What to Pre-Train on? Efficient Intermediate Task Selection"](https://arxiv.org/pdf/2104.08247): ```bibtex @inproceedings{poth-etal-2021-pre, title = "{W}hat to Pre-Train on? {E}fficient Intermediate Task Selection", author = {Poth, Clifton and Pfeiffer, Jonas and R{"u}ckl{'e}, Andreas and Gurevych, Iryna}, booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing", month = nov, year = "2021", address = "Online and Punta Cana, Dominican Republic", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2021.emnlp-main.827", pages = "10585--10605", } ```
{"datasets": ["quoref"], "language": ["en"], "tags": ["question-answering", "roberta", "adapter-transformers"]}
task
[ "QUESTION_ANSWERING" ]
46,461
anudit/finetuned-gte-base
anudit
sentence-similarity
[ "sentence-transformers", "onnx", "safetensors", "new", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:32833", "loss:MatryoshkaLoss", "loss:MultipleNegativesRankingLoss", "custom_code", "en", "arxiv:1908.10084", "arxiv:2205.13147", "arxiv:1705.00652", "base_model:Alibaba-NLP/gte-base-en-v1.5", "base_model:quantized:Alibaba-NLP/gte-base-en-v1.5", "license:apache-2.0", "model-index", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-10-01T13:17:33Z
2024-10-02T12:00:11+00:00
27
0
--- base_model: Alibaba-NLP/gte-base-en-v1.5 language: - en library_name: sentence-transformers license: apache-2.0 metrics: - cosine_accuracy@1 - cosine_accuracy@3 - cosine_accuracy@5 - cosine_accuracy@10 - cosine_precision@1 - cosine_precision@3 - cosine_precision@5 - cosine_precision@10 - cosine_recall@1 - cosine_recall@3 - cosine_recall@5 - cosine_recall@10 - cosine_ndcg@10 - cosine_mrr@10 - cosine_map@100 pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:32833 - loss:MatryoshkaLoss - loss:MultipleNegativesRankingLoss widget: - source_sentence: Anonymity in online interactions can lead to a disinhibition effect, where individuals feel free to express hostile or aggressive opinions they might otherwise suppress. sentences: - What are the implications of anonymity in online interactions? - How does creativity function as a form of costly signalling in personal expressions such as invitations? - Why is conflict considered essential in a creative organization? - source_sentence: The author decides to release their novel into the world despite its imperfections, and finds that this allows them to move on to new projects and experiences, and to focus on the value of the work itself rather than its flaws. sentences: - How does the author's experience with their novel illustrate the concept of 'embracing imperfection' in creative work? - What does the author mean by 'ambitious programmers are better off doing their own thing'? - What is the role of 'show me' in the design process? - source_sentence: Tokens become more valuable as more users adopt them, creating a positive feedback loop that enhances their utility and encourages further adoption across various applications. sentences: - In what ways do tokens exhibit network effects? - What can sometimes be found when considering a startup with a lame-sounding idea? - How do social norms influence decision-making in the context of airport choices? - source_sentence: Philosophers are often viewed as the guardians of critical thinking; however, their reliance on bureaucratic structures and abstract discussions can become problematic. Instead of fostering open-mindedness, they may perpetuate dogmatic thinking and limit the exploration of diverse perspectives, thereby failing to fulfill their duty of promoting genuine critical engagement. sentences: - In what ways can the role of philosophers be seen as essential or problematic within the context of critical thinking? - How does the evolution of pair-bonding facilitate cultural exchange between groups? - What is the role of autonomy in the success of acquired startups? - source_sentence: Society tends to admire those who despair when others hope, viewing them as sages or wise figures. sentences: - What is often the societal perception of those who express pessimism about the future? - How did the realization about user engagement influence the app development strategy? - What lessons can be learned from the historical context of employee relations in large corporations? model-index: - name: Alchemy Embedding - Anudit Nagar results: - task: type: information-retrieval name: Information Retrieval dataset: name: dim 768 type: dim_768 metrics: - type: cosine_accuracy@1 value: 0.782012613106663 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8889498217713189 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.9248697559638058 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9520153550863724 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.782012613106663 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.29631660725710623 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.1849739511927612 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09520153550863725 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.782012613106663 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8889498217713189 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.9248697559638058 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9520153550863724 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.867555587052628 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.8402608580220322 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.8422322227138224 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 512 type: dim_512 metrics: - type: cosine_accuracy@1 value: 0.780367425281053 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8848368522072937 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.9221277762544557 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9514669591445023 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.780367425281053 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2949456174024312 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.1844255552508912 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09514669591445023 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.780367425281053 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8848368522072937 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.9221277762544557 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9514669591445023 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.8661558392165704 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.838656038231032 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.8405372438205077 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 256 type: dim_256 metrics: - type: cosine_accuracy@1 value: 0.7754318618042226 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8804496846723334 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.9169180148066904 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9468055936386071 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.7754318618042226 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2934832282241111 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.18338360296133807 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09468055936386072 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.7754318618042226 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8804496846723334 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.9169180148066904 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9468055936386071 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.8613819477350178 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.8338379881703168 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.8360735900013385 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 128 type: dim_128 metrics: - type: cosine_accuracy@1 value: 0.7617219632574719 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.871675349602413 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.9117082533589251 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9418700301617768 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.7617219632574719 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2905584498674709 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.18234165067178504 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09418700301617768 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.7617219632574719 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.871675349602413 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.9117082533589251 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9418700301617768 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.851649908463093 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.8225671458602635 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.8248455884524328 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 64 type: dim_64 metrics: - type: cosine_accuracy@1 value: 0.7408829174664108 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.853852481491637 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8936111872772141 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9292569234987661 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.7408829174664108 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.28461749383054563 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.17872223745544283 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.0929256923498766 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.7408829174664108 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.853852481491637 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8936111872772141 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9292569234987661 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.8338956659320366 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.8033378162525404 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.8057702637208689 name: Cosine Map@100 --- # Alchemy Embedding - Anudit Nagar This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Alibaba-NLP/gte-base-en-v1.5](https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5) on the json dataset. It maps sentences & paragraphs to a 768-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:** [Alibaba-NLP/gte-base-en-v1.5](https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5) <!-- at revision a8e4f3e0ee719c75bc30d12b8eae0f8440502718 --> - **Maximum Sequence Length:** 8192 tokens - **Output Dimensionality:** 768 tokens - **Similarity Function:** Cosine Similarity - **Training Dataset:** - json - **Language:** en - **License:** apache-2.0 ### 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': 8192, 'do_lower_case': False}) with Transformer model: NewModel (1): Pooling({'word_embedding_dimension': 768, '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}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("sentence_transformers_model_id") # Run inference sentences = [ 'Society tends to admire those who despair when others hope, viewing them as sages or wise figures.', 'What is often the societal perception of those who express pessimism about the future?', 'How did the realization about user engagement influence the app development strategy?', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Dataset: `dim_768` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.782 | | cosine_accuracy@3 | 0.8889 | | cosine_accuracy@5 | 0.9249 | | cosine_accuracy@10 | 0.952 | | cosine_precision@1 | 0.782 | | cosine_precision@3 | 0.2963 | | cosine_precision@5 | 0.185 | | cosine_precision@10 | 0.0952 | | cosine_recall@1 | 0.782 | | cosine_recall@3 | 0.8889 | | cosine_recall@5 | 0.9249 | | cosine_recall@10 | 0.952 | | cosine_ndcg@10 | 0.8676 | | cosine_mrr@10 | 0.8403 | | **cosine_map@100** | **0.8422** | #### Information Retrieval * Dataset: `dim_512` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7804 | | cosine_accuracy@3 | 0.8848 | | cosine_accuracy@5 | 0.9221 | | cosine_accuracy@10 | 0.9515 | | cosine_precision@1 | 0.7804 | | cosine_precision@3 | 0.2949 | | cosine_precision@5 | 0.1844 | | cosine_precision@10 | 0.0951 | | cosine_recall@1 | 0.7804 | | cosine_recall@3 | 0.8848 | | cosine_recall@5 | 0.9221 | | cosine_recall@10 | 0.9515 | | cosine_ndcg@10 | 0.8662 | | cosine_mrr@10 | 0.8387 | | **cosine_map@100** | **0.8405** | #### Information Retrieval * Dataset: `dim_256` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7754 | | cosine_accuracy@3 | 0.8804 | | cosine_accuracy@5 | 0.9169 | | cosine_accuracy@10 | 0.9468 | | cosine_precision@1 | 0.7754 | | cosine_precision@3 | 0.2935 | | cosine_precision@5 | 0.1834 | | cosine_precision@10 | 0.0947 | | cosine_recall@1 | 0.7754 | | cosine_recall@3 | 0.8804 | | cosine_recall@5 | 0.9169 | | cosine_recall@10 | 0.9468 | | cosine_ndcg@10 | 0.8614 | | cosine_mrr@10 | 0.8338 | | **cosine_map@100** | **0.8361** | #### Information Retrieval * Dataset: `dim_128` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7617 | | cosine_accuracy@3 | 0.8717 | | cosine_accuracy@5 | 0.9117 | | cosine_accuracy@10 | 0.9419 | | cosine_precision@1 | 0.7617 | | cosine_precision@3 | 0.2906 | | cosine_precision@5 | 0.1823 | | cosine_precision@10 | 0.0942 | | cosine_recall@1 | 0.7617 | | cosine_recall@3 | 0.8717 | | cosine_recall@5 | 0.9117 | | cosine_recall@10 | 0.9419 | | cosine_ndcg@10 | 0.8516 | | cosine_mrr@10 | 0.8226 | | **cosine_map@100** | **0.8248** | #### Information Retrieval * Dataset: `dim_64` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7409 | | cosine_accuracy@3 | 0.8539 | | cosine_accuracy@5 | 0.8936 | | cosine_accuracy@10 | 0.9293 | | cosine_precision@1 | 0.7409 | | cosine_precision@3 | 0.2846 | | cosine_precision@5 | 0.1787 | | cosine_precision@10 | 0.0929 | | cosine_recall@1 | 0.7409 | | cosine_recall@3 | 0.8539 | | cosine_recall@5 | 0.8936 | | cosine_recall@10 | 0.9293 | | cosine_ndcg@10 | 0.8339 | | cosine_mrr@10 | 0.8033 | | **cosine_map@100** | **0.8058** | <!-- ## 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 ### Training Dataset #### json * Dataset: json * Size: 32,833 training samples * Columns: <code>positive</code> and <code>anchor</code> * Approximate statistics based on the first 1000 samples: | | positive | anchor | |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 3 tokens</li><li>mean: 34.54 tokens</li><li>max: 102 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 16.78 tokens</li><li>max: 77 tokens</li></ul> | * Samples: | positive | anchor | |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------| | <code>The author saw taking risks as a necessary part of the creative process, and was willing to take risks in order to explore new ideas and themes.</code> | <code>What was the author's perspective on the importance of taking risks in creative work?</code> | | <code>Recognizing that older users are less likely to invite new users led to a strategic focus on younger demographics, prompting a shift in development efforts toward creating products that resonate with teens.</code> | <code>How did the realization about user engagement influence the app development strategy?</code> | | <code>The phrase emphasizes the fragility of Earth and our collective responsibility to protect it and ensure sustainable resource management for future generations.</code> | <code>What is the significance of the phrase 'pale blue dot' in relation to environmental responsibility?</code> | * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters: ```json { "loss": "MultipleNegativesRankingLoss", "matryoshka_dims": [ 768, 512, 256, 128, 64 ], "matryoshka_weights": [ 1, 1, 1, 1, 1 ], "n_dims_per_step": -1 } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: epoch - `per_device_train_batch_size`: 24 - `per_device_eval_batch_size`: 24 - `gradient_accumulation_steps`: 8 - `learning_rate`: 2e-05 - `num_train_epochs`: 4 - `lr_scheduler_type`: cosine - `warmup_ratio`: 0.1 - `bf16`: True - `load_best_model_at_end`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: epoch - `prediction_loss_only`: True - `per_device_train_batch_size`: 24 - `per_device_eval_batch_size`: 24 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 8 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 4 - `max_steps`: -1 - `lr_scheduler_type`: cosine - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: True - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: True - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `eval_use_gather_object`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 | |:----------:|:-------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:| | 0.0584 | 10 | 0.8567 | - | - | - | - | - | | 0.1169 | 20 | 0.6549 | - | - | - | - | - | | 0.1753 | 30 | 0.5407 | - | - | - | - | - | | 0.2337 | 40 | 0.4586 | - | - | - | - | - | | 0.2922 | 50 | 0.3914 | - | - | - | - | - | | 0.3506 | 60 | 0.4104 | - | - | - | - | - | | 0.4091 | 70 | 0.299 | - | - | - | - | - | | 0.4675 | 80 | 0.2444 | - | - | - | - | - | | 0.5259 | 90 | 0.2367 | - | - | - | - | - | | 0.5844 | 100 | 0.2302 | - | - | - | - | - | | 0.6428 | 110 | 0.2356 | - | - | - | - | - | | 0.7012 | 120 | 0.1537 | - | - | - | - | - | | 0.7597 | 130 | 0.2043 | - | - | - | - | - | | 0.8181 | 140 | 0.1606 | - | - | - | - | - | | 0.8766 | 150 | 0.1896 | - | - | - | - | - | | 0.9350 | 160 | 0.1766 | - | - | - | - | - | | 0.9934 | 170 | 0.1259 | - | - | - | - | - | | 0.9993 | 171 | - | 0.8115 | 0.8233 | 0.8321 | 0.7829 | 0.8340 | | 1.0519 | 180 | 0.1661 | - | - | - | - | - | | 1.1103 | 190 | 0.1632 | - | - | - | - | - | | 1.1687 | 200 | 0.1032 | - | - | - | - | - | | 1.2272 | 210 | 0.1037 | - | - | - | - | - | | 1.2856 | 220 | 0.0708 | - | - | - | - | - | | 1.3440 | 230 | 0.0827 | - | - | - | - | - | | 1.4025 | 240 | 0.0505 | - | - | - | - | - | | 1.4609 | 250 | 0.0468 | - | - | - | - | - | | 1.5194 | 260 | 0.0371 | - | - | - | - | - | | 1.5778 | 270 | 0.049 | - | - | - | - | - | | 1.6362 | 280 | 0.0527 | - | - | - | - | - | | 1.6947 | 290 | 0.0316 | - | - | - | - | - | | 1.7531 | 300 | 0.052 | - | - | - | - | - | | 1.8115 | 310 | 0.0298 | - | - | - | - | - | | 1.8700 | 320 | 0.0334 | - | - | - | - | - | | 1.9284 | 330 | 0.0431 | - | - | - | - | - | | 1.9869 | 340 | 0.0316 | - | - | - | - | - | | 1.9985 | 342 | - | 0.8216 | 0.8342 | 0.8397 | 0.8006 | 0.8408 | | 2.0453 | 350 | 0.0275 | - | - | - | - | - | | 2.1037 | 360 | 0.0461 | - | - | - | - | - | | 2.1622 | 370 | 0.0341 | - | - | - | - | - | | 2.2206 | 380 | 0.0323 | - | - | - | - | - | | 2.2790 | 390 | 0.0205 | - | - | - | - | - | | 2.3375 | 400 | 0.0223 | - | - | - | - | - | | 2.3959 | 410 | 0.0189 | - | - | - | - | - | | 2.4543 | 420 | 0.0181 | - | - | - | - | - | | 2.5128 | 430 | 0.0144 | - | - | - | - | - | | 2.5712 | 440 | 0.0179 | - | - | - | - | - | | 2.6297 | 450 | 0.0217 | - | - | - | - | - | | 2.6881 | 460 | 0.016 | - | - | - | - | - | | 2.7465 | 470 | 0.0143 | - | - | - | - | - | | 2.8050 | 480 | 0.0193 | - | - | - | - | - | | 2.8634 | 490 | 0.0183 | - | - | - | - | - | | 2.9218 | 500 | 0.0171 | - | - | - | - | - | | 2.9803 | 510 | 0.0195 | - | - | - | - | - | | 2.9978 | 513 | - | 0.8242 | 0.8350 | 0.8409 | 0.8051 | 0.8413 | | 3.0387 | 520 | 0.0127 | - | - | - | - | - | | 3.0972 | 530 | 0.0261 | - | - | - | - | - | | 3.1556 | 540 | 0.017 | - | - | - | - | - | | 3.2140 | 550 | 0.0198 | - | - | - | - | - | | 3.2725 | 560 | 0.0131 | - | - | - | - | - | | 3.3309 | 570 | 0.0156 | - | - | - | - | - | | 3.3893 | 580 | 0.0107 | - | - | - | - | - | | 3.4478 | 590 | 0.0123 | - | - | - | - | - | | 3.5062 | 600 | 0.0111 | - | - | - | - | - | | 3.5646 | 610 | 0.0112 | - | - | - | - | - | | 3.6231 | 620 | 0.0143 | - | - | - | - | - | | 3.6815 | 630 | 0.013 | - | - | - | - | - | | 3.7400 | 640 | 0.0105 | - | - | - | - | - | | 3.7984 | 650 | 0.0126 | - | - | - | - | - | | 3.8568 | 660 | 0.0118 | - | - | - | - | - | | 3.9153 | 670 | 0.0163 | - | - | - | - | - | | 3.9737 | 680 | 0.0187 | - | - | - | - | - | | **3.9971** | **684** | **-** | **0.8248** | **0.8361** | **0.8405** | **0.8058** | **0.8422** | * The bold row denotes the saved checkpoint. ### Framework Versions - Python: 3.12.5 - Sentence Transformers: 3.1.1 - Transformers: 4.44.2 - PyTorch: 2.4.1 - Accelerate: 0.33.0 - Datasets: 2.21.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MatryoshkaLoss ```bibtex @misc{kusupati2024matryoshka, title={Matryoshka Representation Learning}, author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi}, year={2024}, eprint={2205.13147}, archivePrefix={arXiv}, primaryClass={cs.LG} } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
null
Non_BioNLP
# Alchemy Embedding - Anudit Nagar This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Alibaba-NLP/gte-base-en-v1.5](https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5) on the json dataset. It maps sentences & paragraphs to a 768-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:** [Alibaba-NLP/gte-base-en-v1.5](https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5) <!-- at revision a8e4f3e0ee719c75bc30d12b8eae0f8440502718 --> - **Maximum Sequence Length:** 8192 tokens - **Output Dimensionality:** 768 tokens - **Similarity Function:** Cosine Similarity - **Training Dataset:** - json - **Language:** en - **License:** apache-2.0 ### 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': 8192, 'do_lower_case': False}) with Transformer model: NewModel (1): Pooling({'word_embedding_dimension': 768, '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}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("sentence_transformers_model_id") # Run inference sentences = [ 'Society tends to admire those who despair when others hope, viewing them as sages or wise figures.', 'What is often the societal perception of those who express pessimism about the future?', 'How did the realization about user engagement influence the app development strategy?', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Dataset: `dim_768` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.782 | | cosine_accuracy@3 | 0.8889 | | cosine_accuracy@5 | 0.9249 | | cosine_accuracy@10 | 0.952 | | cosine_precision@1 | 0.782 | | cosine_precision@3 | 0.2963 | | cosine_precision@5 | 0.185 | | cosine_precision@10 | 0.0952 | | cosine_recall@1 | 0.782 | | cosine_recall@3 | 0.8889 | | cosine_recall@5 | 0.9249 | | cosine_recall@10 | 0.952 | | cosine_ndcg@10 | 0.8676 | | cosine_mrr@10 | 0.8403 | | **cosine_map@100** | **0.8422** | #### Information Retrieval * Dataset: `dim_512` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7804 | | cosine_accuracy@3 | 0.8848 | | cosine_accuracy@5 | 0.9221 | | cosine_accuracy@10 | 0.9515 | | cosine_precision@1 | 0.7804 | | cosine_precision@3 | 0.2949 | | cosine_precision@5 | 0.1844 | | cosine_precision@10 | 0.0951 | | cosine_recall@1 | 0.7804 | | cosine_recall@3 | 0.8848 | | cosine_recall@5 | 0.9221 | | cosine_recall@10 | 0.9515 | | cosine_ndcg@10 | 0.8662 | | cosine_mrr@10 | 0.8387 | | **cosine_map@100** | **0.8405** | #### Information Retrieval * Dataset: `dim_256` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7754 | | cosine_accuracy@3 | 0.8804 | | cosine_accuracy@5 | 0.9169 | | cosine_accuracy@10 | 0.9468 | | cosine_precision@1 | 0.7754 | | cosine_precision@3 | 0.2935 | | cosine_precision@5 | 0.1834 | | cosine_precision@10 | 0.0947 | | cosine_recall@1 | 0.7754 | | cosine_recall@3 | 0.8804 | | cosine_recall@5 | 0.9169 | | cosine_recall@10 | 0.9468 | | cosine_ndcg@10 | 0.8614 | | cosine_mrr@10 | 0.8338 | | **cosine_map@100** | **0.8361** | #### Information Retrieval * Dataset: `dim_128` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7617 | | cosine_accuracy@3 | 0.8717 | | cosine_accuracy@5 | 0.9117 | | cosine_accuracy@10 | 0.9419 | | cosine_precision@1 | 0.7617 | | cosine_precision@3 | 0.2906 | | cosine_precision@5 | 0.1823 | | cosine_precision@10 | 0.0942 | | cosine_recall@1 | 0.7617 | | cosine_recall@3 | 0.8717 | | cosine_recall@5 | 0.9117 | | cosine_recall@10 | 0.9419 | | cosine_ndcg@10 | 0.8516 | | cosine_mrr@10 | 0.8226 | | **cosine_map@100** | **0.8248** | #### Information Retrieval * Dataset: `dim_64` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7409 | | cosine_accuracy@3 | 0.8539 | | cosine_accuracy@5 | 0.8936 | | cosine_accuracy@10 | 0.9293 | | cosine_precision@1 | 0.7409 | | cosine_precision@3 | 0.2846 | | cosine_precision@5 | 0.1787 | | cosine_precision@10 | 0.0929 | | cosine_recall@1 | 0.7409 | | cosine_recall@3 | 0.8539 | | cosine_recall@5 | 0.8936 | | cosine_recall@10 | 0.9293 | | cosine_ndcg@10 | 0.8339 | | cosine_mrr@10 | 0.8033 | | **cosine_map@100** | **0.8058** | <!-- ## 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 ### Training Dataset #### json * Dataset: json * Size: 32,833 training samples * Columns: <code>positive</code> and <code>anchor</code> * Approximate statistics based on the first 1000 samples: | | positive | anchor | |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 3 tokens</li><li>mean: 34.54 tokens</li><li>max: 102 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 16.78 tokens</li><li>max: 77 tokens</li></ul> | * Samples: | positive | anchor | |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------| | <code>The author saw taking risks as a necessary part of the creative process, and was willing to take risks in order to explore new ideas and themes.</code> | <code>What was the author's perspective on the importance of taking risks in creative work?</code> | | <code>Recognizing that older users are less likely to invite new users led to a strategic focus on younger demographics, prompting a shift in development efforts toward creating products that resonate with teens.</code> | <code>How did the realization about user engagement influence the app development strategy?</code> | | <code>The phrase emphasizes the fragility of Earth and our collective responsibility to protect it and ensure sustainable resource management for future generations.</code> | <code>What is the significance of the phrase 'pale blue dot' in relation to environmental responsibility?</code> | * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters: ```json { "loss": "MultipleNegativesRankingLoss", "matryoshka_dims": [ 768, 512, 256, 128, 64 ], "matryoshka_weights": [ 1, 1, 1, 1, 1 ], "n_dims_per_step": -1 } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: epoch - `per_device_train_batch_size`: 24 - `per_device_eval_batch_size`: 24 - `gradient_accumulation_steps`: 8 - `learning_rate`: 2e-05 - `num_train_epochs`: 4 - `lr_scheduler_type`: cosine - `warmup_ratio`: 0.1 - `bf16`: True - `load_best_model_at_end`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: epoch - `prediction_loss_only`: True - `per_device_train_batch_size`: 24 - `per_device_eval_batch_size`: 24 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 8 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 4 - `max_steps`: -1 - `lr_scheduler_type`: cosine - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: True - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: True - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `eval_use_gather_object`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 | |:----------:|:-------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:| | 0.0584 | 10 | 0.8567 | - | - | - | - | - | | 0.1169 | 20 | 0.6549 | - | - | - | - | - | | 0.1753 | 30 | 0.5407 | - | - | - | - | - | | 0.2337 | 40 | 0.4586 | - | - | - | - | - | | 0.2922 | 50 | 0.3914 | - | - | - | - | - | | 0.3506 | 60 | 0.4104 | - | - | - | - | - | | 0.4091 | 70 | 0.299 | - | - | - | - | - | | 0.4675 | 80 | 0.2444 | - | - | - | - | - | | 0.5259 | 90 | 0.2367 | - | - | - | - | - | | 0.5844 | 100 | 0.2302 | - | - | - | - | - | | 0.6428 | 110 | 0.2356 | - | - | - | - | - | | 0.7012 | 120 | 0.1537 | - | - | - | - | - | | 0.7597 | 130 | 0.2043 | - | - | - | - | - | | 0.8181 | 140 | 0.1606 | - | - | - | - | - | | 0.8766 | 150 | 0.1896 | - | - | - | - | - | | 0.9350 | 160 | 0.1766 | - | - | - | - | - | | 0.9934 | 170 | 0.1259 | - | - | - | - | - | | 0.9993 | 171 | - | 0.8115 | 0.8233 | 0.8321 | 0.7829 | 0.8340 | | 1.0519 | 180 | 0.1661 | - | - | - | - | - | | 1.1103 | 190 | 0.1632 | - | - | - | - | - | | 1.1687 | 200 | 0.1032 | - | - | - | - | - | | 1.2272 | 210 | 0.1037 | - | - | - | - | - | | 1.2856 | 220 | 0.0708 | - | - | - | - | - | | 1.3440 | 230 | 0.0827 | - | - | - | - | - | | 1.4025 | 240 | 0.0505 | - | - | - | - | - | | 1.4609 | 250 | 0.0468 | - | - | - | - | - | | 1.5194 | 260 | 0.0371 | - | - | - | - | - | | 1.5778 | 270 | 0.049 | - | - | - | - | - | | 1.6362 | 280 | 0.0527 | - | - | - | - | - | | 1.6947 | 290 | 0.0316 | - | - | - | - | - | | 1.7531 | 300 | 0.052 | - | - | - | - | - | | 1.8115 | 310 | 0.0298 | - | - | - | - | - | | 1.8700 | 320 | 0.0334 | - | - | - | - | - | | 1.9284 | 330 | 0.0431 | - | - | - | - | - | | 1.9869 | 340 | 0.0316 | - | - | - | - | - | | 1.9985 | 342 | - | 0.8216 | 0.8342 | 0.8397 | 0.8006 | 0.8408 | | 2.0453 | 350 | 0.0275 | - | - | - | - | - | | 2.1037 | 360 | 0.0461 | - | - | - | - | - | | 2.1622 | 370 | 0.0341 | - | - | - | - | - | | 2.2206 | 380 | 0.0323 | - | - | - | - | - | | 2.2790 | 390 | 0.0205 | - | - | - | - | - | | 2.3375 | 400 | 0.0223 | - | - | - | - | - | | 2.3959 | 410 | 0.0189 | - | - | - | - | - | | 2.4543 | 420 | 0.0181 | - | - | - | - | - | | 2.5128 | 430 | 0.0144 | - | - | - | - | - | | 2.5712 | 440 | 0.0179 | - | - | - | - | - | | 2.6297 | 450 | 0.0217 | - | - | - | - | - | | 2.6881 | 460 | 0.016 | - | - | - | - | - | | 2.7465 | 470 | 0.0143 | - | - | - | - | - | | 2.8050 | 480 | 0.0193 | - | - | - | - | - | | 2.8634 | 490 | 0.0183 | - | - | - | - | - | | 2.9218 | 500 | 0.0171 | - | - | - | - | - | | 2.9803 | 510 | 0.0195 | - | - | - | - | - | | 2.9978 | 513 | - | 0.8242 | 0.8350 | 0.8409 | 0.8051 | 0.8413 | | 3.0387 | 520 | 0.0127 | - | - | - | - | - | | 3.0972 | 530 | 0.0261 | - | - | - | - | - | | 3.1556 | 540 | 0.017 | - | - | - | - | - | | 3.2140 | 550 | 0.0198 | - | - | - | - | - | | 3.2725 | 560 | 0.0131 | - | - | - | - | - | | 3.3309 | 570 | 0.0156 | - | - | - | - | - | | 3.3893 | 580 | 0.0107 | - | - | - | - | - | | 3.4478 | 590 | 0.0123 | - | - | - | - | - | | 3.5062 | 600 | 0.0111 | - | - | - | - | - | | 3.5646 | 610 | 0.0112 | - | - | - | - | - | | 3.6231 | 620 | 0.0143 | - | - | - | - | - | | 3.6815 | 630 | 0.013 | - | - | - | - | - | | 3.7400 | 640 | 0.0105 | - | - | - | - | - | | 3.7984 | 650 | 0.0126 | - | - | - | - | - | | 3.8568 | 660 | 0.0118 | - | - | - | - | - | | 3.9153 | 670 | 0.0163 | - | - | - | - | - | | 3.9737 | 680 | 0.0187 | - | - | - | - | - | | **3.9971** | **684** | **-** | **0.8248** | **0.8361** | **0.8405** | **0.8058** | **0.8422** | * The bold row denotes the saved checkpoint. ### Framework Versions - Python: 3.12.5 - Sentence Transformers: 3.1.1 - Transformers: 4.44.2 - PyTorch: 2.4.1 - Accelerate: 0.33.0 - Datasets: 2.21.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MatryoshkaLoss ```bibtex @misc{kusupati2024matryoshka, title={Matryoshka Representation Learning}, author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi}, year={2024}, eprint={2205.13147}, archivePrefix={arXiv}, primaryClass={cs.LG} } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
{"base_model": "Alibaba-NLP/gte-base-en-v1.5", "language": ["en"], "library_name": "sentence-transformers", "license": "apache-2.0", "metrics": ["cosine_accuracy@1", "cosine_accuracy@3", "cosine_accuracy@5", "cosine_accuracy@10", "cosine_precision@1", "cosine_precision@3", "cosine_precision@5", "cosine_precision@10", "cosine_recall@1", "cosine_recall@3", "cosine_recall@5", "cosine_recall@10", "cosine_ndcg@10", "cosine_mrr@10", "cosine_map@100"], "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:32833", "loss:MatryoshkaLoss", "loss:MultipleNegativesRankingLoss"], "widget": [{"source_sentence": "Anonymity in online interactions can lead to a disinhibition effect, where individuals feel free to express hostile or aggressive opinions they might otherwise suppress.", "sentences": ["What are the implications of anonymity in online interactions?", "How does creativity function as a form of costly signalling in personal expressions such as invitations?", "Why is conflict considered essential in a creative organization?"]}, {"source_sentence": "The author decides to release their novel into the world despite its imperfections, and finds that this allows them to move on to new projects and experiences, and to focus on the value of the work itself rather than its flaws.", "sentences": ["How does the author's experience with their novel illustrate the concept of 'embracing imperfection' in creative work?", "What does the author mean by 'ambitious programmers are better off doing their own thing'?", "What is the role of 'show me' in the design process?"]}, {"source_sentence": "Tokens become more valuable as more users adopt them, creating a positive feedback loop that enhances their utility and encourages further adoption across various applications.", "sentences": ["In what ways do tokens exhibit network effects?", "What can sometimes be found when considering a startup with a lame-sounding idea?", "How do social norms influence decision-making in the context of airport choices?"]}, {"source_sentence": "Philosophers are often viewed as the guardians of critical thinking; however, their reliance on bureaucratic structures and abstract discussions can become problematic. Instead of fostering open-mindedness, they may perpetuate dogmatic thinking and limit the exploration of diverse perspectives, thereby failing to fulfill their duty of promoting genuine critical engagement.", "sentences": ["In what ways can the role of philosophers be seen as essential or problematic within the context of critical thinking?", "How does the evolution of pair-bonding facilitate cultural exchange between groups?", "What is the role of autonomy in the success of acquired startups?"]}, {"source_sentence": "Society tends to admire those who despair when others hope, viewing them as sages or wise figures.", "sentences": ["What is often the societal perception of those who express pessimism about the future?", "How did the realization about user engagement influence the app development strategy?", "What lessons can be learned from the historical context of employee relations in large corporations?"]}], "model-index": [{"name": "Alchemy Embedding - Anudit Nagar", "results": [{"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 768", "type": "dim_768"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.782012613106663, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8889498217713189, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.9248697559638058, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9520153550863724, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.782012613106663, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.29631660725710623, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.1849739511927612, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09520153550863725, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.782012613106663, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8889498217713189, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.9248697559638058, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9520153550863724, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.867555587052628, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.8402608580220322, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.8422322227138224, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 512", "type": "dim_512"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.780367425281053, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8848368522072937, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.9221277762544557, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9514669591445023, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.780367425281053, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2949456174024312, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.1844255552508912, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09514669591445023, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.780367425281053, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8848368522072937, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.9221277762544557, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9514669591445023, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.8661558392165704, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.838656038231032, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.8405372438205077, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 256", "type": "dim_256"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.7754318618042226, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8804496846723334, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.9169180148066904, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9468055936386071, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.7754318618042226, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2934832282241111, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.18338360296133807, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09468055936386072, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.7754318618042226, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8804496846723334, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.9169180148066904, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9468055936386071, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.8613819477350178, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.8338379881703168, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.8360735900013385, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 128", "type": "dim_128"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.7617219632574719, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.871675349602413, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.9117082533589251, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9418700301617768, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.7617219632574719, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2905584498674709, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.18234165067178504, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09418700301617768, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.7617219632574719, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.871675349602413, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.9117082533589251, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9418700301617768, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.851649908463093, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.8225671458602635, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.8248455884524328, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 64", "type": "dim_64"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.7408829174664108, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.853852481491637, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8936111872772141, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9292569234987661, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.7408829174664108, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.28461749383054563, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.17872223745544283, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.0929256923498766, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.7408829174664108, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.853852481491637, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8936111872772141, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9292569234987661, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.8338956659320366, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.8033378162525404, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.8057702637208689, "name": "Cosine Map@100"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,462
markuscolab/bert-base-uncased-finetuned-glue_cola
markuscolab
text-classification
[ "transformers", "safetensors", "bert", "text-classification", "generated_from_trainer", "dataset:glue", "base_model:google-bert/bert-base-uncased", "base_model:finetune:google-bert/bert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-11-18T23:44:46Z
2023-11-19T00:25:46+00:00
176
0
--- base_model: bert-base-uncased datasets: - glue license: apache-2.0 metrics: - accuracy - f1 - matthews_correlation tags: - generated_from_trainer model-index: - name: bert-base-uncased-finetuned-glue_cola results: - task: type: text-classification name: Text Classification dataset: name: glue type: glue config: cola split: validation args: cola metrics: - type: accuracy value: 0.8293384467881112 name: Accuracy - type: f1 value: 0.820234272230632 name: F1 - type: matthews_correlation value: 0.5806473000395166 name: Matthews Correlation --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bert-base-uncased-finetuned-glue_cola This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the glue dataset. It achieves the following results on the evaluation set: - Loss: 0.6466 - Accuracy: 0.8293 - F1: 0.8202 - Matthews Correlation: 0.5806 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 500 - num_epochs: 3 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Matthews Correlation | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:--------------------:| | 0.5418 | 1.0 | 535 | 0.4594 | 0.8006 | 0.7836 | 0.5019 | | 0.3635 | 2.0 | 1070 | 0.4437 | 0.8217 | 0.8084 | 0.5600 | | 0.2019 | 3.0 | 1605 | 0.6466 | 0.8293 | 0.8202 | 0.5806 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu118 - Datasets 2.15.0 - Tokenizers 0.15.0
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bert-base-uncased-finetuned-glue_cola This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the glue dataset. It achieves the following results on the evaluation set: - Loss: 0.6466 - Accuracy: 0.8293 - F1: 0.8202 - Matthews Correlation: 0.5806 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 500 - num_epochs: 3 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Matthews Correlation | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:--------------------:| | 0.5418 | 1.0 | 535 | 0.4594 | 0.8006 | 0.7836 | 0.5019 | | 0.3635 | 2.0 | 1070 | 0.4437 | 0.8217 | 0.8084 | 0.5600 | | 0.2019 | 3.0 | 1605 | 0.6466 | 0.8293 | 0.8202 | 0.5806 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu118 - Datasets 2.15.0 - Tokenizers 0.15.0
{"base_model": "bert-base-uncased", "datasets": ["glue"], "license": "apache-2.0", "metrics": ["accuracy", "f1", "matthews_correlation"], "tags": ["generated_from_trainer"], "model-index": [{"name": "bert-base-uncased-finetuned-glue_cola", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "glue", "type": "glue", "config": "cola", "split": "validation", "args": "cola"}, "metrics": [{"type": "accuracy", "value": 0.8293384467881112, "name": "Accuracy"}, {"type": "f1", "value": 0.820234272230632, "name": "F1"}, {"type": "matthews_correlation", "value": 0.5806473000395166, "name": "Matthews Correlation"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,463
stanford-oval/paraphraser-bart-large
stanford-oval
text2text-generation
[ "transformers", "pytorch", "bart", "text2text-generation", "arxiv:2010.04806", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-08-05T19:54:52Z
2023-03-26T02:06:12+00:00
633
13
--- license: apache-2.0 --- # Introduction The automatic paraphrasing model described and used in the paper "[AutoQA: From Databases to QA Semantic Parsers with Only Synthetic Training Data](https://arxiv.org/abs/2010.04806)" (EMNLP 2020). # Training data A cleaned version of the ParaBank 2 dataset introduced in "[Large-Scale, Diverse, Paraphrastic Bitexts via Sampling and Clustering](https://aclanthology.org/K19-1005/)". ParaBank 2 is a paraphrasing dataset constructed by back-translating the Czech portion of an English-Czech parallel corpus. We use a subset of 5 million sentence pairs with the highest dual conditional cross-entropy score (which corresponds to the highest paraphrasing quality), and use only one of the five paraphrases provided for each sentence. The cleaning process involved removing sentences that do not look like normal English sentences, e.g. contain URLs, contain too many special characters, etc. # Training Procedure The model is fine-tuned for 4 epochs on the above-mentioned dataset, starting from `facebook/bart-large` checkpoint. We use token-level cross-entropy loss calculated using the gold paraphrase sentence. To ensure the output of the model is grammatical, during training, we use the back-translated Czech sentence as the input and the human-written English sentence as the output. Training is done with mini-batches of 1280 examples. For higher training efficiency, each mini-batch is constructed by grouping sentences of similar length together. # How to use Using `top_p=0.9` and `temperature` between `0` and `1` usually results in good generated paraphrases. Higher temperatures make paraphrases more diverse and more different from the input, but might slightly change the meaning of the original sentence. Note that this is a sentence-level paraphraser. If you want to paraphrase longer inputs (like paragraphs) with this model, make sure to first break the input into individual sentences. # Citation If you are using this model in your work, please use this citation: ``` @inproceedings{xu-etal-2020-autoqa, title = "{A}uto{QA}: From Databases to {QA} Semantic Parsers with Only Synthetic Training Data", author = "Xu, Silei and Semnani, Sina and Campagna, Giovanni and Lam, Monica", booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.emnlp-main.31", pages = "422--434", } ```
null
Non_BioNLP
# Introduction The automatic paraphrasing model described and used in the paper "[AutoQA: From Databases to QA Semantic Parsers with Only Synthetic Training Data](https://arxiv.org/abs/2010.04806)" (EMNLP 2020). # Training data A cleaned version of the ParaBank 2 dataset introduced in "[Large-Scale, Diverse, Paraphrastic Bitexts via Sampling and Clustering](https://aclanthology.org/K19-1005/)". ParaBank 2 is a paraphrasing dataset constructed by back-translating the Czech portion of an English-Czech parallel corpus. We use a subset of 5 million sentence pairs with the highest dual conditional cross-entropy score (which corresponds to the highest paraphrasing quality), and use only one of the five paraphrases provided for each sentence. The cleaning process involved removing sentences that do not look like normal English sentences, e.g. contain URLs, contain too many special characters, etc. # Training Procedure The model is fine-tuned for 4 epochs on the above-mentioned dataset, starting from `facebook/bart-large` checkpoint. We use token-level cross-entropy loss calculated using the gold paraphrase sentence. To ensure the output of the model is grammatical, during training, we use the back-translated Czech sentence as the input and the human-written English sentence as the output. Training is done with mini-batches of 1280 examples. For higher training efficiency, each mini-batch is constructed by grouping sentences of similar length together. # How to use Using `top_p=0.9` and `temperature` between `0` and `1` usually results in good generated paraphrases. Higher temperatures make paraphrases more diverse and more different from the input, but might slightly change the meaning of the original sentence. Note that this is a sentence-level paraphraser. If you want to paraphrase longer inputs (like paragraphs) with this model, make sure to first break the input into individual sentences. # Citation If you are using this model in your work, please use this citation: ``` @inproceedings{xu-etal-2020-autoqa, title = "{A}uto{QA}: From Databases to {QA} Semantic Parsers with Only Synthetic Training Data", author = "Xu, Silei and Semnani, Sina and Campagna, Giovanni and Lam, Monica", booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.emnlp-main.31", pages = "422--434", } ```
{"license": "apache-2.0"}
task
[ "PARAPHRASING" ]
46,464
fhaslam/Llama-3.2-1B-Financial-Sentiment
fhaslam
text-generation
[ "transformers", "pytorch", "llama", "text-generation", "facebook", "meta", "llama-3", "conversational", "en", "de", "fr", "it", "pt", "hi", "es", "th", "arxiv:2204.05149", "arxiv:2405.16406", "license:llama3.2", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2025-02-21T01:43:46Z
2025-02-21T02:15:46+00:00
19
0
--- language: - en - de - fr - it - pt - hi - es - th library_name: transformers license: llama3.2 pipeline_tag: text-generation tags: - facebook - meta - pytorch - llama - llama-3 extra_gated_prompt: "### LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\n\nLlama 3.2 Version\ \ Release Date: September 25, 2024\n\n“Agreement” means the terms and conditions\ \ for use, reproduction, distribution and modification of the Llama Materials set\ \ forth herein.\n\n“Documentation” means the specifications, manuals and documentation\ \ accompanying Llama 3.2 distributed by Meta at https://llama.meta.com/doc/overview.\n\ \n“Licensee” or “you” means you, or your employer or any other person or entity\ \ (if you are entering into this Agreement on such person or entity’s behalf),\ \ of the age required under applicable laws, rules or regulations to provide legal\ \ consent and that has legal authority to bind your employer or such other person\ \ or entity if you are entering in this Agreement on their behalf.\n\n“Llama 3.2”\ \ means the foundational large language models and software and algorithms, including\ \ machine-learning model code, trained model weights, inference-enabling code, training-enabling\ \ code, fine-tuning enabling code and other elements of the foregoing distributed\ \ by Meta at https://www.llama.com/llama-downloads.\n\n“Llama Materials” means,\ \ collectively, Meta’s proprietary Llama 3.2 and Documentation (and any portion\ \ thereof) made available under this Agreement.\n\n“Meta” or “we” means Meta Platforms\ \ Ireland Limited (if you are located in or, if you are an entity, your principal\ \ place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if\ \ you are located outside of the EEA or Switzerland). \n\nBy clicking “I Accept”\ \ below or by using or distributing any portion or element of the Llama Materials,\ \ you agree to be bound by this Agreement.\n\n1. License Rights and Redistribution.\n\ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable\ \ and royalty-free limited license under Meta’s intellectual property or other rights\ \ owned by Meta embodied in the Llama Materials to use, reproduce, distribute,\ \ copy, create derivative works of, and make modifications to the Llama Materials.\ \ \nb. Redistribution and Use. \ni. If you distribute or make available the Llama\ \ Materials (or any derivative works thereof), or a product or service (including\ \ another AI model) that contains any of them, you shall (A) provide a copy of this\ \ Agreement with any such Llama Materials; and (B) prominently display “Built with\ \ Llama” on a related website, user interface, blogpost, about page, or product\ \ documentation. If you use the Llama Materials or any outputs or results of the\ \ Llama Materials to create, train, fine tune, or otherwise improve an AI model,\ \ which is distributed or made available, you shall also include “Llama” at the\ \ beginning of any such AI model name.\nii. If you receive Llama Materials, or any\ \ derivative works thereof, from a Licensee as part of an integrated end user product,\ \ then Section 2 of this Agreement will not apply to you. \niii. You must retain\ \ in all copies of the Llama Materials that you distribute the following attribution\ \ notice within a “Notice” text file distributed as a part of such copies: “Llama\ \ 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms,\ \ Inc. All Rights Reserved.”\niv. Your use of the Llama Materials must comply with\ \ applicable laws and regulations (including trade compliance laws and regulations)\ \ and adhere to the Acceptable Use Policy for the Llama Materials (available at\ \ https://www.llama.com/llama3_2/use-policy), which is hereby incorporated by reference\ \ into this Agreement.\n \n2. Additional Commercial Terms. If, on the Llama 3.2\ \ version release date, the monthly active users of the products or services made\ \ available by or for Licensee, or Licensee’s affiliates, is greater than 700 million\ \ monthly active users in the preceding calendar month, you must request a license\ \ from Meta, which Meta may grant to you in its sole discretion, and you are not\ \ authorized to exercise any of the rights under this Agreement unless or until\ \ Meta otherwise expressly grants you such rights.\n3. Disclaimer of Warranty. UNLESS\ \ REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM\ \ ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS\ \ ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION,\ \ ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR\ \ PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING\ \ OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR\ \ USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.\n4. Limitation of Liability.\ \ IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY,\ \ WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING\ \ OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL,\ \ INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE\ \ BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.\n5. Intellectual Property.\n\ a. No trademark licenses are granted under this Agreement, and in connection with\ \ the Llama Materials, neither Meta nor Licensee may use any name or mark owned\ \ by or associated with the other or any of its affiliates, except as required\ \ for reasonable and customary use in describing and redistributing the Llama Materials\ \ or as set forth in this Section 5(a). Meta hereby grants you a license to use\ \ “Llama” (the “Mark”) solely as required to comply with the last sentence of Section\ \ 1.b.i. You will comply with Meta’s brand guidelines (currently accessible at\ \ https://about.meta.com/brand/resources/meta/company-brand/). All goodwill arising\ \ out of your use of the Mark will inure to the benefit of Meta.\nb. Subject to\ \ Meta’s ownership of Llama Materials and derivatives made by or for Meta, with\ \ respect to any derivative works and modifications of the Llama Materials that\ \ are made by you, as between you and Meta, you are and will be the owner of such\ \ derivative works and modifications.\nc. If you institute litigation or other proceedings\ \ against Meta or any entity (including a cross-claim or counterclaim in a lawsuit)\ \ alleging that the Llama Materials or Llama 3.2 outputs or results, or any portion\ \ of any of the foregoing, constitutes infringement of intellectual property or\ \ other rights owned or licensable by you, then any licenses granted to you under\ \ this Agreement shall terminate as of the date such litigation or claim is filed\ \ or instituted. You will indemnify and hold harmless Meta from and against any\ \ claim by any third party arising out of or related to your use or distribution\ \ of the Llama Materials.\n6. Term and Termination. The term of this Agreement will\ \ commence upon your acceptance of this Agreement or access to the Llama Materials\ \ and will continue in full force and effect until terminated in accordance with\ \ the terms and conditions herein. Meta may terminate this Agreement if you are\ \ in breach of any term or condition of this Agreement. Upon termination of this\ \ Agreement, you shall delete and cease use of the Llama Materials. Sections 3,\ \ 4 and 7 shall survive the termination of this Agreement. \n7. Governing Law and\ \ Jurisdiction. This Agreement will be governed and construed under the laws of\ \ the State of California without regard to choice of law principles, and the UN\ \ Convention on Contracts for the International Sale of Goods does not apply to\ \ this Agreement. The courts of California shall have exclusive jurisdiction of\ \ any dispute arising out of this Agreement. \n### Llama 3.2 Acceptable Use Policy\n\ Meta is committed to promoting safe and fair use of its tools and features, including\ \ Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use Policy\ \ (“**Policy**”). The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\n\ #### Prohibited Uses\nWe want everyone to use Llama 3.2 safely and responsibly.\ \ You agree you will not use, or allow others to use, Llama 3.2 to:\n1. Violate\ \ the law or others’ rights, including to:\n 1. Engage in, promote, generate,\ \ contribute to, encourage, plan, incite, or further illegal or unlawful activity\ \ or content, such as:\n 1. Violence or terrorism\n 2. Exploitation\ \ or harm to children, including the solicitation, creation, acquisition, or dissemination\ \ of child exploitative content or failure to report Child Sexual Abuse Material\n\ \ 3. Human trafficking, exploitation, and sexual violence\n 4. The\ \ illegal distribution of information or materials to minors, including obscene\ \ materials, or failure to employ legally required age-gating in connection with\ \ such information or materials.\n 5. Sexual solicitation\n 6. Any\ \ other criminal activity\n 1. Engage in, promote, incite, or facilitate the\ \ harassment, abuse, threatening, or bullying of individuals or groups of individuals\n\ \ 2. Engage in, promote, incite, or facilitate discrimination or other unlawful\ \ or harmful conduct in the provision of employment, employment benefits, credit,\ \ housing, other economic benefits, or other essential goods and services\n 3.\ \ Engage in the unauthorized or unlicensed practice of any profession including,\ \ but not limited to, financial, legal, medical/health, or related professional\ \ practices\n 4. Collect, process, disclose, generate, or infer private or sensitive\ \ information about individuals, including information about individuals’ identity,\ \ health, or demographic information, unless you have obtained the right to do so\ \ in accordance with applicable law\n 5. Engage in or facilitate any action or\ \ generate any content that infringes, misappropriates, or otherwise violates any\ \ third-party rights, including the outputs or results of any products or services\ \ using the Llama Materials\n 6. Create, generate, or facilitate the creation\ \ of malicious code, malware, computer viruses or do anything else that could disable,\ \ overburden, interfere with or impair the proper working, integrity, operation\ \ or appearance of a website or computer system\n 7. Engage in any action, or\ \ facilitate any action, to intentionally circumvent or remove usage restrictions\ \ or other safety measures, or to enable functionality disabled by Meta \n2. Engage\ \ in, promote, incite, facilitate, or assist in the planning or development of activities\ \ that present a risk of death or bodily harm to individuals, including use of Llama\ \ 3.2 related to the following:\n 8. Military, warfare, nuclear industries or\ \ applications, espionage, use for materials or activities that are subject to the\ \ International Traffic Arms Regulations (ITAR) maintained by the United States\ \ Department of State or to the U.S. Biological Weapons Anti-Terrorism Act of 1989\ \ or the Chemical Weapons Convention Implementation Act of 1997\n 9. Guns and\ \ illegal weapons (including weapon development)\n 10. Illegal drugs and regulated/controlled\ \ substances\n 11. Operation of critical infrastructure, transportation technologies,\ \ or heavy machinery\n 12. Self-harm or harm to others, including suicide, cutting,\ \ and eating disorders\n 13. Any content intended to incite or promote violence,\ \ abuse, or any infliction of bodily harm to an individual\n3. Intentionally deceive\ \ or mislead others, including use of Llama 3.2 related to the following:\n 14.\ \ Generating, promoting, or furthering fraud or the creation or promotion of disinformation\n\ \ 15. Generating, promoting, or furthering defamatory content, including the\ \ creation of defamatory statements, images, or other content\n 16. Generating,\ \ promoting, or further distributing spam\n 17. Impersonating another individual\ \ without consent, authorization, or legal right\n 18. Representing that the\ \ use of Llama 3.2 or outputs are human-generated\n 19. Generating or facilitating\ \ false online engagement, including fake reviews and other means of fake online\ \ engagement \n4. Fail to appropriately disclose to end users any known dangers\ \ of your AI system 5. Interact with third party tools, models, or software designed\ \ to generate unlawful content or engage in unlawful or harmful conduct and/or represent\ \ that the outputs of such tools, models, or software are associated with Meta or\ \ Llama 3.2\n\nWith respect to any multimodal models included in Llama 3.2, the\ \ rights granted under Section 1(a) of the Llama 3.2 Community License Agreement\ \ are not being granted to you if you are an individual domiciled in, or a company\ \ with a principal place of business in, the European Union. This restriction does\ \ not apply to end users of a product or service that incorporates any such multimodal\ \ models.\n\nPlease report any violation of this Policy, software “bug,” or other\ \ problems that could lead to a violation of this Policy through one of the following\ \ means:\n\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues&h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\n\ * Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\n\ * Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\n\ * Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama\ \ 3.2: [email protected]" extra_gated_fields: First Name: text Last Name: text Date of birth: date_picker Country: country Affiliation: text Job title: type: select options: - Student - Research Graduate - AI researcher - AI developer/engineer - Reporter - Other geo: ip_location ? By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy : checkbox extra_gated_description: The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/). extra_gated_button_content: Submit --- ## Model Information The Llama 3.2 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction-tuned generative models in 1B and 3B sizes (text in/text out). The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks. **Model Developer:** Meta **Model Architecture:** Llama 3.2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. | | Training Data | Params | Input modalities | Output modalities | Context Length | GQA | Shared Embeddings | Token count | Knowledge cutoff | | :---- | :---- | :---- | :---- | :---- | :---- | :---- | :---- | :---- | :---- | | Llama 3.2 (text only) | A new mix of publicly available online data. | 1B (1.23B) | Multilingual Text | Multilingual Text and code | 128k | Yes | Yes | Up to 9T tokens | December 2023 | | | | 3B (3.21B) | Multilingual Text | Multilingual Text and code | | | | | | | Llama 3.2 Quantized (text only) | A new mix of publicly available online data. | 1B (1.23B) | Multilingual Text | Multilingual Text and code | 8k | Yes | Yes | Up to 9T tokens | December 2023 | | | | 3B (3.21B) | Multilingual Text | Multilingual Text and code | | | | | | **Supported Languages:** English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai are officially supported. Llama 3.2 has been trained on a broader collection of languages than these 8 supported languages. Developers may fine-tune Llama 3.2 models for languages beyond these supported languages, provided they comply with the Llama 3.2 Community License and the Acceptable Use Policy. Developers are always expected to ensure that their deployments, including those that involve additional languages, are completed safely and responsibly. **Llama 3.2 Model Family:** Token counts refer to pretraining data only. All model versions use Grouped-Query Attention (GQA) for improved inference scalability. **Model Release Date:** Sept 25, 2024 **Status:** This is a static model trained on an offline dataset. Future versions may be released that improve model capabilities and safety. **License:** Use of Llama 3.2 is governed by the [Llama 3.2 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE) (a custom, commercial license agreement). **Feedback:** Instructions on how to provide feedback or comments on the model can be found in the Llama Models [README](https://github.com/meta-llama/llama-models/blob/main/README.md). For more technical information about generation parameters and recipes for how to use Llama 3.2 in applications, please go [here](https://github.com/meta-llama/llama-recipes). ## Intended Use **Intended Use Cases:** Llama 3.2 is intended for commercial and research use in multiple languages. Instruction tuned text only models are intended for assistant-like chat and agentic applications like knowledge retrieval and summarization, mobile AI powered writing assistants and query and prompt rewriting. Pretrained models can be adapted for a variety of additional natural language generation tasks. Similarly, quantized models can be adapted for a variety of on-device use-cases with limited compute resources. **Out of Scope:** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by the Acceptable Use Policy and Llama 3.2 Community License. Use in languages beyond those explicitly referenced as supported in this model card. ## How to use This repository contains two versions of Llama-3.2-1B-Instruct, for use with transformers and with the original `llama` codebase. ### Use with transformers Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function. Make sure to update your transformers installation via `pip install --upgrade transformers`. ```python import torch from transformers import pipeline model_id = "meta-llama/Llama-3.2-1B-Instruct" pipe = pipeline( "text-generation", model=model_id, torch_dtype=torch.bfloat16, device_map="auto", ) messages = [ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"}, {"role": "user", "content": "Who are you?"}, ] outputs = pipe( messages, max_new_tokens=256, ) print(outputs[0]["generated_text"][-1]) ``` Note: You can also find detailed recipes on how to use the model locally, with `torch.compile()`, assisted generations, quantised and more at [`huggingface-llama-recipes`](https://github.com/huggingface/huggingface-llama-recipes) ### Use with `llama` Please, follow the instructions in the [repository](https://github.com/meta-llama/llama) To download Original checkpoints, see the example command below leveraging `huggingface-cli`: ``` huggingface-cli download meta-llama/Llama-3.2-1B-Instruct --include "original/*" --local-dir Llama-3.2-1B-Instruct ``` ## Hardware and Software **Training Factors:** We used custom training libraries, Meta's custom built GPU cluster, and production infrastructure for pretraining. Fine-tuning, quantization, annotation, and evaluation were also performed on production infrastructure. **Training Energy Use:** Training utilized a cumulative of **916k** GPU hours of computation on H100-80GB (TDP of 700W) type hardware, per the table below. Training time is the total GPU time required for training each model and power consumption is the peak power capacity per GPU device used, adjusted for power usage efficiency. **Training Greenhouse Gas Emissions:** Estimated total location-based greenhouse gas emissions were **240** tons CO2eq for training. Since 2020, Meta has maintained net zero greenhouse gas emissions in its global operations and matched 100% of its electricity use with renewable energy; therefore, the total market-based greenhouse gas emissions for training were 0 tons CO2eq. | | Training Time (GPU hours) | Logit Generation Time (GPU Hours) | Training Power Consumption (W) | Training Location-Based Greenhouse Gas Emissions (tons CO2eq) | Training Market-Based Greenhouse Gas Emissions (tons CO2eq) | | :---- | :---: | ----- | :---: | :---: | :---: | | Llama 3.2 1B | 370k | \- | 700 | 107 | 0 | | Llama 3.2 3B | 460k | \- | 700 | 133 | 0 | | Llama 3.2 1B SpinQuant | 1.7 | 0 | 700 | *Negligible*\*\* | 0 | | Llama 3.2 3B SpinQuant | 2.4 | 0 | 700 | *Negligible*\*\* | 0 | | Llama 3.2 1B QLora | 1.3k | 0 | 700 | 0.381 | 0 | | Llama 3.2 3B QLora | 1.6k | 0 | 700 | 0.461 | 0 | | Total | 833k | 86k | | 240 | 0 | \*\* The location-based CO2e emissions of Llama 3.2 1B SpinQuant and Llama 3.2 3B SpinQuant are less than 0.001 metric tonnes each. This is due to the minimal training GPU hours that are required. The methodology used to determine training energy use and greenhouse gas emissions can be found [here](https://arxiv.org/pdf/2204.05149). Since Meta is openly releasing these models, the training energy use and greenhouse gas emissions will not be incurred by others. ## Training Data **Overview:** Llama 3.2 was pretrained on up to 9 trillion tokens of data from publicly available sources. For the 1B and 3B Llama 3.2 models, we incorporated logits from the Llama 3.1 8B and 70B models into the pretraining stage of the model development, where outputs (logits) from these larger models were used as token-level targets. Knowledge distillation was used after pruning to recover performance. In post-training we used a similar recipe as Llama 3.1 and produced final chat models by doing several rounds of alignment on top of the pre-trained model. Each round involved Supervised Fine-Tuning (SFT), Rejection Sampling (RS), and Direct Preference Optimization (DPO). **Data Freshness:** The pretraining data has a cutoff of December 2023\. ## Quantization ### Quantization Scheme We designed the current quantization scheme with the [PyTorch’s ExecuTorch](https://github.com/pytorch/executorch) inference framework and Arm CPU backend in mind, taking into account metrics including model quality, prefill/decoding speed, and memory footprint. Our quantization scheme involves three parts: - All linear layers in all transformer blocks are quantized to a 4-bit groupwise scheme (with a group size of 32) for weights and 8-bit per-token dynamic quantization for activations. - The classification layer is quantized to 8-bit per-channel for weight and 8-bit per token dynamic quantization for activation. - Similar to classification layer, an 8-bit per channel quantization is used for embedding layer. ### Quantization-Aware Training and LoRA The quantization-aware training (QAT) with low-rank adaptation (LoRA) models went through only post-training stages, using the same data as the full precision models. To initialize QAT, we utilize BF16 Llama 3.2 model checkpoints obtained after supervised fine-tuning (SFT) and perform an additional full round of SFT training with QAT. We then freeze the backbone of the QAT model and perform another round of SFT with LoRA adaptors applied to all layers within the transformer block. Meanwhile, the LoRA adaptors' weights and activations are maintained in BF16. Because our approach is similar to QLoRA of Dettmers et al., (2023) (i.e., quantization followed by LoRA adapters), we refer this method as QLoRA. Finally, we fine-tune the resulting model (both backbone and LoRA adaptors) using direct preference optimization (DPO). ### SpinQuant [SpinQuant](https://arxiv.org/abs/2405.16406) was applied, together with generative post-training quantization (GPTQ). For the SpinQuant rotation matrix fine-tuning, we optimized for 100 iterations, using 800 samples with sequence-length 2048 from the WikiText 2 dataset. For GPTQ, we used 128 samples from the same dataset with the same sequence-length. ## Benchmarks \- English Text In this section, we report the results for Llama 3.2 models on standard automatic benchmarks. For all these evaluations, we used our internal evaluations library. ### Base Pretrained Models | Category | Benchmark | \# Shots | Metric | Llama 3.2 1B | Llama 3.2 3B | Llama 3.1 8B | | ----- | ----- | :---: | :---: | :---: | :---: | :---: | | General | MMLU | 5 | macro\_avg/acc\_char | 32.2 | 58 | 66.7 | | | AGIEval English | 3-5 | average/acc\_char | 23.3 | 39.2 | 47.8 | | | ARC-Challenge | 25 | acc\_char | 32.8 | 69.1 | 79.7 | | Reading comprehension | SQuAD | 1 | em | 49.2 | 67.7 | 77 | | | QuAC (F1) | 1 | f1 | 37.9 | 42.9 | 44.9 | | | DROP (F1) | 3 | f1 | 28.0 | 45.2 | 59.5 | | Long Context | Needle in Haystack | 0 | em | 96.8 | 1 | 1 | ### Instruction Tuned Models | Capability | | Benchmark | \# Shots | Metric | Llama 3.2 1B bf16 | Llama 3.2 1B Vanilla PTQ\*\* | Llama 3.2 1B Spin Quant | Llama 3.2 1B QLoRA | Llama 3.2 3B bf16 | Llama 3.2 3B Vanilla PTQ\*\* | Llama 3.2 3B Spin Quant | Llama 3.2 3B QLoRA | Llama 3.1 8B | | :---: | ----- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | General | | MMLU | 5 | macro\_avg/acc | 49.3 | 43.3 | 47.3 | 49.0 | 63.4 | 60.5 | 62 | 62.4 | 69.4 | | Re-writing | | Open-rewrite eval | 0 | micro\_avg/rougeL | 41.6 | 39.2 | 40.9 | 41.2 | 40.1 | 40.3 | 40.8 | 40.7 | 40.9 | | Summarization | | TLDR9+ (test) | 1 | rougeL | 16.8 | 14.9 | 16.7 | 16.8 | 19.0 | 19.1 | 19.2 | 19.1 | 17.2 | | Instruction following | | IFEval | 0 | Avg(Prompt/Instruction acc Loose/Strict) | 59.5 | 51.5 | 58.4 | 55.6 | 77.4 | 73.9 | 73.5 | 75.9 | 80.4 | | Math | | GSM8K (CoT) | 8 | em\_maj1@1 | 44.4 | 33.1 | 40.6 | 46.5 | 77.7 | 72.9 | 75.7 | 77.9 | 84.5 | | | | MATH (CoT) | 0 | final\_em | 30.6 | 20.5 | 25.3 | 31.0 | 48.0 | 44.2 | 45.3 | 49.2 | 51.9 | | Reasoning | | ARC-C | 0 | acc | 59.4 | 54.3 | 57 | 60.7 | 78.6 | 75.6 | 77.6 | 77.6 | 83.4 | | | | GPQA | 0 | acc | 27.2 | 25.9 | 26.3 | 25.9 | 32.8 | 32.8 | 31.7 | 33.9 | 32.8 | | | | Hellaswag | 0 | acc | 41.2 | 38.1 | 41.3 | 41.5 | 69.8 | 66.3 | 68 | 66.3 | 78.7 | | Tool Use | | BFCL V2 | 0 | acc | 25.7 | 14.3 | 15.9 | 23.7 | 67.0 | 53.4 | 60.1 | 63.5 | 67.1 | | | | Nexus | 0 | macro\_avg/acc | 13.5 | 5.2 | 9.6 | 12.5 | 34.3 | 32.4 | 31.5 | 30.1 | 38.5 | | Long Context | | InfiniteBench/En.QA | 0 | longbook\_qa/f1 | 20.3 | N/A | N/A | N/A | 19.8 | N/A | N/A | N/A | 27.3 | | | | InfiniteBench/En.MC | 0 | longbook\_choice/acc | 38.0 | N/A | N/A | N/A | 63.3 | N/A | N/A | N/A | 72.2 | | | | NIH/Multi-needle | 0 | recall | 75.0 | N/A | N/A | N/A | 84.7 | N/A | N/A | N/A | 98.8 | | Multilingual | | MGSM (CoT) | 0 | em | 24.5 | 13.7 | 18.2 | 24.4 | 58.2 | 48.9 | 54.3 | 56.8 | 68.9 | \*\*for comparison purposes only. Model not released. ### Multilingual Benchmarks | Category | Benchmark | Language | Llama 3.2 1B | Llama 3.2 1B Vanilla PTQ\*\* | Llama 3.2 1B Spin Quant | Llama 3.2 1B QLoRA | Llama 3.2 3B | Llama 3.2 3B Vanilla PTQ\*\* | Llama 3.2 3B Spin Quant | Llama 3.2 3B QLoRA | Llama 3.1 8B | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | General | MMLU (5-shot, macro_avg/acc) | Portuguese | 39.8 | 34.9 | 38.9 | 40.2 | 54.5 | 50.9 | 53.3 | 53.4 | 62.1 | | | | Spanish | 41.5 | 36.0 | 39.8 | 41.8 | 55.1 | 51.9 | 53.6 | 53.6 | 62.5 | | | | Italian | 39.8 | 34.9 | 38.1 | 40.6 | 53.8 | 49.9 | 52.1 | 51.7 | 61.6 | | | | German | 39.2 | 34.9 | 37.5 | 39.6 | 53.3 | 50.0 | 52.2 | 51.3 | 60.6 | | | | French | 40.5 | 34.8 | 39.2 | 40.8 | 54.6 | 51.2 | 53.3 | 53.3 | 62.3 | | | | Hindi | 33.5 | 30.0 | 32.1 | 34.0 | 43.3 | 40.4 | 42.0 | 42.1 | 50.9 | | | | Thai | 34.7 | 31.2 | 32.4 | 34.9 | 44.5 | 41.3 | 44.0 | 42.2 | 50.3 | \*\*for comparison purposes only. Model not released. ## Inference time In the below table, we compare the performance metrics of different quantization methods (SpinQuant and QAT \+ LoRA) with the BF16 baseline. The evaluation was done using the [ExecuTorch](https://github.com/pytorch/executorch) framework as the inference engine, with the ARM CPU as a backend using Android OnePlus 12 device. | Category | Decode (tokens/sec) | Time-to-first-token (sec) | Prefill (tokens/sec) | Model size (PTE file size in MB) | Memory size (RSS in MB) | | :---- | ----- | ----- | ----- | ----- | ----- | | 1B BF16 (baseline) | 19.2 | 1.0 | 60.3 | 2358 | 3,185 | | 1B SpinQuant | 50.2 (2.6x) | 0.3 (-76.9%) | 260.5 (4.3x) | 1083 (-54.1%) | 1,921 (-39.7%) | | 1B QLoRA | 45.8 (2.4x) | 0.3 (-76.0%) | 252.0 (4.2x) | 1127 (-52.2%) | 2,255 (-29.2%) | | 3B BF16 (baseline) | 7.6 | 3.0 | 21.2 | 6129 | 7,419 | | 3B SpinQuant | 19.7 (2.6x) | 0.7 (-76.4%) | 89.7 (4.2x) | 2435 (-60.3%) | 3,726 (-49.8%) | | 3B QLoRA | 18.5 (2.4x) | 0.7 (-76.1%) | 88.8 (4.2x) | 2529 (-58.7%) | 4,060 (-45.3%) | (\*) The performance measurement is done using an adb binary-based approach. (\*\*) It is measured on an Android OnePlus 12 device. (\*\*\*) Time-to-first-token (TTFT) is measured with prompt length=64 *Footnote:* - *Decode (tokens/second) is for how quickly it keeps generating. Higher is better.* - *Time-to-first-token (TTFT for shorthand) is for how fast it generates the first token for a given prompt. Lower is better.* - *Prefill is the inverse of TTFT (aka 1/TTFT) in tokens/second. Higher is better* - *Model size \- how big is the model, measured by, PTE file, a binary file format for ExecuTorch* - *RSS size \- Memory usage in resident set size (RSS)* ## Responsibility & Safety As part of our Responsible release approach, we followed a three-pronged strategy to managing trust & safety risks: 1. Enable developers to deploy helpful, safe and flexible experiences for their target audience and for the use cases supported by Llama 2. Protect developers against adversarial users aiming to exploit Llama capabilities to potentially cause harm 3. Provide protections for the community to help prevent the misuse of our models ### Responsible Deployment **Approach:** Llama is a foundational technology designed to be used in a variety of use cases. Examples on how Meta’s Llama models have been responsibly deployed can be found in our [Community Stories webpage](https://llama.meta.com/community-stories/). Our approach is to build the most helpful models, enabling the world to benefit from the technology power, by aligning our model safety for generic use cases and addressing a standard set of harms. Developers are then in the driver’s seat to tailor safety for their use cases, defining their own policies and deploying the models with the necessary safeguards in their Llama systems. Llama 3.2 was developed following the best practices outlined in our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide/). #### Llama 3.2 Instruct **Objective:** Our main objectives for conducting safety fine-tuning are to provide the research community with a valuable resource for studying the robustness of safety fine-tuning, as well as to offer developers a readily available, safe, and powerful model for various applications to reduce the developer workload to deploy safe AI systems. We implemented the same set of safety mitigations as in Llama 3, and you can learn more about these in the Llama 3 [paper](https://ai.meta.com/research/publications/the-llama-3-herd-of-models/). **Fine-Tuning Data:** We employ a multi-faceted approach to data collection, combining human-generated data from our vendors with synthetic data to mitigate potential safety risks. We’ve developed many large language model (LLM)-based classifiers that enable us to thoughtfully select high-quality prompts and responses, enhancing data quality control. **Refusals and Tone:** Building on the work we started with Llama 3, we put a great emphasis on model refusals to benign prompts as well as refusal tone. We included both borderline and adversarial prompts in our safety data strategy, and modified our safety data responses to follow tone guidelines. #### Llama 3.2 Systems **Safety as a System:** Large language models, including Llama 3.2, **are not designed to be deployed in isolation** but instead should be deployed as part of an overall AI system with additional safety guardrails as required. Developers are expected to deploy system safeguards when building agentic systems. Safeguards are key to achieve the right helpfulness-safety alignment as well as mitigating safety and security risks inherent to the system and any integration of the model or system with external tools. As part of our responsible release approach, we provide the community with [safeguards](https://llama.meta.com/trust-and-safety/) that developers should deploy with Llama models or other LLMs, including Llama Guard, Prompt Guard and Code Shield. All our [reference implementations](https://github.com/meta-llama/llama-agentic-system) demos contain these safeguards by default so developers can benefit from system-level safety out-of-the-box. ### New Capabilities and Use Cases **Technological Advancement:** Llama releases usually introduce new capabilities that require specific considerations in addition to the best practices that generally apply across all Generative AI use cases. For prior release capabilities also supported by Llama 3.2, see [Llama 3.1 Model Card](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md), as the same considerations apply here as well. **Constrained Environments:** Llama 3.2 1B and 3B models are expected to be deployed in highly constrained environments, such as mobile devices. LLM Systems using smaller models will have a different alignment profile and safety/helpfulness tradeoff than more complex, larger systems. Developers should ensure the safety of their system meets the requirements of their use case. We recommend using lighter system safeguards for such use cases, like Llama Guard 3-1B or its mobile-optimized version. ### Evaluations **Scaled Evaluations:** We built dedicated, adversarial evaluation datasets and evaluated systems composed of Llama models and Purple Llama safeguards to filter input prompt and output response. It is important to evaluate applications in context, and we recommend building dedicated evaluation dataset for your use case. **Red Teaming:** We conducted recurring red teaming exercises with the goal of discovering risks via adversarial prompting and we used the learnings to improve our benchmarks and safety tuning datasets. We partnered early with subject-matter experts in critical risk areas to understand the nature of these real-world harms and how such models may lead to unintended harm for society. Based on these conversations, we derived a set of adversarial goals for the red team to attempt to achieve, such as extracting harmful information or reprogramming the model to act in a potentially harmful capacity. The red team consisted of experts in cybersecurity, adversarial machine learning, responsible AI, and integrity in addition to multilingual content specialists with background in integrity issues in specific geographic markets. ### Critical Risks In addition to our safety work above, we took extra care on measuring and/or mitigating the following critical risk areas: **1\. CBRNE (Chemical, Biological, Radiological, Nuclear, and Explosive Weapons):** Llama 3.2 1B and 3B models are smaller and less capable derivatives of Llama 3.1. For Llama 3.1 70B and 405B, to assess risks related to proliferation of chemical and biological weapons, we performed uplift testing designed to assess whether use of Llama 3.1 models could meaningfully increase the capabilities of malicious actors to plan or carry out attacks using these types of weapons and have determined that such testing also applies to the smaller 1B and 3B models. **2\. Child Safety:** Child Safety risk assessments were conducted using a team of experts, to assess the model’s capability to produce outputs that could result in Child Safety risks and inform on any necessary and appropriate risk mitigations via fine tuning. We leveraged those expert red teaming sessions to expand the coverage of our evaluation benchmarks through Llama 3 model development. For Llama 3, we conducted new in-depth sessions using objective based methodologies to assess the model risks along multiple attack vectors including the additional languages Llama 3 is trained on. We also partnered with content specialists to perform red teaming exercises assessing potentially violating content while taking account of market specific nuances or experiences. **3\. Cyber Attacks:** For Llama 3.1 405B, our cyber attack uplift study investigated whether LLMs can enhance human capabilities in hacking tasks, both in terms of skill level and speed. Our attack automation study focused on evaluating the capabilities of LLMs when used as autonomous agents in cyber offensive operations, specifically in the context of ransomware attacks. This evaluation was distinct from previous studies that considered LLMs as interactive assistants. The primary objective was to assess whether these models could effectively function as independent agents in executing complex cyber-attacks without human intervention. Because Llama 3.2’s 1B and 3B models are smaller and less capable models than Llama 3.1 405B, we broadly believe that the testing conducted for the 405B model also applies to Llama 3.2 models. ### Community **Industry Partnerships:** Generative AI safety requires expertise and tooling, and we believe in the strength of the open community to accelerate its progress. We are active members of open consortiums, including the AI Alliance, Partnership on AI and MLCommons, actively contributing to safety standardization and transparency. We encourage the community to adopt taxonomies like the MLCommons Proof of Concept evaluation to facilitate collaboration and transparency on safety and content evaluations. Our Purple Llama tools are open sourced for the community to use and widely distributed across ecosystem partners including cloud service providers. We encourage community contributions to our [Github repository](https://github.com/meta-llama/PurpleLlama). **Grants:** We also set up the [Llama Impact Grants](https://llama.meta.com/llama-impact-grants/) program to identify and support the most compelling applications of Meta’s Llama model for societal benefit across three categories: education, climate and open innovation. The 20 finalists from the hundreds of applications can be found [here](https://llama.meta.com/llama-impact-grants/#finalists). **Reporting:** Finally, we put in place a set of resources including an [output reporting mechanism](https://developers.facebook.com/llama_output_feedback) and [bug bounty program](https://www.facebook.com/whitehat) to continuously improve the Llama technology with the help of the community. ## Ethical Considerations and Limitations **Values:** The core values of Llama 3.2 are openness, inclusivity and helpfulness. It is meant to serve everyone, and to work for a wide range of use cases. It is thus designed to be accessible to people across many different backgrounds, experiences and perspectives. Llama 3.2 addresses users and their needs as they are, without insertion unnecessary judgment or normativity, while reflecting the understanding that even content that may appear problematic in some cases can serve valuable purposes in others. It respects the dignity and autonomy of all users, especially in terms of the values of free thought and expression that power innovation and progress. **Testing:** Llama 3.2 is a new technology, and like any new technology, there are risks associated with its use. Testing conducted to date has not covered, nor could it cover, all scenarios. For these reasons, as with all LLMs, Llama 3.2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 3.2 models, developers should perform safety testing and tuning tailored to their specific applications of the model. Please refer to available resources including our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide), [Trust and Safety](https://llama.meta.com/trust-and-safety/) solutions, and other [resources](https://llama.meta.com/docs/get-started/) to learn more about responsible development.
null
Non_BioNLP
## Model Information The Llama 3.2 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction-tuned generative models in 1B and 3B sizes (text in/text out). The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks. **Model Developer:** Meta **Model Architecture:** Llama 3.2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. | | Training Data | Params | Input modalities | Output modalities | Context Length | GQA | Shared Embeddings | Token count | Knowledge cutoff | | :---- | :---- | :---- | :---- | :---- | :---- | :---- | :---- | :---- | :---- | | Llama 3.2 (text only) | A new mix of publicly available online data. | 1B (1.23B) | Multilingual Text | Multilingual Text and code | 128k | Yes | Yes | Up to 9T tokens | December 2023 | | | | 3B (3.21B) | Multilingual Text | Multilingual Text and code | | | | | | | Llama 3.2 Quantized (text only) | A new mix of publicly available online data. | 1B (1.23B) | Multilingual Text | Multilingual Text and code | 8k | Yes | Yes | Up to 9T tokens | December 2023 | | | | 3B (3.21B) | Multilingual Text | Multilingual Text and code | | | | | | **Supported Languages:** English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai are officially supported. Llama 3.2 has been trained on a broader collection of languages than these 8 supported languages. Developers may fine-tune Llama 3.2 models for languages beyond these supported languages, provided they comply with the Llama 3.2 Community License and the Acceptable Use Policy. Developers are always expected to ensure that their deployments, including those that involve additional languages, are completed safely and responsibly. **Llama 3.2 Model Family:** Token counts refer to pretraining data only. All model versions use Grouped-Query Attention (GQA) for improved inference scalability. **Model Release Date:** Sept 25, 2024 **Status:** This is a static model trained on an offline dataset. Future versions may be released that improve model capabilities and safety. **License:** Use of Llama 3.2 is governed by the [Llama 3.2 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE) (a custom, commercial license agreement). **Feedback:** Instructions on how to provide feedback or comments on the model can be found in the Llama Models [README](https://github.com/meta-llama/llama-models/blob/main/README.md). For more technical information about generation parameters and recipes for how to use Llama 3.2 in applications, please go [here](https://github.com/meta-llama/llama-recipes). ## Intended Use **Intended Use Cases:** Llama 3.2 is intended for commercial and research use in multiple languages. Instruction tuned text only models are intended for assistant-like chat and agentic applications like knowledge retrieval and summarization, mobile AI powered writing assistants and query and prompt rewriting. Pretrained models can be adapted for a variety of additional natural language generation tasks. Similarly, quantized models can be adapted for a variety of on-device use-cases with limited compute resources. **Out of Scope:** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by the Acceptable Use Policy and Llama 3.2 Community License. Use in languages beyond those explicitly referenced as supported in this model card. ## How to use This repository contains two versions of Llama-3.2-1B-Instruct, for use with transformers and with the original `llama` codebase. ### Use with transformers Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function. Make sure to update your transformers installation via `pip install --upgrade transformers`. ```python import torch from transformers import pipeline model_id = "meta-llama/Llama-3.2-1B-Instruct" pipe = pipeline( "text-generation", model=model_id, torch_dtype=torch.bfloat16, device_map="auto", ) messages = [ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"}, {"role": "user", "content": "Who are you?"}, ] outputs = pipe( messages, max_new_tokens=256, ) print(outputs[0]["generated_text"][-1]) ``` Note: You can also find detailed recipes on how to use the model locally, with `torch.compile()`, assisted generations, quantised and more at [`huggingface-llama-recipes`](https://github.com/huggingface/huggingface-llama-recipes) ### Use with `llama` Please, follow the instructions in the [repository](https://github.com/meta-llama/llama) To download Original checkpoints, see the example command below leveraging `huggingface-cli`: ``` huggingface-cli download meta-llama/Llama-3.2-1B-Instruct --include "original/*" --local-dir Llama-3.2-1B-Instruct ``` ## Hardware and Software **Training Factors:** We used custom training libraries, Meta's custom built GPU cluster, and production infrastructure for pretraining. Fine-tuning, quantization, annotation, and evaluation were also performed on production infrastructure. **Training Energy Use:** Training utilized a cumulative of **916k** GPU hours of computation on H100-80GB (TDP of 700W) type hardware, per the table below. Training time is the total GPU time required for training each model and power consumption is the peak power capacity per GPU device used, adjusted for power usage efficiency. **Training Greenhouse Gas Emissions:** Estimated total location-based greenhouse gas emissions were **240** tons CO2eq for training. Since 2020, Meta has maintained net zero greenhouse gas emissions in its global operations and matched 100% of its electricity use with renewable energy; therefore, the total market-based greenhouse gas emissions for training were 0 tons CO2eq. | | Training Time (GPU hours) | Logit Generation Time (GPU Hours) | Training Power Consumption (W) | Training Location-Based Greenhouse Gas Emissions (tons CO2eq) | Training Market-Based Greenhouse Gas Emissions (tons CO2eq) | | :---- | :---: | ----- | :---: | :---: | :---: | | Llama 3.2 1B | 370k | \- | 700 | 107 | 0 | | Llama 3.2 3B | 460k | \- | 700 | 133 | 0 | | Llama 3.2 1B SpinQuant | 1.7 | 0 | 700 | *Negligible*\*\* | 0 | | Llama 3.2 3B SpinQuant | 2.4 | 0 | 700 | *Negligible*\*\* | 0 | | Llama 3.2 1B QLora | 1.3k | 0 | 700 | 0.381 | 0 | | Llama 3.2 3B QLora | 1.6k | 0 | 700 | 0.461 | 0 | | Total | 833k | 86k | | 240 | 0 | \*\* The location-based CO2e emissions of Llama 3.2 1B SpinQuant and Llama 3.2 3B SpinQuant are less than 0.001 metric tonnes each. This is due to the minimal training GPU hours that are required. The methodology used to determine training energy use and greenhouse gas emissions can be found [here](https://arxiv.org/pdf/2204.05149). Since Meta is openly releasing these models, the training energy use and greenhouse gas emissions will not be incurred by others. ## Training Data **Overview:** Llama 3.2 was pretrained on up to 9 trillion tokens of data from publicly available sources. For the 1B and 3B Llama 3.2 models, we incorporated logits from the Llama 3.1 8B and 70B models into the pretraining stage of the model development, where outputs (logits) from these larger models were used as token-level targets. Knowledge distillation was used after pruning to recover performance. In post-training we used a similar recipe as Llama 3.1 and produced final chat models by doing several rounds of alignment on top of the pre-trained model. Each round involved Supervised Fine-Tuning (SFT), Rejection Sampling (RS), and Direct Preference Optimization (DPO). **Data Freshness:** The pretraining data has a cutoff of December 2023\. ## Quantization ### Quantization Scheme We designed the current quantization scheme with the [PyTorch’s ExecuTorch](https://github.com/pytorch/executorch) inference framework and Arm CPU backend in mind, taking into account metrics including model quality, prefill/decoding speed, and memory footprint. Our quantization scheme involves three parts: - All linear layers in all transformer blocks are quantized to a 4-bit groupwise scheme (with a group size of 32) for weights and 8-bit per-token dynamic quantization for activations. - The classification layer is quantized to 8-bit per-channel for weight and 8-bit per token dynamic quantization for activation. - Similar to classification layer, an 8-bit per channel quantization is used for embedding layer. ### Quantization-Aware Training and LoRA The quantization-aware training (QAT) with low-rank adaptation (LoRA) models went through only post-training stages, using the same data as the full precision models. To initialize QAT, we utilize BF16 Llama 3.2 model checkpoints obtained after supervised fine-tuning (SFT) and perform an additional full round of SFT training with QAT. We then freeze the backbone of the QAT model and perform another round of SFT with LoRA adaptors applied to all layers within the transformer block. Meanwhile, the LoRA adaptors' weights and activations are maintained in BF16. Because our approach is similar to QLoRA of Dettmers et al., (2023) (i.e., quantization followed by LoRA adapters), we refer this method as QLoRA. Finally, we fine-tune the resulting model (both backbone and LoRA adaptors) using direct preference optimization (DPO). ### SpinQuant [SpinQuant](https://arxiv.org/abs/2405.16406) was applied, together with generative post-training quantization (GPTQ). For the SpinQuant rotation matrix fine-tuning, we optimized for 100 iterations, using 800 samples with sequence-length 2048 from the WikiText 2 dataset. For GPTQ, we used 128 samples from the same dataset with the same sequence-length. ## Benchmarks \- English Text In this section, we report the results for Llama 3.2 models on standard automatic benchmarks. For all these evaluations, we used our internal evaluations library. ### Base Pretrained Models | Category | Benchmark | \# Shots | Metric | Llama 3.2 1B | Llama 3.2 3B | Llama 3.1 8B | | ----- | ----- | :---: | :---: | :---: | :---: | :---: | | General | MMLU | 5 | macro\_avg/acc\_char | 32.2 | 58 | 66.7 | | | AGIEval English | 3-5 | average/acc\_char | 23.3 | 39.2 | 47.8 | | | ARC-Challenge | 25 | acc\_char | 32.8 | 69.1 | 79.7 | | Reading comprehension | SQuAD | 1 | em | 49.2 | 67.7 | 77 | | | QuAC (F1) | 1 | f1 | 37.9 | 42.9 | 44.9 | | | DROP (F1) | 3 | f1 | 28.0 | 45.2 | 59.5 | | Long Context | Needle in Haystack | 0 | em | 96.8 | 1 | 1 | ### Instruction Tuned Models | Capability | | Benchmark | \# Shots | Metric | Llama 3.2 1B bf16 | Llama 3.2 1B Vanilla PTQ\*\* | Llama 3.2 1B Spin Quant | Llama 3.2 1B QLoRA | Llama 3.2 3B bf16 | Llama 3.2 3B Vanilla PTQ\*\* | Llama 3.2 3B Spin Quant | Llama 3.2 3B QLoRA | Llama 3.1 8B | | :---: | ----- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | General | | MMLU | 5 | macro\_avg/acc | 49.3 | 43.3 | 47.3 | 49.0 | 63.4 | 60.5 | 62 | 62.4 | 69.4 | | Re-writing | | Open-rewrite eval | 0 | micro\_avg/rougeL | 41.6 | 39.2 | 40.9 | 41.2 | 40.1 | 40.3 | 40.8 | 40.7 | 40.9 | | Summarization | | TLDR9+ (test) | 1 | rougeL | 16.8 | 14.9 | 16.7 | 16.8 | 19.0 | 19.1 | 19.2 | 19.1 | 17.2 | | Instruction following | | IFEval | 0 | Avg(Prompt/Instruction acc Loose/Strict) | 59.5 | 51.5 | 58.4 | 55.6 | 77.4 | 73.9 | 73.5 | 75.9 | 80.4 | | Math | | GSM8K (CoT) | 8 | em\_maj1@1 | 44.4 | 33.1 | 40.6 | 46.5 | 77.7 | 72.9 | 75.7 | 77.9 | 84.5 | | | | MATH (CoT) | 0 | final\_em | 30.6 | 20.5 | 25.3 | 31.0 | 48.0 | 44.2 | 45.3 | 49.2 | 51.9 | | Reasoning | | ARC-C | 0 | acc | 59.4 | 54.3 | 57 | 60.7 | 78.6 | 75.6 | 77.6 | 77.6 | 83.4 | | | | GPQA | 0 | acc | 27.2 | 25.9 | 26.3 | 25.9 | 32.8 | 32.8 | 31.7 | 33.9 | 32.8 | | | | Hellaswag | 0 | acc | 41.2 | 38.1 | 41.3 | 41.5 | 69.8 | 66.3 | 68 | 66.3 | 78.7 | | Tool Use | | BFCL V2 | 0 | acc | 25.7 | 14.3 | 15.9 | 23.7 | 67.0 | 53.4 | 60.1 | 63.5 | 67.1 | | | | Nexus | 0 | macro\_avg/acc | 13.5 | 5.2 | 9.6 | 12.5 | 34.3 | 32.4 | 31.5 | 30.1 | 38.5 | | Long Context | | InfiniteBench/En.QA | 0 | longbook\_qa/f1 | 20.3 | N/A | N/A | N/A | 19.8 | N/A | N/A | N/A | 27.3 | | | | InfiniteBench/En.MC | 0 | longbook\_choice/acc | 38.0 | N/A | N/A | N/A | 63.3 | N/A | N/A | N/A | 72.2 | | | | NIH/Multi-needle | 0 | recall | 75.0 | N/A | N/A | N/A | 84.7 | N/A | N/A | N/A | 98.8 | | Multilingual | | MGSM (CoT) | 0 | em | 24.5 | 13.7 | 18.2 | 24.4 | 58.2 | 48.9 | 54.3 | 56.8 | 68.9 | \*\*for comparison purposes only. Model not released. ### Multilingual Benchmarks | Category | Benchmark | Language | Llama 3.2 1B | Llama 3.2 1B Vanilla PTQ\*\* | Llama 3.2 1B Spin Quant | Llama 3.2 1B QLoRA | Llama 3.2 3B | Llama 3.2 3B Vanilla PTQ\*\* | Llama 3.2 3B Spin Quant | Llama 3.2 3B QLoRA | Llama 3.1 8B | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | General | MMLU (5-shot, macro_avg/acc) | Portuguese | 39.8 | 34.9 | 38.9 | 40.2 | 54.5 | 50.9 | 53.3 | 53.4 | 62.1 | | | | Spanish | 41.5 | 36.0 | 39.8 | 41.8 | 55.1 | 51.9 | 53.6 | 53.6 | 62.5 | | | | Italian | 39.8 | 34.9 | 38.1 | 40.6 | 53.8 | 49.9 | 52.1 | 51.7 | 61.6 | | | | German | 39.2 | 34.9 | 37.5 | 39.6 | 53.3 | 50.0 | 52.2 | 51.3 | 60.6 | | | | French | 40.5 | 34.8 | 39.2 | 40.8 | 54.6 | 51.2 | 53.3 | 53.3 | 62.3 | | | | Hindi | 33.5 | 30.0 | 32.1 | 34.0 | 43.3 | 40.4 | 42.0 | 42.1 | 50.9 | | | | Thai | 34.7 | 31.2 | 32.4 | 34.9 | 44.5 | 41.3 | 44.0 | 42.2 | 50.3 | \*\*for comparison purposes only. Model not released. ## Inference time In the below table, we compare the performance metrics of different quantization methods (SpinQuant and QAT \+ LoRA) with the BF16 baseline. The evaluation was done using the [ExecuTorch](https://github.com/pytorch/executorch) framework as the inference engine, with the ARM CPU as a backend using Android OnePlus 12 device. | Category | Decode (tokens/sec) | Time-to-first-token (sec) | Prefill (tokens/sec) | Model size (PTE file size in MB) | Memory size (RSS in MB) | | :---- | ----- | ----- | ----- | ----- | ----- | | 1B BF16 (baseline) | 19.2 | 1.0 | 60.3 | 2358 | 3,185 | | 1B SpinQuant | 50.2 (2.6x) | 0.3 (-76.9%) | 260.5 (4.3x) | 1083 (-54.1%) | 1,921 (-39.7%) | | 1B QLoRA | 45.8 (2.4x) | 0.3 (-76.0%) | 252.0 (4.2x) | 1127 (-52.2%) | 2,255 (-29.2%) | | 3B BF16 (baseline) | 7.6 | 3.0 | 21.2 | 6129 | 7,419 | | 3B SpinQuant | 19.7 (2.6x) | 0.7 (-76.4%) | 89.7 (4.2x) | 2435 (-60.3%) | 3,726 (-49.8%) | | 3B QLoRA | 18.5 (2.4x) | 0.7 (-76.1%) | 88.8 (4.2x) | 2529 (-58.7%) | 4,060 (-45.3%) | (\*) The performance measurement is done using an adb binary-based approach. (\*\*) It is measured on an Android OnePlus 12 device. (\*\*\*) Time-to-first-token (TTFT) is measured with prompt length=64 *Footnote:* - *Decode (tokens/second) is for how quickly it keeps generating. Higher is better.* - *Time-to-first-token (TTFT for shorthand) is for how fast it generates the first token for a given prompt. Lower is better.* - *Prefill is the inverse of TTFT (aka 1/TTFT) in tokens/second. Higher is better* - *Model size \- how big is the model, measured by, PTE file, a binary file format for ExecuTorch* - *RSS size \- Memory usage in resident set size (RSS)* ## Responsibility & Safety As part of our Responsible release approach, we followed a three-pronged strategy to managing trust & safety risks: 1. Enable developers to deploy helpful, safe and flexible experiences for their target audience and for the use cases supported by Llama 2. Protect developers against adversarial users aiming to exploit Llama capabilities to potentially cause harm 3. Provide protections for the community to help prevent the misuse of our models ### Responsible Deployment **Approach:** Llama is a foundational technology designed to be used in a variety of use cases. Examples on how Meta’s Llama models have been responsibly deployed can be found in our [Community Stories webpage](https://llama.meta.com/community-stories/). Our approach is to build the most helpful models, enabling the world to benefit from the technology power, by aligning our model safety for generic use cases and addressing a standard set of harms. Developers are then in the driver’s seat to tailor safety for their use cases, defining their own policies and deploying the models with the necessary safeguards in their Llama systems. Llama 3.2 was developed following the best practices outlined in our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide/). #### Llama 3.2 Instruct **Objective:** Our main objectives for conducting safety fine-tuning are to provide the research community with a valuable resource for studying the robustness of safety fine-tuning, as well as to offer developers a readily available, safe, and powerful model for various applications to reduce the developer workload to deploy safe AI systems. We implemented the same set of safety mitigations as in Llama 3, and you can learn more about these in the Llama 3 [paper](https://ai.meta.com/research/publications/the-llama-3-herd-of-models/). **Fine-Tuning Data:** We employ a multi-faceted approach to data collection, combining human-generated data from our vendors with synthetic data to mitigate potential safety risks. We’ve developed many large language model (LLM)-based classifiers that enable us to thoughtfully select high-quality prompts and responses, enhancing data quality control. **Refusals and Tone:** Building on the work we started with Llama 3, we put a great emphasis on model refusals to benign prompts as well as refusal tone. We included both borderline and adversarial prompts in our safety data strategy, and modified our safety data responses to follow tone guidelines. #### Llama 3.2 Systems **Safety as a System:** Large language models, including Llama 3.2, **are not designed to be deployed in isolation** but instead should be deployed as part of an overall AI system with additional safety guardrails as required. Developers are expected to deploy system safeguards when building agentic systems. Safeguards are key to achieve the right helpfulness-safety alignment as well as mitigating safety and security risks inherent to the system and any integration of the model or system with external tools. As part of our responsible release approach, we provide the community with [safeguards](https://llama.meta.com/trust-and-safety/) that developers should deploy with Llama models or other LLMs, including Llama Guard, Prompt Guard and Code Shield. All our [reference implementations](https://github.com/meta-llama/llama-agentic-system) demos contain these safeguards by default so developers can benefit from system-level safety out-of-the-box. ### New Capabilities and Use Cases **Technological Advancement:** Llama releases usually introduce new capabilities that require specific considerations in addition to the best practices that generally apply across all Generative AI use cases. For prior release capabilities also supported by Llama 3.2, see [Llama 3.1 Model Card](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md), as the same considerations apply here as well. **Constrained Environments:** Llama 3.2 1B and 3B models are expected to be deployed in highly constrained environments, such as mobile devices. LLM Systems using smaller models will have a different alignment profile and safety/helpfulness tradeoff than more complex, larger systems. Developers should ensure the safety of their system meets the requirements of their use case. We recommend using lighter system safeguards for such use cases, like Llama Guard 3-1B or its mobile-optimized version. ### Evaluations **Scaled Evaluations:** We built dedicated, adversarial evaluation datasets and evaluated systems composed of Llama models and Purple Llama safeguards to filter input prompt and output response. It is important to evaluate applications in context, and we recommend building dedicated evaluation dataset for your use case. **Red Teaming:** We conducted recurring red teaming exercises with the goal of discovering risks via adversarial prompting and we used the learnings to improve our benchmarks and safety tuning datasets. We partnered early with subject-matter experts in critical risk areas to understand the nature of these real-world harms and how such models may lead to unintended harm for society. Based on these conversations, we derived a set of adversarial goals for the red team to attempt to achieve, such as extracting harmful information or reprogramming the model to act in a potentially harmful capacity. The red team consisted of experts in cybersecurity, adversarial machine learning, responsible AI, and integrity in addition to multilingual content specialists with background in integrity issues in specific geographic markets. ### Critical Risks In addition to our safety work above, we took extra care on measuring and/or mitigating the following critical risk areas: **1\. CBRNE (Chemical, Biological, Radiological, Nuclear, and Explosive Weapons):** Llama 3.2 1B and 3B models are smaller and less capable derivatives of Llama 3.1. For Llama 3.1 70B and 405B, to assess risks related to proliferation of chemical and biological weapons, we performed uplift testing designed to assess whether use of Llama 3.1 models could meaningfully increase the capabilities of malicious actors to plan or carry out attacks using these types of weapons and have determined that such testing also applies to the smaller 1B and 3B models. **2\. Child Safety:** Child Safety risk assessments were conducted using a team of experts, to assess the model’s capability to produce outputs that could result in Child Safety risks and inform on any necessary and appropriate risk mitigations via fine tuning. We leveraged those expert red teaming sessions to expand the coverage of our evaluation benchmarks through Llama 3 model development. For Llama 3, we conducted new in-depth sessions using objective based methodologies to assess the model risks along multiple attack vectors including the additional languages Llama 3 is trained on. We also partnered with content specialists to perform red teaming exercises assessing potentially violating content while taking account of market specific nuances or experiences. **3\. Cyber Attacks:** For Llama 3.1 405B, our cyber attack uplift study investigated whether LLMs can enhance human capabilities in hacking tasks, both in terms of skill level and speed. Our attack automation study focused on evaluating the capabilities of LLMs when used as autonomous agents in cyber offensive operations, specifically in the context of ransomware attacks. This evaluation was distinct from previous studies that considered LLMs as interactive assistants. The primary objective was to assess whether these models could effectively function as independent agents in executing complex cyber-attacks without human intervention. Because Llama 3.2’s 1B and 3B models are smaller and less capable models than Llama 3.1 405B, we broadly believe that the testing conducted for the 405B model also applies to Llama 3.2 models. ### Community **Industry Partnerships:** Generative AI safety requires expertise and tooling, and we believe in the strength of the open community to accelerate its progress. We are active members of open consortiums, including the AI Alliance, Partnership on AI and MLCommons, actively contributing to safety standardization and transparency. We encourage the community to adopt taxonomies like the MLCommons Proof of Concept evaluation to facilitate collaboration and transparency on safety and content evaluations. Our Purple Llama tools are open sourced for the community to use and widely distributed across ecosystem partners including cloud service providers. We encourage community contributions to our [Github repository](https://github.com/meta-llama/PurpleLlama). **Grants:** We also set up the [Llama Impact Grants](https://llama.meta.com/llama-impact-grants/) program to identify and support the most compelling applications of Meta’s Llama model for societal benefit across three categories: education, climate and open innovation. The 20 finalists from the hundreds of applications can be found [here](https://llama.meta.com/llama-impact-grants/#finalists). **Reporting:** Finally, we put in place a set of resources including an [output reporting mechanism](https://developers.facebook.com/llama_output_feedback) and [bug bounty program](https://www.facebook.com/whitehat) to continuously improve the Llama technology with the help of the community. ## Ethical Considerations and Limitations **Values:** The core values of Llama 3.2 are openness, inclusivity and helpfulness. It is meant to serve everyone, and to work for a wide range of use cases. It is thus designed to be accessible to people across many different backgrounds, experiences and perspectives. Llama 3.2 addresses users and their needs as they are, without insertion unnecessary judgment or normativity, while reflecting the understanding that even content that may appear problematic in some cases can serve valuable purposes in others. It respects the dignity and autonomy of all users, especially in terms of the values of free thought and expression that power innovation and progress. **Testing:** Llama 3.2 is a new technology, and like any new technology, there are risks associated with its use. Testing conducted to date has not covered, nor could it cover, all scenarios. For these reasons, as with all LLMs, Llama 3.2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 3.2 models, developers should perform safety testing and tuning tailored to their specific applications of the model. Please refer to available resources including our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide), [Trust and Safety](https://llama.meta.com/trust-and-safety/) solutions, and other [resources](https://llama.meta.com/docs/get-started/) to learn more about responsible development.
{"language": ["en", "de", "fr", "it", "pt", "hi", "es", "th"], "library_name": "transformers", "license": "llama3.2", "pipeline_tag": "text-generation", "tags": ["facebook", "meta", "pytorch", "llama", "llama-3"], "extra_gated_prompt": "### LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\n\nLlama 3.2 Version Release Date: September 25, 2024\n\n“Agreement” means the terms and conditions for use, reproduction, distribution and modification of the Llama Materials set forth herein.\n\n“Documentation” means the specifications, manuals and documentation accompanying Llama 3.2 distributed by Meta at https://llama.meta.com/doc/overview.\n\n“Licensee” or “you” means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.\n\n“Llama 3.2” means the foundational large language models and software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing distributed by Meta at https://www.llama.com/llama-downloads.\n\n“Llama Materials” means, collectively, Meta’s proprietary Llama 3.2 and Documentation (and any portion thereof) made available under this Agreement.\n\n“Meta” or “we” means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland). \n\nBy clicking “I Accept” below or by using or distributing any portion or element of the Llama Materials, you agree to be bound by this Agreement.\n\n1. License Rights and Redistribution.\na. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Llama Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Llama Materials. \nb. Redistribution and Use. \ni. If you distribute or make available the Llama Materials (or any derivative works thereof), or a product or service (including another AI model) that contains any of them, you shall (A) provide a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with Llama” on a related website, user interface, blogpost, about page, or product documentation. If you use the Llama Materials or any outputs or results of the Llama Materials to create, train, fine tune, or otherwise improve an AI model, which is distributed or made available, you shall also include “Llama” at the beginning of any such AI model name.\nii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part of an integrated end user product, then Section 2 of this Agreement will not apply to you. \niii. You must retain in all copies of the Llama Materials that you distribute the following attribution notice within a “Notice” text file distributed as a part of such copies: “Llama 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.”\niv. Your use of the Llama Materials must comply with applicable laws and regulations (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama Materials (available at https://www.llama.com/llama3_2/use-policy), which is hereby incorporated by reference into this Agreement.\n \n2. Additional Commercial Terms. If, on the Llama 3.2 version release date, the monthly active users of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700 million monthly active users in the preceding calendar month, you must request a license from Meta, which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the rights under this Agreement unless or until Meta otherwise expressly grants you such rights.\n3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.\n4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.\n5. Intellectual Property.\na. No trademark licenses are granted under this Agreement, and in connection with the Llama Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates, except as required for reasonable and customary use in describing and redistributing the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a license to use “Llama” (the “Mark”) solely as required to comply with the last sentence of Section 1.b.i. You will comply with Meta’s brand guidelines (currently accessible at https://about.meta.com/brand/resources/meta/company-brand/). All goodwill arising out of your use of the Mark will inure to the benefit of Meta.\nb. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the Llama Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.\nc. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Llama 3.2 outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the Llama Materials.\n6. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Llama Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this Agreement. \n7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement. \n### Llama 3.2 Acceptable Use Policy\nMeta is committed to promoting safe and fair use of its tools and features, including Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use Policy (“**Policy**”). The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\n#### Prohibited Uses\nWe want everyone to use Llama 3.2 safely and responsibly. You agree you will not use, or allow others to use, Llama 3.2 to:\n1. Violate the law or others’ rights, including to:\n 1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:\n 1. Violence or terrorism\n 2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material\n 3. Human trafficking, exploitation, and sexual violence\n 4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.\n 5. Sexual solicitation\n 6. Any other criminal activity\n 1. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals\n 2. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services\n 3. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices\n 4. Collect, process, disclose, generate, or infer private or sensitive information about individuals, including information about individuals’ identity, health, or demographic information, unless you have obtained the right to do so in accordance with applicable law\n 5. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama Materials\n 6. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system\n 7. Engage in any action, or facilitate any action, to intentionally circumvent or remove usage restrictions or other safety measures, or to enable functionality disabled by Meta \n2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Llama 3.2 related to the following:\n 8. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State or to the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons Convention Implementation Act of 1997\n 9. Guns and illegal weapons (including weapon development)\n 10. Illegal drugs and regulated/controlled substances\n 11. Operation of critical infrastructure, transportation technologies, or heavy machinery\n 12. Self-harm or harm to others, including suicide, cutting, and eating disorders\n 13. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual\n3. Intentionally deceive or mislead others, including use of Llama 3.2 related to the following:\n 14. Generating, promoting, or furthering fraud or the creation or promotion of disinformation\n 15. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content\n 16. Generating, promoting, or further distributing spam\n 17. Impersonating another individual without consent, authorization, or legal right\n 18. Representing that the use of Llama 3.2 or outputs are human-generated\n 19. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement \n4. Fail to appropriately disclose to end users any known dangers of your AI system 5. Interact with third party tools, models, or software designed to generate unlawful content or engage in unlawful or harmful conduct and/or represent that the outputs of such tools, models, or software are associated with Meta or Llama 3.2\n\nWith respect to any multimodal models included in Llama 3.2, the rights granted under Section 1(a) of the Llama 3.2 Community License Agreement are not being granted to you if you are an individual domiciled in, or a company with a principal place of business in, the European Union. This restriction does not apply to end users of a product or service that incorporates any such multimodal models.\n\nPlease report any violation of this Policy, software “bug,” or other problems that could lead to a violation of this Policy through one of the following means:\n\n* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues&h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\n* Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\n* Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\n* Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama 3.2: [email protected]", "extra_gated_fields": {"First Name": "text", "Last Name": "text", "Date of birth": "date_picker", "Country": "country", "Affiliation": "text", "Job title": {"type": "select", "options": ["Student", "Research Graduate", "AI researcher", "AI developer/engineer", "Reporter", "Other"]}, "geo": "ip_location", "By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy": "checkbox"}, "extra_gated_description": "The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).", "extra_gated_button_content": "Submit"}
task
[ "SUMMARIZATION" ]
46,465
MikaSie/LexLM_Longformer_BART_hybrid_V1
MikaSie
summarization
[ "transformers", "safetensors", "bart", "text2text-generation", "summarization", "abstractive", "hybrid", "multistep", "en", "dataset:dennlinger/eur-lex-sum", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-05-27T18:45:31Z
2024-07-15T16:44:33+00:00
183
0
--- base_model: BART datasets: dennlinger/eur-lex-sum language: en pipeline_tag: summarization tags: - summarization - abstractive - hybrid - multistep model-index: - name: BART results: - task: type: summarization name: Long, Legal Document Summarization dataset: name: eur-lex-sum type: dennlinger/eur-lex-sum metrics: - type: ROUGE-1 value: 0.46189288536422823 - type: ROUGE-2 value: 0.18188091639965104 - type: ROUGE-L value: 0.21889967371871621 - type: BERTScore value: 0.869219777304367 - type: BARTScore value: -3.5833421915219272 - type: BLANC value: 0.11994631986690428 --- # Model Card for LexLM_Longformer_BART_hybrid_V1 ## Model Details --- ### Model Description This model is a fine-tuned version of BART. The research involves a multi-step summarization approach to long, legal documents. Many decisions in the renewables energy space are heavily dependent on regulations. But these regulations are often long and complicated. The proposed architecture first uses one or more extractive summarization steps to compress the source text, before the final summary is created by the abstractive summarization model. This fine-tuned abstractive model has been trained on a dataset, pre-processed through extractive summarization by LexLM_Longformer with hybrid ratio. The research has used multiple extractive-abstractive model combinations, which can be found on https://huggingface.co/MikaSie. To obtain optimal results, feed the model an extractive summary as input as it was designed this way! The dataset used by this model is the [EUR-lex-sum](https://huggingface.co/datasets/dennlinger/eur-lex-sum) dataset. The evaluation metrics can be found in the metadata of this model card. This paper was introduced by the master thesis of Mika Sie at the University Utrecht in collaboration with Power2x. More information can be found in PAPER_LINK. - **Developed by:** Mika Sie - **Funded by:** University Utrecht & Power2X - **Language (NLP):** English - **Finetuned from model:** BART ### Model Sources - **Repository**: https://github.com/MikaSie/Thesis - **Paper**: PAPER_LINK - **Streamlit demo**: STREAMLIT_LINK ## Uses --- ### Direct Use This model can be directly used for summarizing long, legal documents. However, it is recommended to first use an extractive summarization tool, such as LexLM_Longformer, to compress the source text before feeding it to this model. This model has been specifically designed to work with extractive summaries. An example using the Huggingface pipeline could be: ```python pip install bert-extractive-summarizer from summarizer import Summarizer from transformers import pipeline extractive_model = Summarizer() text = 'Original document text to be summarized' extractive_summary = Summarizer(text) abstractive_model = pipeline('summarization', model = 'MikaSie/LexLM_Longformer_BART_hybrid_V1', tokenizer = 'MikaSie/LexLM_Longformer_BART_hybrid_V1') result = pipeline(extractive_summary) ``` But more information of implementation can be found in the Thesis report. ### Out-of-Scope Use Using this model without an extractive summarization step may not yield optimal results. It is recommended to follow the proposed multi-step summarization approach outlined in the model description for best performance. ## Bias, Risks, and Limitations --- ### Bias As with any language model, this model may inherit biases present in the training data. It is important to be aware of potential biases in the source text and to critically evaluate the generated summaries. ### Risks - The model may not always generate accurate or comprehensive summaries, especially for complex legal documents. - The model may not generate truthful information. ### Limitations - The model may produce summaries that are overly abstractive or fail to capture important details. - The model's performance may vary depending on the quality and relevance of the extractive summaries used as input. ### Recommendations - Carefully review and validate the generated summaries before relying on them for critical tasks. - Consider using the model in conjunction with human review or other validation mechanisms to ensure the accuracy and completeness of the summaries. - Experiment with different extractive summarization models or techniques to find the most suitable input for the abstractive model. - Provide feedback and contribute to the ongoing research and development of the model to help improve its performance and address its limitations. - Any actions taken based on this content are at your own risk.
null
Non_BioNLP
# Model Card for LexLM_Longformer_BART_hybrid_V1 ## Model Details --- ### Model Description This model is a fine-tuned version of BART. The research involves a multi-step summarization approach to long, legal documents. Many decisions in the renewables energy space are heavily dependent on regulations. But these regulations are often long and complicated. The proposed architecture first uses one or more extractive summarization steps to compress the source text, before the final summary is created by the abstractive summarization model. This fine-tuned abstractive model has been trained on a dataset, pre-processed through extractive summarization by LexLM_Longformer with hybrid ratio. The research has used multiple extractive-abstractive model combinations, which can be found on https://huggingface.co/MikaSie. To obtain optimal results, feed the model an extractive summary as input as it was designed this way! The dataset used by this model is the [EUR-lex-sum](https://huggingface.co/datasets/dennlinger/eur-lex-sum) dataset. The evaluation metrics can be found in the metadata of this model card. This paper was introduced by the master thesis of Mika Sie at the University Utrecht in collaboration with Power2x. More information can be found in PAPER_LINK. - **Developed by:** Mika Sie - **Funded by:** University Utrecht & Power2X - **Language (NLP):** English - **Finetuned from model:** BART ### Model Sources - **Repository**: https://github.com/MikaSie/Thesis - **Paper**: PAPER_LINK - **Streamlit demo**: STREAMLIT_LINK ## Uses --- ### Direct Use This model can be directly used for summarizing long, legal documents. However, it is recommended to first use an extractive summarization tool, such as LexLM_Longformer, to compress the source text before feeding it to this model. This model has been specifically designed to work with extractive summaries. An example using the Huggingface pipeline could be: ```python pip install bert-extractive-summarizer from summarizer import Summarizer from transformers import pipeline extractive_model = Summarizer() text = 'Original document text to be summarized' extractive_summary = Summarizer(text) abstractive_model = pipeline('summarization', model = 'MikaSie/LexLM_Longformer_BART_hybrid_V1', tokenizer = 'MikaSie/LexLM_Longformer_BART_hybrid_V1') result = pipeline(extractive_summary) ``` But more information of implementation can be found in the Thesis report. ### Out-of-Scope Use Using this model without an extractive summarization step may not yield optimal results. It is recommended to follow the proposed multi-step summarization approach outlined in the model description for best performance. ## Bias, Risks, and Limitations --- ### Bias As with any language model, this model may inherit biases present in the training data. It is important to be aware of potential biases in the source text and to critically evaluate the generated summaries. ### Risks - The model may not always generate accurate or comprehensive summaries, especially for complex legal documents. - The model may not generate truthful information. ### Limitations - The model may produce summaries that are overly abstractive or fail to capture important details. - The model's performance may vary depending on the quality and relevance of the extractive summaries used as input. ### Recommendations - Carefully review and validate the generated summaries before relying on them for critical tasks. - Consider using the model in conjunction with human review or other validation mechanisms to ensure the accuracy and completeness of the summaries. - Experiment with different extractive summarization models or techniques to find the most suitable input for the abstractive model. - Provide feedback and contribute to the ongoing research and development of the model to help improve its performance and address its limitations. - Any actions taken based on this content are at your own risk.
{"base_model": "BART", "datasets": "dennlinger/eur-lex-sum", "language": "en", "pipeline_tag": "summarization", "tags": ["summarization", "abstractive", "hybrid", "multistep"], "model-index": [{"name": "BART", "results": [{"task": {"type": "summarization", "name": "Long, Legal Document Summarization"}, "dataset": {"name": "eur-lex-sum", "type": "dennlinger/eur-lex-sum"}, "metrics": [{"type": "ROUGE-1", "value": 0.46189288536422823}, {"type": "ROUGE-2", "value": 0.18188091639965104}, {"type": "ROUGE-L", "value": 0.21889967371871621}, {"type": "BERTScore", "value": 0.869219777304367}, {"type": "BARTScore", "value": -3.5833421915219272}, {"type": "BLANC", "value": 0.11994631986690428}]}]}]}
task
[ "SUMMARIZATION" ]
46,466
YakovElm/Hyperledger10SetFitModel_Train_balance_ratio_4
YakovElm
text-classification
[ "sentence-transformers", "pytorch", "mpnet", "setfit", "text-classification", "arxiv:2209.11055", "license:apache-2.0", "region:us" ]
2023-06-09T18:32:09Z
2023-06-09T18:32:42+00:00
10
0
--- license: apache-2.0 pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification --- # YakovElm/Hyperledger10SetFitModel_Train_balance_ratio_4 This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("YakovElm/Hyperledger10SetFitModel_Train_balance_ratio_4") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
null
Non_BioNLP
# YakovElm/Hyperledger10SetFitModel_Train_balance_ratio_4 This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("YakovElm/Hyperledger10SetFitModel_Train_balance_ratio_4") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
{"license": "apache-2.0", "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification"]}
task
[ "TEXT_CLASSIFICATION" ]
46,467
Naruke/bge-base-financial-matryoshka
Naruke
sentence-similarity
[ "sentence-transformers", "safetensors", "bert", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:6300", "loss:MatryoshkaLoss", "loss:MultipleNegativesRankingLoss", "en", "arxiv:1908.10084", "arxiv:2205.13147", "arxiv:1705.00652", "base_model:BAAI/bge-base-en-v1.5", "base_model:finetune:BAAI/bge-base-en-v1.5", "license:apache-2.0", "model-index", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-07-05T12:16:14Z
2024-07-05T12:16:35+00:00
6
0
--- base_model: BAAI/bge-base-en-v1.5 datasets: [] language: - en library_name: sentence-transformers license: apache-2.0 metrics: - cosine_accuracy@1 - cosine_accuracy@3 - cosine_accuracy@5 - cosine_accuracy@10 - cosine_precision@1 - cosine_precision@3 - cosine_precision@5 - cosine_precision@10 - cosine_recall@1 - cosine_recall@3 - cosine_recall@5 - cosine_recall@10 - cosine_ndcg@10 - cosine_mrr@10 - cosine_map@100 pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:6300 - loss:MatryoshkaLoss - loss:MultipleNegativesRankingLoss widget: - source_sentence: Interest expense increased nominally by 1% from $935 million in 2022 to $944 million in 2023, and the change reflected only a small adjustment in the financial operations. sentences: - What recent technological advancements has the company implemented in set-top box (STB) solutions? - How much did the interest expense change from 2022 to 2023? - What are the conditions under which AENB is restricted from making dividend distributions to TRS without OCC approval? - source_sentence: Our products are sold in approximately 105 countries. sentences: - How much were the costs related to the January 2023 restructuring plan? - In how many countries are Eli Lilly and Company's products sold? - What led to the 74.3% decrease in total net revenues for the Corporate and Other segment in fiscal 2023 compared to fiscal 2022? - source_sentence: Item 8 is numbered as 39 in the document. sentences: - What number is associated with Item 8 in the document? - What was the total amount of fixed lease payment obligations as of December 31, 2023? - By how much would a 25 basis point increase in the expected rate of return on assets (ROA) affect the 2024 Pension Expense for U.S. plans? - source_sentence: The Intelligent Edge business segment under the Aruba brand includes a portfolio of solutions for secure edge-to-cloud connectivity, embracing work from anywhere environments, mobility, and IoT device connectivity. sentences: - What types of wireless services does AT&T provide in Mexico? - What was the approximate amount of civil penalties agreed upon in the consent agreement with the EPA in November 2023? - What is the focus of HPE's Intelligent Edge business segment? - source_sentence: As part of our solar energy system and energy storage contracts, we may provide the customer with performance guarantees that commit that the underlying system will meet or exceed the minimum energy generation or performance requirements specified in the contract. sentences: - What types of guarantees does Tesla provide to its solar and energy storage customers? - How many full-time employees did Microsoft report as of June 30, 2023? - How are the details about the company's legal proceedings provided in the report? model-index: - name: BGE base Financial Matryoshka results: - task: type: information-retrieval name: Information Retrieval dataset: name: dim 768 type: dim_768 metrics: - type: cosine_accuracy@1 value: 0.71 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.84 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8685714285714285 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9142857142857143 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.71 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.28 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.1737142857142857 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09142857142857143 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.71 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.84 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8685714285714285 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9142857142857143 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.8124537511621754 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.7797726757369615 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.7826418437079763 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 512 type: dim_512 metrics: - type: cosine_accuracy@1 value: 0.7042857142857143 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8357142857142857 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8657142857142858 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9114285714285715 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.7042857142857143 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2785714285714286 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.17314285714285713 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09114285714285714 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.7042857142857143 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8357142857142857 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8657142857142858 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9114285714285715 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.8077533543226267 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.77450283446712 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.7775892822045911 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 256 type: dim_256 metrics: - type: cosine_accuracy@1 value: 0.7028571428571428 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8228571428571428 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8585714285714285 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.8971428571428571 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.7028571428571428 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2742857142857143 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.1717142857142857 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.0897142857142857 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.7028571428571428 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8228571428571428 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8585714285714285 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.8971428571428571 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.8004396670945336 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.7693480725623582 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.7733203320348766 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 128 type: dim_128 metrics: - type: cosine_accuracy@1 value: 0.6771428571428572 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8142857142857143 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8542857142857143 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.8971428571428571 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.6771428571428572 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2714285714285714 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.17085714285714285 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.0897142857142857 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.6771428571428572 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8142857142857143 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8542857142857143 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.8971428571428571 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.788715031897326 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.7538418367346936 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.7573369186799356 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 64 type: dim_64 metrics: - type: cosine_accuracy@1 value: 0.6642857142857143 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.7814285714285715 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8128571428571428 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.86 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.6642857142857143 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2604761904761905 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.16257142857142853 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.086 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.6642857142857143 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.7814285714285715 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8128571428571428 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.86 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.7600084252085629 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.7282585034013601 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.733116708012112 name: Cosine Map@100 --- # BGE base Financial Matryoshka This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). It maps sentences & paragraphs to a 768-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:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 tokens - **Similarity Function:** Cosine Similarity <!-- - **Training Dataset:** Unknown --> - **Language:** en - **License:** apache-2.0 ### 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': 512, 'do_lower_case': True}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("Naruke/bge-base-financial-matryoshka") # Run inference sentences = [ 'As part of our solar energy system and energy storage contracts, we may provide the customer with performance guarantees that commit that the underlying system will meet or exceed the minimum energy generation or performance requirements specified in the contract.', 'What types of guarantees does Tesla provide to its solar and energy storage customers?', 'How many full-time employees did Microsoft report as of June 30, 2023?', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Dataset: `dim_768` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.71 | | cosine_accuracy@3 | 0.84 | | cosine_accuracy@5 | 0.8686 | | cosine_accuracy@10 | 0.9143 | | cosine_precision@1 | 0.71 | | cosine_precision@3 | 0.28 | | cosine_precision@5 | 0.1737 | | cosine_precision@10 | 0.0914 | | cosine_recall@1 | 0.71 | | cosine_recall@3 | 0.84 | | cosine_recall@5 | 0.8686 | | cosine_recall@10 | 0.9143 | | cosine_ndcg@10 | 0.8125 | | cosine_mrr@10 | 0.7798 | | **cosine_map@100** | **0.7826** | #### Information Retrieval * Dataset: `dim_512` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7043 | | cosine_accuracy@3 | 0.8357 | | cosine_accuracy@5 | 0.8657 | | cosine_accuracy@10 | 0.9114 | | cosine_precision@1 | 0.7043 | | cosine_precision@3 | 0.2786 | | cosine_precision@5 | 0.1731 | | cosine_precision@10 | 0.0911 | | cosine_recall@1 | 0.7043 | | cosine_recall@3 | 0.8357 | | cosine_recall@5 | 0.8657 | | cosine_recall@10 | 0.9114 | | cosine_ndcg@10 | 0.8078 | | cosine_mrr@10 | 0.7745 | | **cosine_map@100** | **0.7776** | #### Information Retrieval * Dataset: `dim_256` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7029 | | cosine_accuracy@3 | 0.8229 | | cosine_accuracy@5 | 0.8586 | | cosine_accuracy@10 | 0.8971 | | cosine_precision@1 | 0.7029 | | cosine_precision@3 | 0.2743 | | cosine_precision@5 | 0.1717 | | cosine_precision@10 | 0.0897 | | cosine_recall@1 | 0.7029 | | cosine_recall@3 | 0.8229 | | cosine_recall@5 | 0.8586 | | cosine_recall@10 | 0.8971 | | cosine_ndcg@10 | 0.8004 | | cosine_mrr@10 | 0.7693 | | **cosine_map@100** | **0.7733** | #### Information Retrieval * Dataset: `dim_128` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.6771 | | cosine_accuracy@3 | 0.8143 | | cosine_accuracy@5 | 0.8543 | | cosine_accuracy@10 | 0.8971 | | cosine_precision@1 | 0.6771 | | cosine_precision@3 | 0.2714 | | cosine_precision@5 | 0.1709 | | cosine_precision@10 | 0.0897 | | cosine_recall@1 | 0.6771 | | cosine_recall@3 | 0.8143 | | cosine_recall@5 | 0.8543 | | cosine_recall@10 | 0.8971 | | cosine_ndcg@10 | 0.7887 | | cosine_mrr@10 | 0.7538 | | **cosine_map@100** | **0.7573** | #### Information Retrieval * Dataset: `dim_64` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.6643 | | cosine_accuracy@3 | 0.7814 | | cosine_accuracy@5 | 0.8129 | | cosine_accuracy@10 | 0.86 | | cosine_precision@1 | 0.6643 | | cosine_precision@3 | 0.2605 | | cosine_precision@5 | 0.1626 | | cosine_precision@10 | 0.086 | | cosine_recall@1 | 0.6643 | | cosine_recall@3 | 0.7814 | | cosine_recall@5 | 0.8129 | | cosine_recall@10 | 0.86 | | cosine_ndcg@10 | 0.76 | | cosine_mrr@10 | 0.7283 | | **cosine_map@100** | **0.7331** | <!-- ## 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 ### Training Dataset #### Unnamed Dataset * Size: 6,300 training samples * Columns: <code>positive</code> and <code>anchor</code> * Approximate statistics based on the first 1000 samples: | | positive | anchor | |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 9 tokens</li><li>mean: 45.57 tokens</li><li>max: 289 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.32 tokens</li><li>max: 51 tokens</li></ul> | * Samples: | positive | anchor | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>The detailed information about commitments and contingencies related to legal proceedings is included under Note 13 in Part II, Item 8 of the Annual Report.</code> | <code>Where can detailed information about the commitments and contingencies related to legal proceedings be found in the Annual Report on Form 10-K?</code> | | <code>American Express's decision to reinvest gains into its business will depend on regulatory and other approvals, consultation requirements, the execution of ancillary agreements, the cost and availability of financing for the purchaser to fund the transaction and the potential loss of key customers, vendors and other business partners and management’s decisions regarding future operations, strategies and business initiatives.</code> | <code>What factors influence American Express's decision to reinvest gains into its business?</code> | | <code>Lease obligations as of June 30, 2023, related to office space and various facilities totaled $883.1 million, with lease terms ranging from one to 21 years and are mostly renewable.</code> | <code>How much were lease obligations related to office space and other facilities as of June 30, 2023, and what were the terms?</code> | * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters: ```json { "loss": "MultipleNegativesRankingLoss", "matryoshka_dims": [ 768, 512, 256, 128, 64 ], "matryoshka_weights": [ 1, 1, 1, 1, 1 ], "n_dims_per_step": -1 } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: epoch - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `gradient_accumulation_steps`: 16 - `learning_rate`: 2e-05 - `num_train_epochs`: 2 - `lr_scheduler_type`: cosine - `warmup_ratio`: 0.1 - `bf16`: True - `load_best_model_at_end`: True - `optim`: adamw_torch_fused - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: epoch - `prediction_loss_only`: True - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 16 - `eval_accumulation_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 2 - `max_steps`: -1 - `lr_scheduler_type`: cosine - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: True - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: True - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch_fused - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 | |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:| | 0.4061 | 10 | 0.9835 | - | - | - | - | - | | 0.8122 | 20 | 0.4319 | - | - | - | - | - | | 0.9746 | 24 | - | 0.7541 | 0.7729 | 0.7738 | 0.7242 | 0.7786 | | 1.2183 | 30 | 0.3599 | - | - | - | - | - | | 1.6244 | 40 | 0.2596 | - | - | - | - | - | | **1.9492** | **48** | **-** | **0.7573** | **0.7733** | **0.7776** | **0.7331** | **0.7826** | * The bold row denotes the saved checkpoint. ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.41.2 - PyTorch: 2.3.0+cu121 - Accelerate: 0.32.1 - Datasets: 2.20.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MatryoshkaLoss ```bibtex @misc{kusupati2024matryoshka, title={Matryoshka Representation Learning}, author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi}, year={2024}, eprint={2205.13147}, archivePrefix={arXiv}, primaryClass={cs.LG} } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
null
Non_BioNLP
# BGE base Financial Matryoshka This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). It maps sentences & paragraphs to a 768-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:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 tokens - **Similarity Function:** Cosine Similarity <!-- - **Training Dataset:** Unknown --> - **Language:** en - **License:** apache-2.0 ### 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': 512, 'do_lower_case': True}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("Naruke/bge-base-financial-matryoshka") # Run inference sentences = [ 'As part of our solar energy system and energy storage contracts, we may provide the customer with performance guarantees that commit that the underlying system will meet or exceed the minimum energy generation or performance requirements specified in the contract.', 'What types of guarantees does Tesla provide to its solar and energy storage customers?', 'How many full-time employees did Microsoft report as of June 30, 2023?', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Dataset: `dim_768` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.71 | | cosine_accuracy@3 | 0.84 | | cosine_accuracy@5 | 0.8686 | | cosine_accuracy@10 | 0.9143 | | cosine_precision@1 | 0.71 | | cosine_precision@3 | 0.28 | | cosine_precision@5 | 0.1737 | | cosine_precision@10 | 0.0914 | | cosine_recall@1 | 0.71 | | cosine_recall@3 | 0.84 | | cosine_recall@5 | 0.8686 | | cosine_recall@10 | 0.9143 | | cosine_ndcg@10 | 0.8125 | | cosine_mrr@10 | 0.7798 | | **cosine_map@100** | **0.7826** | #### Information Retrieval * Dataset: `dim_512` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7043 | | cosine_accuracy@3 | 0.8357 | | cosine_accuracy@5 | 0.8657 | | cosine_accuracy@10 | 0.9114 | | cosine_precision@1 | 0.7043 | | cosine_precision@3 | 0.2786 | | cosine_precision@5 | 0.1731 | | cosine_precision@10 | 0.0911 | | cosine_recall@1 | 0.7043 | | cosine_recall@3 | 0.8357 | | cosine_recall@5 | 0.8657 | | cosine_recall@10 | 0.9114 | | cosine_ndcg@10 | 0.8078 | | cosine_mrr@10 | 0.7745 | | **cosine_map@100** | **0.7776** | #### Information Retrieval * Dataset: `dim_256` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7029 | | cosine_accuracy@3 | 0.8229 | | cosine_accuracy@5 | 0.8586 | | cosine_accuracy@10 | 0.8971 | | cosine_precision@1 | 0.7029 | | cosine_precision@3 | 0.2743 | | cosine_precision@5 | 0.1717 | | cosine_precision@10 | 0.0897 | | cosine_recall@1 | 0.7029 | | cosine_recall@3 | 0.8229 | | cosine_recall@5 | 0.8586 | | cosine_recall@10 | 0.8971 | | cosine_ndcg@10 | 0.8004 | | cosine_mrr@10 | 0.7693 | | **cosine_map@100** | **0.7733** | #### Information Retrieval * Dataset: `dim_128` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.6771 | | cosine_accuracy@3 | 0.8143 | | cosine_accuracy@5 | 0.8543 | | cosine_accuracy@10 | 0.8971 | | cosine_precision@1 | 0.6771 | | cosine_precision@3 | 0.2714 | | cosine_precision@5 | 0.1709 | | cosine_precision@10 | 0.0897 | | cosine_recall@1 | 0.6771 | | cosine_recall@3 | 0.8143 | | cosine_recall@5 | 0.8543 | | cosine_recall@10 | 0.8971 | | cosine_ndcg@10 | 0.7887 | | cosine_mrr@10 | 0.7538 | | **cosine_map@100** | **0.7573** | #### Information Retrieval * Dataset: `dim_64` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.6643 | | cosine_accuracy@3 | 0.7814 | | cosine_accuracy@5 | 0.8129 | | cosine_accuracy@10 | 0.86 | | cosine_precision@1 | 0.6643 | | cosine_precision@3 | 0.2605 | | cosine_precision@5 | 0.1626 | | cosine_precision@10 | 0.086 | | cosine_recall@1 | 0.6643 | | cosine_recall@3 | 0.7814 | | cosine_recall@5 | 0.8129 | | cosine_recall@10 | 0.86 | | cosine_ndcg@10 | 0.76 | | cosine_mrr@10 | 0.7283 | | **cosine_map@100** | **0.7331** | <!-- ## 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 ### Training Dataset #### Unnamed Dataset * Size: 6,300 training samples * Columns: <code>positive</code> and <code>anchor</code> * Approximate statistics based on the first 1000 samples: | | positive | anchor | |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 9 tokens</li><li>mean: 45.57 tokens</li><li>max: 289 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.32 tokens</li><li>max: 51 tokens</li></ul> | * Samples: | positive | anchor | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>The detailed information about commitments and contingencies related to legal proceedings is included under Note 13 in Part II, Item 8 of the Annual Report.</code> | <code>Where can detailed information about the commitments and contingencies related to legal proceedings be found in the Annual Report on Form 10-K?</code> | | <code>American Express's decision to reinvest gains into its business will depend on regulatory and other approvals, consultation requirements, the execution of ancillary agreements, the cost and availability of financing for the purchaser to fund the transaction and the potential loss of key customers, vendors and other business partners and management’s decisions regarding future operations, strategies and business initiatives.</code> | <code>What factors influence American Express's decision to reinvest gains into its business?</code> | | <code>Lease obligations as of June 30, 2023, related to office space and various facilities totaled $883.1 million, with lease terms ranging from one to 21 years and are mostly renewable.</code> | <code>How much were lease obligations related to office space and other facilities as of June 30, 2023, and what were the terms?</code> | * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters: ```json { "loss": "MultipleNegativesRankingLoss", "matryoshka_dims": [ 768, 512, 256, 128, 64 ], "matryoshka_weights": [ 1, 1, 1, 1, 1 ], "n_dims_per_step": -1 } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: epoch - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `gradient_accumulation_steps`: 16 - `learning_rate`: 2e-05 - `num_train_epochs`: 2 - `lr_scheduler_type`: cosine - `warmup_ratio`: 0.1 - `bf16`: True - `load_best_model_at_end`: True - `optim`: adamw_torch_fused - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: epoch - `prediction_loss_only`: True - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 16 - `eval_accumulation_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 2 - `max_steps`: -1 - `lr_scheduler_type`: cosine - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: True - `fp16`: False - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: True - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch_fused - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 | |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:| | 0.4061 | 10 | 0.9835 | - | - | - | - | - | | 0.8122 | 20 | 0.4319 | - | - | - | - | - | | 0.9746 | 24 | - | 0.7541 | 0.7729 | 0.7738 | 0.7242 | 0.7786 | | 1.2183 | 30 | 0.3599 | - | - | - | - | - | | 1.6244 | 40 | 0.2596 | - | - | - | - | - | | **1.9492** | **48** | **-** | **0.7573** | **0.7733** | **0.7776** | **0.7331** | **0.7826** | * The bold row denotes the saved checkpoint. ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.0.1 - Transformers: 4.41.2 - PyTorch: 2.3.0+cu121 - Accelerate: 0.32.1 - Datasets: 2.20.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MatryoshkaLoss ```bibtex @misc{kusupati2024matryoshka, title={Matryoshka Representation Learning}, author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi}, year={2024}, eprint={2205.13147}, archivePrefix={arXiv}, primaryClass={cs.LG} } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
{"base_model": "BAAI/bge-base-en-v1.5", "datasets": [], "language": ["en"], "library_name": "sentence-transformers", "license": "apache-2.0", "metrics": ["cosine_accuracy@1", "cosine_accuracy@3", "cosine_accuracy@5", "cosine_accuracy@10", "cosine_precision@1", "cosine_precision@3", "cosine_precision@5", "cosine_precision@10", "cosine_recall@1", "cosine_recall@3", "cosine_recall@5", "cosine_recall@10", "cosine_ndcg@10", "cosine_mrr@10", "cosine_map@100"], "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:6300", "loss:MatryoshkaLoss", "loss:MultipleNegativesRankingLoss"], "widget": [{"source_sentence": "Interest expense increased nominally by 1% from $935 million in 2022 to $944 million in 2023, and the change reflected only a small adjustment in the financial operations.", "sentences": ["What recent technological advancements has the company implemented in set-top box (STB) solutions?", "How much did the interest expense change from 2022 to 2023?", "What are the conditions under which AENB is restricted from making dividend distributions to TRS without OCC approval?"]}, {"source_sentence": "Our products are sold in approximately 105 countries.", "sentences": ["How much were the costs related to the January 2023 restructuring plan?", "In how many countries are Eli Lilly and Company's products sold?", "What led to the 74.3% decrease in total net revenues for the Corporate and Other segment in fiscal 2023 compared to fiscal 2022?"]}, {"source_sentence": "Item 8 is numbered as 39 in the document.", "sentences": ["What number is associated with Item 8 in the document?", "What was the total amount of fixed lease payment obligations as of December 31, 2023?", "By how much would a 25 basis point increase in the expected rate of return on assets (ROA) affect the 2024 Pension Expense for U.S. plans?"]}, {"source_sentence": "The Intelligent Edge business segment under the Aruba brand includes a portfolio of solutions for secure edge-to-cloud connectivity, embracing work from anywhere environments, mobility, and IoT device connectivity.", "sentences": ["What types of wireless services does AT&T provide in Mexico?", "What was the approximate amount of civil penalties agreed upon in the consent agreement with the EPA in November 2023?", "What is the focus of HPE's Intelligent Edge business segment?"]}, {"source_sentence": "As part of our solar energy system and energy storage contracts, we may provide the customer with performance guarantees that commit that the underlying system will meet or exceed the minimum energy generation or performance requirements specified in the contract.", "sentences": ["What types of guarantees does Tesla provide to its solar and energy storage customers?", "How many full-time employees did Microsoft report as of June 30, 2023?", "How are the details about the company's legal proceedings provided in the report?"]}], "model-index": [{"name": "BGE base Financial Matryoshka", "results": [{"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 768", "type": "dim_768"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.71, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.84, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8685714285714285, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9142857142857143, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.71, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.28, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.1737142857142857, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09142857142857143, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.71, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.84, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8685714285714285, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9142857142857143, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.8124537511621754, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.7797726757369615, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.7826418437079763, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 512", "type": "dim_512"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.7042857142857143, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8357142857142857, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8657142857142858, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9114285714285715, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.7042857142857143, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2785714285714286, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.17314285714285713, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09114285714285714, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.7042857142857143, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8357142857142857, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8657142857142858, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9114285714285715, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.8077533543226267, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.77450283446712, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.7775892822045911, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 256", "type": "dim_256"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.7028571428571428, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8228571428571428, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8585714285714285, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.8971428571428571, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.7028571428571428, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2742857142857143, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.1717142857142857, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.0897142857142857, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.7028571428571428, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8228571428571428, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8585714285714285, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.8971428571428571, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.8004396670945336, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.7693480725623582, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.7733203320348766, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 128", "type": "dim_128"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.6771428571428572, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8142857142857143, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8542857142857143, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.8971428571428571, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.6771428571428572, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2714285714285714, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.17085714285714285, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.0897142857142857, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.6771428571428572, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8142857142857143, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8542857142857143, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.8971428571428571, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.788715031897326, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.7538418367346936, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.7573369186799356, "name": "Cosine Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "dim 64", "type": "dim_64"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.6642857142857143, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.7814285714285715, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8128571428571428, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.86, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.6642857142857143, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2604761904761905, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.16257142857142853, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.086, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.6642857142857143, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.7814285714285715, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8128571428571428, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.86, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.7600084252085629, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.7282585034013601, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.733116708012112, "name": "Cosine Map@100"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,468
tesolnet/tari01
tesolnet
text-generation
[ "transformers", "safetensors", "gpt2", "text-generation", "natural-language-processing", "causal-lm", "gpt", "distilgpt2", "arxiv:1910.09700", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2024-08-02T09:17:51Z
2024-08-02T09:33:43+00:00
50
1
--- library_name: transformers tags: - natural-language-processing - causal-lm - gpt - transformers - distilgpt2 --- # Model Card for `tesolnet/tari01` ## Model Details ### Model Description This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** TARI - **Model type:** GPT-2 variant (distilled version) - **Language(s) (NLP):** English - **License:** MIT - **Finetuned from model:** distilgpt2 ## Uses ### Direct Use This model can be used for text generation tasks such as generating text based on a prompt and creating chatbots. ### Downstream Use [optional] This model can be further fine-tuned for specific tasks such as sentiment analysis, question answering, or other NLP tasks requiring text generation. ### Out-of-Scope Use The model should not be used for generating harmful, misleading, or malicious content. It may not perform well on tasks requiring understanding of context beyond a few sentences or paragraphs. ## Bias, Risks, and Limitations This model, like all language models, can produce biased or harmful text based on the data it was trained on. Users should be aware of these limitations and use the model with caution. ### Recommendations Users (both direct and downstream) should be made aware of the risks, biases, and limitations of the model. More information is needed for further recommendations. ## How to Get Started with the Model To get started with the model, use the `transformers` library from Hugging Face. Load the model and tokenizer with the following identifiers: `tesolnet/tari01`. ```python from transformers import AutoModelForCausalLM, AutoTokenizer model = AutoModelForCausalLM.from_pretrained("tesolnet/tari01") tokenizer = AutoTokenizer.from_pretrained("tesolnet/tari01") inputs = tokenizer("Hello, my name is", return_tensors="pt") outputs = model.generate(inputs.input_ids, max_length=50) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) ``` ## Training Details ### Training Data The model was fine-tuned on 100 ebooks about computational linguistics, preprocessed and tokenized for training. ### Training Procedure #### Preprocessing [optional] The text data was tokenized using the `AutoTokenizer` from the `transformers` library with a maximum token length of 128. #### Training Hyperparameters - **Training regime:** Mixed precision (fp16) - **Learning rate:** 2e-5 - **Batch size:** 2 - **Epochs:** 1 - **Weight decay:** 0.01 #### Speeds, Sizes, Times [optional] - **Training time:** Approximately 3.85 hours ## Evaluation ### Testing Data, Factors & Metrics #### Testing Data Evaluation was performed on a subset of the training data held out for validation purposes. #### Factors Evaluation factors included token accuracy and perplexity on the validation dataset. #### Metrics Evaluation metrics included perplexity, as it measures the model's ability to predict the next token in a sequence. ### Results [More Information Needed] #### Summary The model achieved satisfactory results for text generation tasks based on the validation metrics. ## Model Examination [optional] [More Information Needed] ## Environmental Impact Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** NVIDIA GeForce RTX 4090 (2 GPUs) - **Hours used:** 3.85 hours ## Technical Specifications [optional] ### Model Architecture and Objective The model is a distilled version of GPT-2, fine-tuned for text generation tasks. ### Compute Infrastructure #### Hardware Training was performed on two NVIDIA GeForce RTX 4090 GPUs. #### Software - **OS:** Ubuntu 22.04 - **Libraries:** `transformers`, `torch`, `safetensors` ```
null
Non_BioNLP
# Model Card for `tesolnet/tari01` ## Model Details ### Model Description This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. - **Developed by:** TARI - **Model type:** GPT-2 variant (distilled version) - **Language(s) (NLP):** English - **License:** MIT - **Finetuned from model:** distilgpt2 ## Uses ### Direct Use This model can be used for text generation tasks such as generating text based on a prompt and creating chatbots. ### Downstream Use [optional] This model can be further fine-tuned for specific tasks such as sentiment analysis, question answering, or other NLP tasks requiring text generation. ### Out-of-Scope Use The model should not be used for generating harmful, misleading, or malicious content. It may not perform well on tasks requiring understanding of context beyond a few sentences or paragraphs. ## Bias, Risks, and Limitations This model, like all language models, can produce biased or harmful text based on the data it was trained on. Users should be aware of these limitations and use the model with caution. ### Recommendations Users (both direct and downstream) should be made aware of the risks, biases, and limitations of the model. More information is needed for further recommendations. ## How to Get Started with the Model To get started with the model, use the `transformers` library from Hugging Face. Load the model and tokenizer with the following identifiers: `tesolnet/tari01`. ```python from transformers import AutoModelForCausalLM, AutoTokenizer model = AutoModelForCausalLM.from_pretrained("tesolnet/tari01") tokenizer = AutoTokenizer.from_pretrained("tesolnet/tari01") inputs = tokenizer("Hello, my name is", return_tensors="pt") outputs = model.generate(inputs.input_ids, max_length=50) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) ``` ## Training Details ### Training Data The model was fine-tuned on 100 ebooks about computational linguistics, preprocessed and tokenized for training. ### Training Procedure #### Preprocessing [optional] The text data was tokenized using the `AutoTokenizer` from the `transformers` library with a maximum token length of 128. #### Training Hyperparameters - **Training regime:** Mixed precision (fp16) - **Learning rate:** 2e-5 - **Batch size:** 2 - **Epochs:** 1 - **Weight decay:** 0.01 #### Speeds, Sizes, Times [optional] - **Training time:** Approximately 3.85 hours ## Evaluation ### Testing Data, Factors & Metrics #### Testing Data Evaluation was performed on a subset of the training data held out for validation purposes. #### Factors Evaluation factors included token accuracy and perplexity on the validation dataset. #### Metrics Evaluation metrics included perplexity, as it measures the model's ability to predict the next token in a sequence. ### Results [More Information Needed] #### Summary The model achieved satisfactory results for text generation tasks based on the validation metrics. ## Model Examination [optional] [More Information Needed] ## Environmental Impact Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** NVIDIA GeForce RTX 4090 (2 GPUs) - **Hours used:** 3.85 hours ## Technical Specifications [optional] ### Model Architecture and Objective The model is a distilled version of GPT-2, fine-tuned for text generation tasks. ### Compute Infrastructure #### Hardware Training was performed on two NVIDIA GeForce RTX 4090 GPUs. #### Software - **OS:** Ubuntu 22.04 - **Libraries:** `transformers`, `torch`, `safetensors` ```
{"library_name": "transformers", "tags": ["natural-language-processing", "causal-lm", "gpt", "transformers", "distilgpt2"]}
task
[ "QUESTION_ANSWERING" ]
46,469
fathyshalab/reklambox2-2-14-xlm
fathyshalab
text-classification
[ "sentence-transformers", "pytorch", "xlm-roberta", "setfit", "text-classification", "arxiv:2209.11055", "license:apache-2.0", "region:us" ]
2023-03-03T11:33:14Z
2023-03-03T11:33:33+00:00
11
0
--- license: apache-2.0 pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification --- # fathyshalab/reklambox2-2-14-xlm This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("fathyshalab/reklambox2-2-14-xlm") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
null
Non_BioNLP
# fathyshalab/reklambox2-2-14-xlm This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("fathyshalab/reklambox2-2-14-xlm") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
{"license": "apache-2.0", "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification"]}
task
[ "TEXT_CLASSIFICATION" ]
46,470
oizumi/distilbert-base-uncased-finetuned-emotion
oizumi
text-classification
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "dataset:emotion", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-11-14T23:32:48Z
2022-11-15T09:47:58+00:00
13
0
--- datasets: - emotion license: apache-2.0 metrics: - accuracy - f1 tags: - generated_from_trainer model-index: - name: distilbert-base-uncased-finetuned-emotion results: - task: type: text-classification name: Text Classification dataset: name: emotion type: emotion args: default metrics: - type: accuracy value: 0.9245 name: Accuracy - type: f1 value: 0.9245878206545592 name: F1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-emotion This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.2259 - Accuracy: 0.9245 - F1: 0.9246 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:| | 0.8516 | 1.0 | 250 | 0.3235 | 0.9055 | 0.9024 | | 0.2547 | 2.0 | 500 | 0.2259 | 0.9245 | 0.9246 | ### Framework versions - Transformers 4.13.0 - Pytorch 1.12.1+cu113 - Datasets 1.16.1 - Tokenizers 0.10.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-emotion This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.2259 - Accuracy: 0.9245 - F1: 0.9246 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:| | 0.8516 | 1.0 | 250 | 0.3235 | 0.9055 | 0.9024 | | 0.2547 | 2.0 | 500 | 0.2259 | 0.9245 | 0.9246 | ### Framework versions - Transformers 4.13.0 - Pytorch 1.12.1+cu113 - Datasets 1.16.1 - Tokenizers 0.10.3
{"datasets": ["emotion"], "license": "apache-2.0", "metrics": ["accuracy", "f1"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert-base-uncased-finetuned-emotion", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "emotion", "type": "emotion", "args": "default"}, "metrics": [{"type": "accuracy", "value": 0.9245, "name": "Accuracy"}, {"type": "f1", "value": 0.9245878206545592, "name": "F1"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,471
Realgon/distilbert_agnews_padding40model
Realgon
text-classification
[ "transformers", "pytorch", "distilbert", "text-classification", "generated_from_trainer", "dataset:ag_news", "base_model:distilbert/distilbert-base-uncased", "base_model:finetune:distilbert/distilbert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-11-28T18:45:01Z
2023-11-29T23:49:04+00:00
107
0
--- base_model: distilbert-base-uncased datasets: - ag_news license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: distilbert_agnews_padding40model results: - task: type: text-classification name: Text Classification dataset: name: ag_news type: ag_news config: default split: test args: default metrics: - type: accuracy value: 0.9468421052631579 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert_agnews_padding40model This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the ag_news dataset. It achieves the following results on the evaluation set: - Loss: 0.6171 - Accuracy: 0.9468 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:------:|:---------------:|:--------:| | 0.1804 | 1.0 | 7500 | 0.1955 | 0.9395 | | 0.1406 | 2.0 | 15000 | 0.1970 | 0.9429 | | 0.1206 | 3.0 | 22500 | 0.2108 | 0.9467 | | 0.0878 | 4.0 | 30000 | 0.2626 | 0.9429 | | 0.0605 | 5.0 | 37500 | 0.3047 | 0.9417 | | 0.0472 | 6.0 | 45000 | 0.3698 | 0.9397 | | 0.0331 | 7.0 | 52500 | 0.4269 | 0.9367 | | 0.0251 | 8.0 | 60000 | 0.4326 | 0.9416 | | 0.0247 | 9.0 | 67500 | 0.4525 | 0.9428 | | 0.0151 | 10.0 | 75000 | 0.4580 | 0.9462 | | 0.0164 | 11.0 | 82500 | 0.5027 | 0.9455 | | 0.0074 | 12.0 | 90000 | 0.5040 | 0.9437 | | 0.0054 | 13.0 | 97500 | 0.5347 | 0.9449 | | 0.0031 | 14.0 | 105000 | 0.5753 | 0.9451 | | 0.0065 | 15.0 | 112500 | 0.5445 | 0.9453 | | 0.0012 | 16.0 | 120000 | 0.5966 | 0.9461 | | 0.0028 | 17.0 | 127500 | 0.5994 | 0.9445 | | 0.0006 | 18.0 | 135000 | 0.5948 | 0.9455 | | 0.0002 | 19.0 | 142500 | 0.6115 | 0.9471 | | 0.0008 | 20.0 | 150000 | 0.6171 | 0.9468 | ### Framework versions - Transformers 4.33.2 - Pytorch 2.0.1+cu117 - Datasets 2.14.5 - Tokenizers 0.13.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert_agnews_padding40model This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the ag_news dataset. It achieves the following results on the evaluation set: - Loss: 0.6171 - Accuracy: 0.9468 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:------:|:---------------:|:--------:| | 0.1804 | 1.0 | 7500 | 0.1955 | 0.9395 | | 0.1406 | 2.0 | 15000 | 0.1970 | 0.9429 | | 0.1206 | 3.0 | 22500 | 0.2108 | 0.9467 | | 0.0878 | 4.0 | 30000 | 0.2626 | 0.9429 | | 0.0605 | 5.0 | 37500 | 0.3047 | 0.9417 | | 0.0472 | 6.0 | 45000 | 0.3698 | 0.9397 | | 0.0331 | 7.0 | 52500 | 0.4269 | 0.9367 | | 0.0251 | 8.0 | 60000 | 0.4326 | 0.9416 | | 0.0247 | 9.0 | 67500 | 0.4525 | 0.9428 | | 0.0151 | 10.0 | 75000 | 0.4580 | 0.9462 | | 0.0164 | 11.0 | 82500 | 0.5027 | 0.9455 | | 0.0074 | 12.0 | 90000 | 0.5040 | 0.9437 | | 0.0054 | 13.0 | 97500 | 0.5347 | 0.9449 | | 0.0031 | 14.0 | 105000 | 0.5753 | 0.9451 | | 0.0065 | 15.0 | 112500 | 0.5445 | 0.9453 | | 0.0012 | 16.0 | 120000 | 0.5966 | 0.9461 | | 0.0028 | 17.0 | 127500 | 0.5994 | 0.9445 | | 0.0006 | 18.0 | 135000 | 0.5948 | 0.9455 | | 0.0002 | 19.0 | 142500 | 0.6115 | 0.9471 | | 0.0008 | 20.0 | 150000 | 0.6171 | 0.9468 | ### Framework versions - Transformers 4.33.2 - Pytorch 2.0.1+cu117 - Datasets 2.14.5 - Tokenizers 0.13.3
{"base_model": "distilbert-base-uncased", "datasets": ["ag_news"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert_agnews_padding40model", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "ag_news", "type": "ag_news", "config": "default", "split": "test", "args": "default"}, "metrics": [{"type": "accuracy", "value": 0.9468421052631579, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,472
ngeg2015/bert-base-banking77-pt2
ngeg2015
text-classification
[ "transformers", "pytorch", "bert", "text-classification", "generated_from_trainer", "dataset:banking77", "base_model:google-bert/bert-base-uncased", "base_model:finetune:google-bert/bert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-09-16T06:46:28Z
2023-09-16T07:13:58+00:00
9
0
--- base_model: bert-base-uncased datasets: - banking77 license: apache-2.0 metrics: - f1 tags: - generated_from_trainer model-index: - name: bert-base-banking77-pt2 results: - task: type: text-classification name: Text Classification dataset: name: banking77 type: banking77 config: default split: test[0:10] args: default metrics: - type: f1 value: 1.0 name: F1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bert-base-banking77-pt2 This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the banking77 dataset. It achieves the following results on the evaluation set: - Loss: 2.0297 - F1: 1.0 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 16 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 ### Training results | Training Loss | Epoch | Step | Validation Loss | F1 | |:-------------:|:-----:|:----:|:---------------:|:------:| | No log | 1.0 | 4 | 3.0563 | 0.8889 | | No log | 2.0 | 8 | 2.3672 | 1.0 | | No log | 3.0 | 12 | 2.0297 | 1.0 | ### Framework versions - Transformers 4.33.1 - Pytorch 2.0.1+cu118 - Datasets 2.14.5 - Tokenizers 0.13.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bert-base-banking77-pt2 This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the banking77 dataset. It achieves the following results on the evaluation set: - Loss: 2.0297 - F1: 1.0 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 16 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 ### Training results | Training Loss | Epoch | Step | Validation Loss | F1 | |:-------------:|:-----:|:----:|:---------------:|:------:| | No log | 1.0 | 4 | 3.0563 | 0.8889 | | No log | 2.0 | 8 | 2.3672 | 1.0 | | No log | 3.0 | 12 | 2.0297 | 1.0 | ### Framework versions - Transformers 4.33.1 - Pytorch 2.0.1+cu118 - Datasets 2.14.5 - Tokenizers 0.13.3
{"base_model": "bert-base-uncased", "datasets": ["banking77"], "license": "apache-2.0", "metrics": ["f1"], "tags": ["generated_from_trainer"], "model-index": [{"name": "bert-base-banking77-pt2", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "banking77", "type": "banking77", "config": "default", "split": "test[0:10]", "args": "default"}, "metrics": [{"type": "f1", "value": 1.0, "name": "F1"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,473
cbpuschmann/MiniLM-klimacoder_v0.1
cbpuschmann
text-classification
[ "setfit", "safetensors", "bert", "sentence-transformers", "text-classification", "generated_from_setfit_trainer", "arxiv:2209.11055", "base_model:sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", "base_model:finetune:sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", "model-index", "region:us" ]
2024-10-30T12:11:54Z
2024-10-30T12:12:15+00:00
4
0
--- base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: Bei den Koalitionsverhandlungen von SPD, Grünen und FDP war die Einführung eines generellen Tempolimits auf deutschen Autobahnen am Widerstand der Liberalen gescheitert. Auch bei einem vor kurzem von den Koalitionsspitzen beschlossenen Maßnahmenpaket auch zum Energiesparen fehlte ein Tempolimit. - text: 'Deutschland will 2045 klimaneutral sein. Bis dahin müssen die Emissionen nach und nach sinken. Das bedeutet, dass alle Wirtschafts- und Lebensbereiche sich von der Nutzung fossiler Energien verabschieden müssen – so auch das Heizen. Statt mit Öl und Gas müssen die Gebäude also mit erneuerbaren Optionen aufgewärmt werden, zum Beispiel mit Wärmepumpen, Solar- oder Geothermie. Bislang geht es dabei aber kaum voran: Noch im ersten Quartal dieses Jahres waren laut des Bundesverbands der Deutschen Heizungsindustrie mehr als die Hälfte der verkauften Heizungen gasbetrieben. Ganz grundsätzlich sieht das neue Heizungsgesetz nun vor, dass neue Heizungen ab dem kommenden Jahr mindestens zu 65 Prozent erneuerbar betrieben werden. Durch Ausnahmen wie die bei wasserstofftauglichen Gasheizungen soll das aber nur noch eingeschränkt gelten.' - text: Clemens Traub bezeichnete FFF als Bewegung, in der Arzttöchter anderen die Welt erklären. Wie wollen Sie denn die Männer von der Autobahnmeisterer oder die Fernpendlerin erreichen?Niemand schlägt vor, dass in Deutschland alle Autobahnen rückgebaut werden sollen. Natürlich müssen marode Straßen und Brücken saniert werden, damit sich Menschen sicher bewegen können. Gleichzeitig sollte Mobilität so gestaltet werden, dass wir nicht durch jeden Weg, den wir zurücklegen, Klimaschäden produzieren, die sich nicht mehr auffangen lassen. - text: ', die Jugendvertretung Bayern der Gewerkschaft Nahrung Genussmittel Gaststätten NGG, die Bund-Naturschutz-Jugend, die Falken im Bezirk Südbayern, die Münchner Mieterschutzinitiative ›Ausspekuliert›, ein bundesweites Bündnis Armutsbetroffener ichbinarmutsbetroffen, FFF, das Bündnis Attac, der Paritätische Wohlfahrtsverband Bayern und der Sozialverband VdK Bayern.' - text: 'Am späten Vormittag zogen die Klima-Chaoten eine erste Zwischenbilanz:.Aimée Vanbaalen, Sprecherin der ›DLG›, über die Störungen: ›Unsere höchsten Erwartungen wurden deutlich übertroffen! An 27 Verkehrsknotenpunkten in Berlin kam es heute zu Protesten, drei Mal so viele wie noch im letzten Herbst.›' inference: true model-index: - name: SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 results: - task: type: text-classification name: Text Classification dataset: name: Unknown type: unknown split: test metrics: - type: accuracy value: 0.6916666666666667 name: Accuracy --- # SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 128 tokens - **Number of Classes:** 3 classes <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:-----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | OPPOSED | <ul><li>'Um weitere 1,8 Prozent soll sich der Autobahnverkehr reduzieren, weil angeblich wegen des Tempolimits Autofahrer auf den öffentlichen Nahverkehr umsteigen würden. Beide Annahmen sind nicht gerade plausibel, zumal die Autoren der Studie selbst zugeben, dass wichtige Faktoren, wie der Ticketpreis, die Dauer der Fahrt mit Bus und Bahn oder auch die Komforteinbuße nicht berücksichtigt wurden: "Hierbei wird allerdings das Verkehrsangebot (Reisezeit, Preis, Bequemlichkeit etc.) der anderen Verkehrsträger vernachlässigt", schreiben sie auf Seite 206.'</li><li>'Pop Das Heizungsgesetz ist durch die lange Debatte nicht besser geworden, Verbraucherinnen und Verbrauchern fehlt weiter die nötige Klarheit. Das Sammelsurium an Optionen überfordert sie. Und es drohen Kostenfallen, etwa durch den schnellen Kauf einer Gasheizung.'</li><li>'Buschmann kritisiert Autobahnblockaden Berlin - Justizminister Marco Buschmann FDP hat Kritik an Aktionen der Klimaschutzbewegung ›DLG› geübt. ›Wer Krankenwagen blockiert, kann sich unter Umständen der fahrlässigen Körperverletzung schuldig machen›, schrieb er auf'</li></ul> | | NEUTRAL | <ul><li>'Die Ampelkoalition ringt um das umstrittene Heizungsgesetz. Die Grünen forderten die FDP auf, den Weg für Beratungen im Bundestag frei zu machen. „Wir gehen davon aus, dass die FDP ihre Blockade, was die erste Lesung des Gesetzes im Bundestag angeht, aufgeben wird“, sagte die stellvertretende Fraktionsvorsitzende Julia Verlinden am Freitag. Es müsse Planungssicherheit für Menschen und Unternehmen geschaffen werden, was von 2024 an gelte. FDP-Politiker entgegneten, die Liberalen ließen sich nicht unter Zeitdruck setzen. „Für uns gilt: Gründlichkeit geht vor Schnelligkeit“, sagte der FDP-Energiepolitiker Konrad Stockmeier. Die FDP will grundsätzliche Nachbesserungen an einem vom Kabinett bereits beschlossenen Gesetzentwurf. Dieser sieht vor, dass von Anfang 2024 an möglichst jede neu eingebaute Heizung zu mindestens 65 Prozent mit Ökoenergie betrieben wird.'</li><li>'Germering - Mit dem geplanten Heizungsgesetz hat die Opposition im Bundestag momentan wenig Arbeit. Die Ampelkoalition zerstreitet sich von ganz alleine über den sogenannten „Habeck-Hammer“. Wie blickt man also von außen auf das Gerangel von FDP und Grünen? Und hat das Gesetz nicht auch seine Vorzüge? Ein Gespräch mit dem Bundestagsabgeordneten Michael Kießling (Wahlkreis Starnberg-Landsberg-Germering), der in der CSU-Fraktion Berichterstatter für Energiethemen ist.'</li><li>'Die Bundesrepublik war nicht von diesem Boykott betroffen. Aber den steigenden Ölpreis bekamen auch die Westdeutschen zu spüren - binnen vier Wochen vervierfachte sich dieser. Die Verantwortlichen der sozialliberalen Koalition mussten sich etwas einfallen lassen. Die ersten Maßnahmen bestanden darin, vier autofreie Sonntage zu verordnen und ein vorübergehendes Tempolimit von 100 km/h auf den Autobahnen und 80 km/h auf Landstraßen durchzudrücken.'</li></ul> | | SUPPORTIVE | <ul><li>'Eigentlich ist er gar nicht mehr zuständig, sondern das Parlament. Doch der grüne Bundeswirtschaftsminister Robert\u2005Habeck versucht, den Koalitionspartner FDP im Gespräch vom umstrittenen Heizungsgesetz zu überzeugen.'</li><li>'09.30 Uhr: Im Sinne des Klimaschutzes will die Bundesregierung den Abschied von Gas- und Ölheizungen einläuten. Das Bundeskabinett brachte am Mittwoch umstrittene Pläne zum Heizungstausch auf den Weg. Geplant ist auch eine neue Förderung mit „Klimaboni“, um Hauseigentümer finanziell nicht zu überfordern. Wirtschafts- und Klimaschutzminister Robert Habeck (Grüne) und Bauministerin Klara Geywitz (SPD) sprachen von einem großen Schritt.'</li><li>'Nutzen Sie auch Samples? Nicht direkt. Womit ich gearbeitet habe, waren Radio und Hörspiele: Die habe ich laufen lassen und aufgenommen. Das ist das, wo man sagen könnte, es klingt wie ein Sample. Bei dem Stück ›Cosmic Diversity› ist es zum Beispiel David Attenborough, der da spricht. Die Stimme passte so schön und was er sagt, hat auch eine Message: die ›FFF›-Message, dass man den Klimawandel global betrachten muss.'</li></ul> | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 0.6917 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("cbpuschmann/MiniLM-klimacoder_v0.1") # Run inference preds = model("Bei den Koalitionsverhandlungen von SPD, Grünen und FDP war die Einführung eines generellen Tempolimits auf deutschen Autobahnen am Widerstand der Liberalen gescheitert. Auch bei einem vor kurzem von den Koalitionsspitzen beschlossenen Maßnahmenpaket auch zum Energiesparen fehlte ein Tempolimit.") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 15 | 65.3896 | 237 | | Label | Training Sample Count | |:-----------|:----------------------| | NEUTRAL | 219 | | OPPOSED | 125 | | SUPPORTIVE | 136 | ### Training Hyperparameters - batch_size: (128, 128) - num_epochs: (10, 10) - max_steps: -1 - sampling_strategy: oversampling - body_learning_rate: (2e-05, 1e-05) - head_learning_rate: 0.01 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:-----:|:-------------:|:---------------:| | 0.0009 | 1 | 0.2764 | - | | 0.0431 | 50 | 0.2927 | - | | 0.0863 | 100 | 0.2729 | - | | 0.1294 | 150 | 0.2637 | - | | 0.1726 | 200 | 0.2562 | - | | 0.2157 | 250 | 0.2485 | - | | 0.2588 | 300 | 0.2386 | - | | 0.3020 | 350 | 0.22 | - | | 0.3451 | 400 | 0.1755 | - | | 0.3883 | 450 | 0.1235 | - | | 0.4314 | 500 | 0.073 | - | | 0.4745 | 550 | 0.0301 | - | | 0.5177 | 600 | 0.0105 | - | | 0.5608 | 650 | 0.0058 | - | | 0.6040 | 700 | 0.0049 | - | | 0.6471 | 750 | 0.0035 | - | | 0.6903 | 800 | 0.0031 | - | | 0.7334 | 850 | 0.0027 | - | | 0.7765 | 900 | 0.0027 | - | | 0.8197 | 950 | 0.0021 | - | | 0.8628 | 1000 | 0.0022 | - | | 0.9060 | 1050 | 0.0014 | - | | 0.9491 | 1100 | 0.0022 | - | | 0.9922 | 1150 | 0.0018 | - | | 1.0354 | 1200 | 0.0019 | - | | 1.0785 | 1250 | 0.0024 | - | | 1.1217 | 1300 | 0.0015 | - | | 1.1648 | 1350 | 0.0021 | - | | 1.2079 | 1400 | 0.0022 | - | | 1.2511 | 1450 | 0.0016 | - | | 1.2942 | 1500 | 0.0021 | - | | 1.3374 | 1550 | 0.0023 | - | | 1.3805 | 1600 | 0.0022 | - | | 1.4236 | 1650 | 0.0013 | - | | 1.4668 | 1700 | 0.0019 | - | | 1.5099 | 1750 | 0.0023 | - | | 1.5531 | 1800 | 0.0016 | - | | 1.5962 | 1850 | 0.0018 | - | | 1.6393 | 1900 | 0.0013 | - | | 1.6825 | 1950 | 0.0014 | - | | 1.7256 | 2000 | 0.0017 | - | | 1.7688 | 2050 | 0.0016 | - | | 1.8119 | 2100 | 0.0016 | - | | 1.8550 | 2150 | 0.0016 | - | | 1.8982 | 2200 | 0.0024 | - | | 1.9413 | 2250 | 0.0013 | - | | 1.9845 | 2300 | 0.0019 | - | | 2.0276 | 2350 | 0.0014 | - | | 2.0708 | 2400 | 0.0019 | - | | 2.1139 | 2450 | 0.0016 | - | | 2.1570 | 2500 | 0.002 | - | | 2.2002 | 2550 | 0.0011 | - | | 2.2433 | 2600 | 0.0014 | - | | 2.2865 | 2650 | 0.0016 | - | | 2.3296 | 2700 | 0.0013 | - | | 2.3727 | 2750 | 0.0013 | - | | 2.4159 | 2800 | 0.0022 | - | | 2.4590 | 2850 | 0.0017 | - | | 2.5022 | 2900 | 0.0016 | - | | 2.5453 | 2950 | 0.0015 | - | | 2.5884 | 3000 | 0.0021 | - | | 2.6316 | 3050 | 0.0022 | - | | 2.6747 | 3100 | 0.0019 | - | | 2.7179 | 3150 | 0.0014 | - | | 2.7610 | 3200 | 0.0013 | - | | 2.8041 | 3250 | 0.0012 | - | | 2.8473 | 3300 | 0.0014 | - | | 2.8904 | 3350 | 0.0023 | - | | 2.9336 | 3400 | 0.0018 | - | | 2.9767 | 3450 | 0.0017 | - | | 3.0198 | 3500 | 0.002 | - | | 3.0630 | 3550 | 0.0021 | - | | 3.1061 | 3600 | 0.0024 | - | | 3.1493 | 3650 | 0.0021 | - | | 3.1924 | 3700 | 0.0015 | - | | 3.2355 | 3750 | 0.0015 | - | | 3.2787 | 3800 | 0.0016 | - | | 3.3218 | 3850 | 0.0012 | - | | 3.3650 | 3900 | 0.0016 | - | | 3.4081 | 3950 | 0.0011 | - | | 3.4513 | 4000 | 0.0017 | - | | 3.4944 | 4050 | 0.0018 | - | | 3.5375 | 4100 | 0.0015 | - | | 3.5807 | 4150 | 0.0019 | - | | 3.6238 | 4200 | 0.0017 | - | | 3.6670 | 4250 | 0.0019 | - | | 3.7101 | 4300 | 0.0014 | - | | 3.7532 | 4350 | 0.0017 | - | | 3.7964 | 4400 | 0.0014 | - | | 3.8395 | 4450 | 0.0013 | - | | 3.8827 | 4500 | 0.002 | - | | 3.9258 | 4550 | 0.0014 | - | | 3.9689 | 4600 | 0.0021 | - | | 4.0121 | 4650 | 0.0017 | - | | 4.0552 | 4700 | 0.0018 | - | | 4.0984 | 4750 | 0.0012 | - | | 4.1415 | 4800 | 0.0017 | - | | 4.1846 | 4850 | 0.0022 | - | | 4.2278 | 4900 | 0.0012 | - | | 4.2709 | 4950 | 0.0014 | - | | 4.3141 | 5000 | 0.0016 | - | | 4.3572 | 5050 | 0.0016 | - | | 4.4003 | 5100 | 0.0015 | - | | 4.4435 | 5150 | 0.0015 | - | | 4.4866 | 5200 | 0.001 | - | | 4.5298 | 5250 | 0.0019 | - | | 4.5729 | 5300 | 0.0028 | - | | 4.6160 | 5350 | 0.0016 | - | | 4.6592 | 5400 | 0.0013 | - | | 4.7023 | 5450 | 0.0017 | - | | 4.7455 | 5500 | 0.0019 | - | | 4.7886 | 5550 | 0.0015 | - | | 4.8318 | 5600 | 0.002 | - | | 4.8749 | 5650 | 0.002 | - | | 4.9180 | 5700 | 0.0023 | - | | 4.9612 | 5750 | 0.0012 | - | | 5.0043 | 5800 | 0.0012 | - | | 5.0475 | 5850 | 0.0016 | - | | 5.0906 | 5900 | 0.0014 | - | | 5.1337 | 5950 | 0.0011 | - | | 5.1769 | 6000 | 0.0017 | - | | 5.2200 | 6050 | 0.0015 | - | | 5.2632 | 6100 | 0.0022 | - | | 5.3063 | 6150 | 0.0012 | - | | 5.3494 | 6200 | 0.0018 | - | | 5.3926 | 6250 | 0.0015 | - | | 5.4357 | 6300 | 0.002 | - | | 5.4789 | 6350 | 0.0017 | - | | 5.5220 | 6400 | 0.0016 | - | | 5.5651 | 6450 | 0.0014 | - | | 5.6083 | 6500 | 0.0015 | - | | 5.6514 | 6550 | 0.0013 | - | | 5.6946 | 6600 | 0.0016 | - | | 5.7377 | 6650 | 0.0016 | - | | 5.7808 | 6700 | 0.0013 | - | | 5.8240 | 6750 | 0.0016 | - | | 5.8671 | 6800 | 0.0019 | - | | 5.9103 | 6850 | 0.0017 | - | | 5.9534 | 6900 | 0.0013 | - | | 5.9965 | 6950 | 0.0019 | - | | 6.0397 | 7000 | 0.0011 | - | | 6.0828 | 7050 | 0.0015 | - | | 6.1260 | 7100 | 0.0015 | - | | 6.1691 | 7150 | 0.0018 | - | | 6.2123 | 7200 | 0.0014 | - | | 6.2554 | 7250 | 0.0014 | - | | 6.2985 | 7300 | 0.0017 | - | | 6.3417 | 7350 | 0.0015 | - | | 6.3848 | 7400 | 0.0017 | - | | 6.4280 | 7450 | 0.0017 | - | | 6.4711 | 7500 | 0.0019 | - | | 6.5142 | 7550 | 0.0017 | - | | 6.5574 | 7600 | 0.0012 | - | | 6.6005 | 7650 | 0.0018 | - | | 6.6437 | 7700 | 0.0015 | - | | 6.6868 | 7750 | 0.002 | - | | 6.7299 | 7800 | 0.0012 | - | | 6.7731 | 7850 | 0.0018 | - | | 6.8162 | 7900 | 0.0014 | - | | 6.8594 | 7950 | 0.0013 | - | | 6.9025 | 8000 | 0.0015 | - | | 6.9456 | 8050 | 0.0015 | - | | 6.9888 | 8100 | 0.0017 | - | | 7.0319 | 8150 | 0.0013 | - | | 7.0751 | 8200 | 0.0017 | - | | 7.1182 | 8250 | 0.0012 | - | | 7.1613 | 8300 | 0.0019 | - | | 7.2045 | 8350 | 0.0013 | - | | 7.2476 | 8400 | 0.0015 | - | | 7.2908 | 8450 | 0.0017 | - | | 7.3339 | 8500 | 0.0016 | - | | 7.3770 | 8550 | 0.0021 | - | | 7.4202 | 8600 | 0.0014 | - | | 7.4633 | 8650 | 0.0013 | - | | 7.5065 | 8700 | 0.0015 | - | | 7.5496 | 8750 | 0.0015 | - | | 7.5928 | 8800 | 0.0014 | - | | 7.6359 | 8850 | 0.0013 | - | | 7.6790 | 8900 | 0.0016 | - | | 7.7222 | 8950 | 0.0016 | - | | 7.7653 | 9000 | 0.0016 | - | | 7.8085 | 9050 | 0.0017 | - | | 7.8516 | 9100 | 0.0016 | - | | 7.8947 | 9150 | 0.0018 | - | | 7.9379 | 9200 | 0.002 | - | | 7.9810 | 9250 | 0.0015 | - | | 8.0242 | 9300 | 0.0015 | - | | 8.0673 | 9350 | 0.0014 | - | | 8.1104 | 9400 | 0.0013 | - | | 8.1536 | 9450 | 0.0014 | - | | 8.1967 | 9500 | 0.0017 | - | | 8.2399 | 9550 | 0.002 | - | | 8.2830 | 9600 | 0.0019 | - | | 8.3261 | 9650 | 0.0012 | - | | 8.3693 | 9700 | 0.0012 | - | | 8.4124 | 9750 | 0.0016 | - | | 8.4556 | 9800 | 0.0014 | - | | 8.4987 | 9850 | 0.0016 | - | | 8.5418 | 9900 | 0.0014 | - | | 8.5850 | 9950 | 0.0012 | - | | 8.6281 | 10000 | 0.0013 | - | | 8.6713 | 10050 | 0.0023 | - | | 8.7144 | 10100 | 0.0011 | - | | 8.7575 | 10150 | 0.0016 | - | | 8.8007 | 10200 | 0.0017 | - | | 8.8438 | 10250 | 0.0017 | - | | 8.8870 | 10300 | 0.0018 | - | | 8.9301 | 10350 | 0.0019 | - | | 8.9733 | 10400 | 0.0017 | - | | 9.0164 | 10450 | 0.0014 | - | | 9.0595 | 10500 | 0.0014 | - | | 9.1027 | 10550 | 0.0012 | - | | 9.1458 | 10600 | 0.0018 | - | | 9.1890 | 10650 | 0.002 | - | | 9.2321 | 10700 | 0.0015 | - | | 9.2752 | 10750 | 0.0019 | - | | 9.3184 | 10800 | 0.0018 | - | | 9.3615 | 10850 | 0.0014 | - | | 9.4047 | 10900 | 0.0016 | - | | 9.4478 | 10950 | 0.0014 | - | | 9.4909 | 11000 | 0.0011 | - | | 9.5341 | 11050 | 0.0014 | - | | 9.5772 | 11100 | 0.0017 | - | | 9.6204 | 11150 | 0.0018 | - | | 9.6635 | 11200 | 0.0012 | - | | 9.7066 | 11250 | 0.0013 | - | | 9.7498 | 11300 | 0.0015 | - | | 9.7929 | 11350 | 0.0019 | - | | 9.8361 | 11400 | 0.0015 | - | | 9.8792 | 11450 | 0.0016 | - | | 9.9223 | 11500 | 0.0013 | - | | 9.9655 | 11550 | 0.0019 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.1.0 - Sentence Transformers: 3.2.1 - Transformers: 4.44.2 - PyTorch: 2.5.0+cu121 - Datasets: 3.0.2 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 128 tokens - **Number of Classes:** 3 classes <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:-----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | OPPOSED | <ul><li>'Um weitere 1,8 Prozent soll sich der Autobahnverkehr reduzieren, weil angeblich wegen des Tempolimits Autofahrer auf den öffentlichen Nahverkehr umsteigen würden. Beide Annahmen sind nicht gerade plausibel, zumal die Autoren der Studie selbst zugeben, dass wichtige Faktoren, wie der Ticketpreis, die Dauer der Fahrt mit Bus und Bahn oder auch die Komforteinbuße nicht berücksichtigt wurden: "Hierbei wird allerdings das Verkehrsangebot (Reisezeit, Preis, Bequemlichkeit etc.) der anderen Verkehrsträger vernachlässigt", schreiben sie auf Seite 206.'</li><li>'Pop Das Heizungsgesetz ist durch die lange Debatte nicht besser geworden, Verbraucherinnen und Verbrauchern fehlt weiter die nötige Klarheit. Das Sammelsurium an Optionen überfordert sie. Und es drohen Kostenfallen, etwa durch den schnellen Kauf einer Gasheizung.'</li><li>'Buschmann kritisiert Autobahnblockaden Berlin - Justizminister Marco Buschmann FDP hat Kritik an Aktionen der Klimaschutzbewegung ›DLG› geübt. ›Wer Krankenwagen blockiert, kann sich unter Umständen der fahrlässigen Körperverletzung schuldig machen›, schrieb er auf'</li></ul> | | NEUTRAL | <ul><li>'Die Ampelkoalition ringt um das umstrittene Heizungsgesetz. Die Grünen forderten die FDP auf, den Weg für Beratungen im Bundestag frei zu machen. „Wir gehen davon aus, dass die FDP ihre Blockade, was die erste Lesung des Gesetzes im Bundestag angeht, aufgeben wird“, sagte die stellvertretende Fraktionsvorsitzende Julia Verlinden am Freitag. Es müsse Planungssicherheit für Menschen und Unternehmen geschaffen werden, was von 2024 an gelte. FDP-Politiker entgegneten, die Liberalen ließen sich nicht unter Zeitdruck setzen. „Für uns gilt: Gründlichkeit geht vor Schnelligkeit“, sagte der FDP-Energiepolitiker Konrad Stockmeier. Die FDP will grundsätzliche Nachbesserungen an einem vom Kabinett bereits beschlossenen Gesetzentwurf. Dieser sieht vor, dass von Anfang 2024 an möglichst jede neu eingebaute Heizung zu mindestens 65 Prozent mit Ökoenergie betrieben wird.'</li><li>'Germering - Mit dem geplanten Heizungsgesetz hat die Opposition im Bundestag momentan wenig Arbeit. Die Ampelkoalition zerstreitet sich von ganz alleine über den sogenannten „Habeck-Hammer“. Wie blickt man also von außen auf das Gerangel von FDP und Grünen? Und hat das Gesetz nicht auch seine Vorzüge? Ein Gespräch mit dem Bundestagsabgeordneten Michael Kießling (Wahlkreis Starnberg-Landsberg-Germering), der in der CSU-Fraktion Berichterstatter für Energiethemen ist.'</li><li>'Die Bundesrepublik war nicht von diesem Boykott betroffen. Aber den steigenden Ölpreis bekamen auch die Westdeutschen zu spüren - binnen vier Wochen vervierfachte sich dieser. Die Verantwortlichen der sozialliberalen Koalition mussten sich etwas einfallen lassen. Die ersten Maßnahmen bestanden darin, vier autofreie Sonntage zu verordnen und ein vorübergehendes Tempolimit von 100 km/h auf den Autobahnen und 80 km/h auf Landstraßen durchzudrücken.'</li></ul> | | SUPPORTIVE | <ul><li>'Eigentlich ist er gar nicht mehr zuständig, sondern das Parlament. Doch der grüne Bundeswirtschaftsminister Robert\u2005Habeck versucht, den Koalitionspartner FDP im Gespräch vom umstrittenen Heizungsgesetz zu überzeugen.'</li><li>'09.30 Uhr: Im Sinne des Klimaschutzes will die Bundesregierung den Abschied von Gas- und Ölheizungen einläuten. Das Bundeskabinett brachte am Mittwoch umstrittene Pläne zum Heizungstausch auf den Weg. Geplant ist auch eine neue Förderung mit „Klimaboni“, um Hauseigentümer finanziell nicht zu überfordern. Wirtschafts- und Klimaschutzminister Robert Habeck (Grüne) und Bauministerin Klara Geywitz (SPD) sprachen von einem großen Schritt.'</li><li>'Nutzen Sie auch Samples? Nicht direkt. Womit ich gearbeitet habe, waren Radio und Hörspiele: Die habe ich laufen lassen und aufgenommen. Das ist das, wo man sagen könnte, es klingt wie ein Sample. Bei dem Stück ›Cosmic Diversity› ist es zum Beispiel David Attenborough, der da spricht. Die Stimme passte so schön und was er sagt, hat auch eine Message: die ›FFF›-Message, dass man den Klimawandel global betrachten muss.'</li></ul> | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 0.6917 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("cbpuschmann/MiniLM-klimacoder_v0.1") # Run inference preds = model("Bei den Koalitionsverhandlungen von SPD, Grünen und FDP war die Einführung eines generellen Tempolimits auf deutschen Autobahnen am Widerstand der Liberalen gescheitert. Auch bei einem vor kurzem von den Koalitionsspitzen beschlossenen Maßnahmenpaket auch zum Energiesparen fehlte ein Tempolimit.") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 15 | 65.3896 | 237 | | Label | Training Sample Count | |:-----------|:----------------------| | NEUTRAL | 219 | | OPPOSED | 125 | | SUPPORTIVE | 136 | ### Training Hyperparameters - batch_size: (128, 128) - num_epochs: (10, 10) - max_steps: -1 - sampling_strategy: oversampling - body_learning_rate: (2e-05, 1e-05) - head_learning_rate: 0.01 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:-----:|:-------------:|:---------------:| | 0.0009 | 1 | 0.2764 | - | | 0.0431 | 50 | 0.2927 | - | | 0.0863 | 100 | 0.2729 | - | | 0.1294 | 150 | 0.2637 | - | | 0.1726 | 200 | 0.2562 | - | | 0.2157 | 250 | 0.2485 | - | | 0.2588 | 300 | 0.2386 | - | | 0.3020 | 350 | 0.22 | - | | 0.3451 | 400 | 0.1755 | - | | 0.3883 | 450 | 0.1235 | - | | 0.4314 | 500 | 0.073 | - | | 0.4745 | 550 | 0.0301 | - | | 0.5177 | 600 | 0.0105 | - | | 0.5608 | 650 | 0.0058 | - | | 0.6040 | 700 | 0.0049 | - | | 0.6471 | 750 | 0.0035 | - | | 0.6903 | 800 | 0.0031 | - | | 0.7334 | 850 | 0.0027 | - | | 0.7765 | 900 | 0.0027 | - | | 0.8197 | 950 | 0.0021 | - | | 0.8628 | 1000 | 0.0022 | - | | 0.9060 | 1050 | 0.0014 | - | | 0.9491 | 1100 | 0.0022 | - | | 0.9922 | 1150 | 0.0018 | - | | 1.0354 | 1200 | 0.0019 | - | | 1.0785 | 1250 | 0.0024 | - | | 1.1217 | 1300 | 0.0015 | - | | 1.1648 | 1350 | 0.0021 | - | | 1.2079 | 1400 | 0.0022 | - | | 1.2511 | 1450 | 0.0016 | - | | 1.2942 | 1500 | 0.0021 | - | | 1.3374 | 1550 | 0.0023 | - | | 1.3805 | 1600 | 0.0022 | - | | 1.4236 | 1650 | 0.0013 | - | | 1.4668 | 1700 | 0.0019 | - | | 1.5099 | 1750 | 0.0023 | - | | 1.5531 | 1800 | 0.0016 | - | | 1.5962 | 1850 | 0.0018 | - | | 1.6393 | 1900 | 0.0013 | - | | 1.6825 | 1950 | 0.0014 | - | | 1.7256 | 2000 | 0.0017 | - | | 1.7688 | 2050 | 0.0016 | - | | 1.8119 | 2100 | 0.0016 | - | | 1.8550 | 2150 | 0.0016 | - | | 1.8982 | 2200 | 0.0024 | - | | 1.9413 | 2250 | 0.0013 | - | | 1.9845 | 2300 | 0.0019 | - | | 2.0276 | 2350 | 0.0014 | - | | 2.0708 | 2400 | 0.0019 | - | | 2.1139 | 2450 | 0.0016 | - | | 2.1570 | 2500 | 0.002 | - | | 2.2002 | 2550 | 0.0011 | - | | 2.2433 | 2600 | 0.0014 | - | | 2.2865 | 2650 | 0.0016 | - | | 2.3296 | 2700 | 0.0013 | - | | 2.3727 | 2750 | 0.0013 | - | | 2.4159 | 2800 | 0.0022 | - | | 2.4590 | 2850 | 0.0017 | - | | 2.5022 | 2900 | 0.0016 | - | | 2.5453 | 2950 | 0.0015 | - | | 2.5884 | 3000 | 0.0021 | - | | 2.6316 | 3050 | 0.0022 | - | | 2.6747 | 3100 | 0.0019 | - | | 2.7179 | 3150 | 0.0014 | - | | 2.7610 | 3200 | 0.0013 | - | | 2.8041 | 3250 | 0.0012 | - | | 2.8473 | 3300 | 0.0014 | - | | 2.8904 | 3350 | 0.0023 | - | | 2.9336 | 3400 | 0.0018 | - | | 2.9767 | 3450 | 0.0017 | - | | 3.0198 | 3500 | 0.002 | - | | 3.0630 | 3550 | 0.0021 | - | | 3.1061 | 3600 | 0.0024 | - | | 3.1493 | 3650 | 0.0021 | - | | 3.1924 | 3700 | 0.0015 | - | | 3.2355 | 3750 | 0.0015 | - | | 3.2787 | 3800 | 0.0016 | - | | 3.3218 | 3850 | 0.0012 | - | | 3.3650 | 3900 | 0.0016 | - | | 3.4081 | 3950 | 0.0011 | - | | 3.4513 | 4000 | 0.0017 | - | | 3.4944 | 4050 | 0.0018 | - | | 3.5375 | 4100 | 0.0015 | - | | 3.5807 | 4150 | 0.0019 | - | | 3.6238 | 4200 | 0.0017 | - | | 3.6670 | 4250 | 0.0019 | - | | 3.7101 | 4300 | 0.0014 | - | | 3.7532 | 4350 | 0.0017 | - | | 3.7964 | 4400 | 0.0014 | - | | 3.8395 | 4450 | 0.0013 | - | | 3.8827 | 4500 | 0.002 | - | | 3.9258 | 4550 | 0.0014 | - | | 3.9689 | 4600 | 0.0021 | - | | 4.0121 | 4650 | 0.0017 | - | | 4.0552 | 4700 | 0.0018 | - | | 4.0984 | 4750 | 0.0012 | - | | 4.1415 | 4800 | 0.0017 | - | | 4.1846 | 4850 | 0.0022 | - | | 4.2278 | 4900 | 0.0012 | - | | 4.2709 | 4950 | 0.0014 | - | | 4.3141 | 5000 | 0.0016 | - | | 4.3572 | 5050 | 0.0016 | - | | 4.4003 | 5100 | 0.0015 | - | | 4.4435 | 5150 | 0.0015 | - | | 4.4866 | 5200 | 0.001 | - | | 4.5298 | 5250 | 0.0019 | - | | 4.5729 | 5300 | 0.0028 | - | | 4.6160 | 5350 | 0.0016 | - | | 4.6592 | 5400 | 0.0013 | - | | 4.7023 | 5450 | 0.0017 | - | | 4.7455 | 5500 | 0.0019 | - | | 4.7886 | 5550 | 0.0015 | - | | 4.8318 | 5600 | 0.002 | - | | 4.8749 | 5650 | 0.002 | - | | 4.9180 | 5700 | 0.0023 | - | | 4.9612 | 5750 | 0.0012 | - | | 5.0043 | 5800 | 0.0012 | - | | 5.0475 | 5850 | 0.0016 | - | | 5.0906 | 5900 | 0.0014 | - | | 5.1337 | 5950 | 0.0011 | - | | 5.1769 | 6000 | 0.0017 | - | | 5.2200 | 6050 | 0.0015 | - | | 5.2632 | 6100 | 0.0022 | - | | 5.3063 | 6150 | 0.0012 | - | | 5.3494 | 6200 | 0.0018 | - | | 5.3926 | 6250 | 0.0015 | - | | 5.4357 | 6300 | 0.002 | - | | 5.4789 | 6350 | 0.0017 | - | | 5.5220 | 6400 | 0.0016 | - | | 5.5651 | 6450 | 0.0014 | - | | 5.6083 | 6500 | 0.0015 | - | | 5.6514 | 6550 | 0.0013 | - | | 5.6946 | 6600 | 0.0016 | - | | 5.7377 | 6650 | 0.0016 | - | | 5.7808 | 6700 | 0.0013 | - | | 5.8240 | 6750 | 0.0016 | - | | 5.8671 | 6800 | 0.0019 | - | | 5.9103 | 6850 | 0.0017 | - | | 5.9534 | 6900 | 0.0013 | - | | 5.9965 | 6950 | 0.0019 | - | | 6.0397 | 7000 | 0.0011 | - | | 6.0828 | 7050 | 0.0015 | - | | 6.1260 | 7100 | 0.0015 | - | | 6.1691 | 7150 | 0.0018 | - | | 6.2123 | 7200 | 0.0014 | - | | 6.2554 | 7250 | 0.0014 | - | | 6.2985 | 7300 | 0.0017 | - | | 6.3417 | 7350 | 0.0015 | - | | 6.3848 | 7400 | 0.0017 | - | | 6.4280 | 7450 | 0.0017 | - | | 6.4711 | 7500 | 0.0019 | - | | 6.5142 | 7550 | 0.0017 | - | | 6.5574 | 7600 | 0.0012 | - | | 6.6005 | 7650 | 0.0018 | - | | 6.6437 | 7700 | 0.0015 | - | | 6.6868 | 7750 | 0.002 | - | | 6.7299 | 7800 | 0.0012 | - | | 6.7731 | 7850 | 0.0018 | - | | 6.8162 | 7900 | 0.0014 | - | | 6.8594 | 7950 | 0.0013 | - | | 6.9025 | 8000 | 0.0015 | - | | 6.9456 | 8050 | 0.0015 | - | | 6.9888 | 8100 | 0.0017 | - | | 7.0319 | 8150 | 0.0013 | - | | 7.0751 | 8200 | 0.0017 | - | | 7.1182 | 8250 | 0.0012 | - | | 7.1613 | 8300 | 0.0019 | - | | 7.2045 | 8350 | 0.0013 | - | | 7.2476 | 8400 | 0.0015 | - | | 7.2908 | 8450 | 0.0017 | - | | 7.3339 | 8500 | 0.0016 | - | | 7.3770 | 8550 | 0.0021 | - | | 7.4202 | 8600 | 0.0014 | - | | 7.4633 | 8650 | 0.0013 | - | | 7.5065 | 8700 | 0.0015 | - | | 7.5496 | 8750 | 0.0015 | - | | 7.5928 | 8800 | 0.0014 | - | | 7.6359 | 8850 | 0.0013 | - | | 7.6790 | 8900 | 0.0016 | - | | 7.7222 | 8950 | 0.0016 | - | | 7.7653 | 9000 | 0.0016 | - | | 7.8085 | 9050 | 0.0017 | - | | 7.8516 | 9100 | 0.0016 | - | | 7.8947 | 9150 | 0.0018 | - | | 7.9379 | 9200 | 0.002 | - | | 7.9810 | 9250 | 0.0015 | - | | 8.0242 | 9300 | 0.0015 | - | | 8.0673 | 9350 | 0.0014 | - | | 8.1104 | 9400 | 0.0013 | - | | 8.1536 | 9450 | 0.0014 | - | | 8.1967 | 9500 | 0.0017 | - | | 8.2399 | 9550 | 0.002 | - | | 8.2830 | 9600 | 0.0019 | - | | 8.3261 | 9650 | 0.0012 | - | | 8.3693 | 9700 | 0.0012 | - | | 8.4124 | 9750 | 0.0016 | - | | 8.4556 | 9800 | 0.0014 | - | | 8.4987 | 9850 | 0.0016 | - | | 8.5418 | 9900 | 0.0014 | - | | 8.5850 | 9950 | 0.0012 | - | | 8.6281 | 10000 | 0.0013 | - | | 8.6713 | 10050 | 0.0023 | - | | 8.7144 | 10100 | 0.0011 | - | | 8.7575 | 10150 | 0.0016 | - | | 8.8007 | 10200 | 0.0017 | - | | 8.8438 | 10250 | 0.0017 | - | | 8.8870 | 10300 | 0.0018 | - | | 8.9301 | 10350 | 0.0019 | - | | 8.9733 | 10400 | 0.0017 | - | | 9.0164 | 10450 | 0.0014 | - | | 9.0595 | 10500 | 0.0014 | - | | 9.1027 | 10550 | 0.0012 | - | | 9.1458 | 10600 | 0.0018 | - | | 9.1890 | 10650 | 0.002 | - | | 9.2321 | 10700 | 0.0015 | - | | 9.2752 | 10750 | 0.0019 | - | | 9.3184 | 10800 | 0.0018 | - | | 9.3615 | 10850 | 0.0014 | - | | 9.4047 | 10900 | 0.0016 | - | | 9.4478 | 10950 | 0.0014 | - | | 9.4909 | 11000 | 0.0011 | - | | 9.5341 | 11050 | 0.0014 | - | | 9.5772 | 11100 | 0.0017 | - | | 9.6204 | 11150 | 0.0018 | - | | 9.6635 | 11200 | 0.0012 | - | | 9.7066 | 11250 | 0.0013 | - | | 9.7498 | 11300 | 0.0015 | - | | 9.7929 | 11350 | 0.0019 | - | | 9.8361 | 11400 | 0.0015 | - | | 9.8792 | 11450 | 0.0016 | - | | 9.9223 | 11500 | 0.0013 | - | | 9.9655 | 11550 | 0.0019 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.1.0 - Sentence Transformers: 3.2.1 - Transformers: 4.44.2 - PyTorch: 2.5.0+cu121 - Datasets: 3.0.2 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
{"base_model": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", "library_name": "setfit", "metrics": ["accuracy"], "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification", "generated_from_setfit_trainer"], "widget": [{"text": "Bei den Koalitionsverhandlungen von SPD, Grünen und FDP war die Einführung eines generellen Tempolimits auf deutschen Autobahnen am Widerstand der Liberalen gescheitert. Auch bei einem vor kurzem von den Koalitionsspitzen beschlossenen Maßnahmenpaket auch zum Energiesparen fehlte ein Tempolimit."}, {"text": "Deutschland will 2045 klimaneutral sein. Bis dahin müssen die Emissionen nach und nach sinken. Das bedeutet, dass alle Wirtschafts- und Lebensbereiche sich von der Nutzung fossiler Energien verabschieden müssen – so auch das Heizen. Statt mit Öl und Gas müssen die Gebäude also mit erneuerbaren Optionen aufgewärmt werden, zum Beispiel mit Wärmepumpen, Solar- oder Geothermie. Bislang geht es dabei aber kaum voran: Noch im ersten Quartal dieses Jahres waren laut des Bundesverbands der Deutschen Heizungsindustrie mehr als die Hälfte der verkauften Heizungen gasbetrieben. Ganz grundsätzlich sieht das neue Heizungsgesetz nun vor, dass neue Heizungen ab dem kommenden Jahr mindestens zu 65 Prozent erneuerbar betrieben werden. Durch Ausnahmen wie die bei wasserstofftauglichen Gasheizungen soll das aber nur noch eingeschränkt gelten."}, {"text": "Clemens Traub bezeichnete FFF als Bewegung, in der Arzttöchter anderen die Welt erklären. Wie wollen Sie denn die Männer von der Autobahnmeisterer oder die Fernpendlerin erreichen?Niemand schlägt vor, dass in Deutschland alle Autobahnen rückgebaut werden sollen. Natürlich müssen marode Straßen und Brücken saniert werden, damit sich Menschen sicher bewegen können. Gleichzeitig sollte Mobilität so gestaltet werden, dass wir nicht durch jeden Weg, den wir zurücklegen, Klimaschäden produzieren, die sich nicht mehr auffangen lassen."}, {"text": ", die Jugendvertretung Bayern der Gewerkschaft Nahrung Genussmittel Gaststätten NGG, die Bund-Naturschutz-Jugend, die Falken im Bezirk Südbayern, die Münchner Mieterschutzinitiative ›Ausspekuliert›, ein bundesweites Bündnis Armutsbetroffener ichbinarmutsbetroffen, FFF, das Bündnis Attac, der Paritätische Wohlfahrtsverband Bayern und der Sozialverband VdK Bayern."}, {"text": "Am späten Vormittag zogen die Klima-Chaoten eine erste Zwischenbilanz:.Aimée Vanbaalen, Sprecherin der ›DLG›, über die Störungen: ›Unsere höchsten Erwartungen wurden deutlich übertroffen! An 27 Verkehrsknotenpunkten in Berlin kam es heute zu Protesten, drei Mal so viele wie noch im letzten Herbst.›"}], "inference": true, "model-index": [{"name": "SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "Unknown", "type": "unknown", "split": "test"}, "metrics": [{"type": "accuracy", "value": 0.6916666666666667, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,474
facebook/fasttext-eo-vectors
facebook
feature-extraction
[ "fasttext", "feature-extraction", "eo", "arxiv:1607.04606", "arxiv:1802.06893", "arxiv:1607.01759", "arxiv:1612.03651", "license:cc-by-sa-3.0", "region:us" ]
2023-03-19T03:05:06Z
2023-06-03T22:11:00+00:00
0
0
--- language: eo library_name: fasttext license: cc-by-sa-3.0 tags: - feature-extraction widget: - text: apple example_title: apple --- # fastText (Esperanto) fastText is an open-source, free, lightweight library that allows users to learn text representations and text classifiers. It works on standard, generic hardware. Models can later be reduced in size to even fit on mobile devices. It was introduced in [this paper](https://arxiv.org/abs/1607.04606). The official website can be found [here](https://fasttext.cc/). ## Model description fastText is a library for efficient learning of word representations and sentence classification. fastText is designed to be simple to use for developers, domain experts, and students. It's dedicated to text classification and learning word representations, and was designed to allow for quick model iteration and refinement without specialized hardware. fastText models can be trained on more than a billion words on any multicore CPU in less than a few minutes. It includes pre-trained models learned on Wikipedia and in over 157 different languages. fastText can be used as a command line, linked to a C++ application, or used as a library for use cases from experimentation and prototyping to production. ## Intended uses & limitations You can use pre-trained word vectors for text classification or language identification. See the [tutorials](https://fasttext.cc/docs/en/supervised-tutorial.html) and [resources](https://fasttext.cc/docs/en/english-vectors.html) on its official website to look for tasks that interest you. ### How to use Here is how to load and use a pre-trained vectors ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-eo-vectors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.words ['the', 'of', 'and', 'to', 'in', 'a', 'that', 'is', ...] >>> len(model.words) 145940 >>> model['bread'] array([ 4.89417791e-01, 1.60882145e-01, -2.25947708e-01, -2.94273376e-01, -1.04577184e-01, 1.17962055e-01, 1.34821936e-01, -2.41778508e-01, ...]) ``` Here is how to use this model to query nearest neighbors of an English word vector: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-en-nearest-neighbors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.get_nearest_neighbors("bread", k=5) [(0.5641006231307983, 'butter'), (0.48875734210014343, 'loaf'), (0.4491206705570221, 'eat'), (0.42444291710853577, 'food'), (0.4229326844215393, 'cheese')] ``` Here is how to use this model to detect the language of a given text: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-language-identification", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.predict("Hello, world!") (('__label__eng_Latn',), array([0.81148803])) >>> model.predict("Hello, world!", k=5) (('__label__eng_Latn', '__label__vie_Latn', '__label__nld_Latn', '__label__pol_Latn', '__label__deu_Latn'), array([0.61224753, 0.21323682, 0.09696738, 0.01359863, 0.01319415])) ``` ### Limitations and bias Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions. Cosine similarity can be used to measure the similarity between two different word vectors. If two two vectors are identical, the cosine similarity will be 1. For two completely unrelated vectors, the value will be 0. If two vectors have an opposite relationship, the value will be -1. ```python >>> import numpy as np >>> def cosine_similarity(word1, word2): >>> return np.dot(model[word1], model[word2]) / (np.linalg.norm(model[word1]) * np.linalg.norm(model[word2])) >>> cosine_similarity("man", "boy") 0.061653383 >>> cosine_similarity("man", "ceo") 0.11989131 >>> cosine_similarity("woman", "ceo") -0.08834904 ``` ## Training data Pre-trained word vectors for 157 languages were trained on [Common Crawl](http://commoncrawl.org/) and [Wikipedia](https://www.wikipedia.org/) using fastText. These models were trained using CBOW with position-weights, in dimension 300, with character n-grams of length 5, a window of size 5 and 10 negatives. We also distribute three new word analogy datasets, for French, Hindi and Polish. ## Training procedure ### Tokenization We used the [Stanford word segmenter](https://nlp.stanford.edu/software/segmenter.html) for Chinese, [Mecab](http://taku910.github.io/mecab/) for Japanese and [UETsegmenter](https://github.com/phongnt570/UETsegmenter) for Vietnamese. For languages using the Latin, Cyrillic, Hebrew or Greek scripts, we used the tokenizer from the [Europarl](https://www.statmt.org/europarl/) preprocessing tools. For the remaining languages, we used the ICU tokenizer. More information about the training of these models can be found in the article [Learning Word Vectors for 157 Languages](https://arxiv.org/abs/1802.06893). ### License The word vectors are distributed under the [*Creative Commons Attribution-Share-Alike License 3.0*](https://creativecommons.org/licenses/by-sa/3.0/). ### Evaluation datasets The analogy evaluation datasets described in the paper are available here: [French](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-fr.txt), [Hindi](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-hi.txt), [Polish](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-pl.txt). ### BibTeX entry and citation info Please cite [1] if using this code for learning word representations or [2] if using for text classification. [1] P. Bojanowski\*, E. Grave\*, A. Joulin, T. Mikolov, [*Enriching Word Vectors with Subword Information*](https://arxiv.org/abs/1607.04606) ```markup @article{bojanowski2016enriching, title={Enriching Word Vectors with Subword Information}, author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.04606}, year={2016} } ``` [2] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, [*Bag of Tricks for Efficient Text Classification*](https://arxiv.org/abs/1607.01759) ```markup @article{joulin2016bag, title={Bag of Tricks for Efficient Text Classification}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.01759}, year={2016} } ``` [3] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov, [*FastText.zip: Compressing text classification models*](https://arxiv.org/abs/1612.03651) ```markup @article{joulin2016fasttext, title={FastText.zip: Compressing text classification models}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{'e}gou, H{'e}rve and Mikolov, Tomas}, journal={arXiv preprint arXiv:1612.03651}, year={2016} } ``` If you use these word vectors, please cite the following paper: [4] E. Grave\*, P. Bojanowski\*, P. Gupta, A. Joulin, T. Mikolov, [*Learning Word Vectors for 157 Languages*](https://arxiv.org/abs/1802.06893) ```markup @inproceedings{grave2018learning, title={Learning Word Vectors for 157 Languages}, author={Grave, Edouard and Bojanowski, Piotr and Gupta, Prakhar and Joulin, Armand and Mikolov, Tomas}, booktitle={Proceedings of the International Conference on Language Resources and Evaluation (LREC 2018)}, year={2018} } ``` (\* These authors contributed equally.)
null
Non_BioNLP
# fastText (Esperanto) fastText is an open-source, free, lightweight library that allows users to learn text representations and text classifiers. It works on standard, generic hardware. Models can later be reduced in size to even fit on mobile devices. It was introduced in [this paper](https://arxiv.org/abs/1607.04606). The official website can be found [here](https://fasttext.cc/). ## Model description fastText is a library for efficient learning of word representations and sentence classification. fastText is designed to be simple to use for developers, domain experts, and students. It's dedicated to text classification and learning word representations, and was designed to allow for quick model iteration and refinement without specialized hardware. fastText models can be trained on more than a billion words on any multicore CPU in less than a few minutes. It includes pre-trained models learned on Wikipedia and in over 157 different languages. fastText can be used as a command line, linked to a C++ application, or used as a library for use cases from experimentation and prototyping to production. ## Intended uses & limitations You can use pre-trained word vectors for text classification or language identification. See the [tutorials](https://fasttext.cc/docs/en/supervised-tutorial.html) and [resources](https://fasttext.cc/docs/en/english-vectors.html) on its official website to look for tasks that interest you. ### How to use Here is how to load and use a pre-trained vectors ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-eo-vectors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.words ['the', 'of', 'and', 'to', 'in', 'a', 'that', 'is', ...] >>> len(model.words) 145940 >>> model['bread'] array([ 4.89417791e-01, 1.60882145e-01, -2.25947708e-01, -2.94273376e-01, -1.04577184e-01, 1.17962055e-01, 1.34821936e-01, -2.41778508e-01, ...]) ``` Here is how to use this model to query nearest neighbors of an English word vector: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-en-nearest-neighbors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.get_nearest_neighbors("bread", k=5) [(0.5641006231307983, 'butter'), (0.48875734210014343, 'loaf'), (0.4491206705570221, 'eat'), (0.42444291710853577, 'food'), (0.4229326844215393, 'cheese')] ``` Here is how to use this model to detect the language of a given text: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-language-identification", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.predict("Hello, world!") (('__label__eng_Latn',), array([0.81148803])) >>> model.predict("Hello, world!", k=5) (('__label__eng_Latn', '__label__vie_Latn', '__label__nld_Latn', '__label__pol_Latn', '__label__deu_Latn'), array([0.61224753, 0.21323682, 0.09696738, 0.01359863, 0.01319415])) ``` ### Limitations and bias Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions. Cosine similarity can be used to measure the similarity between two different word vectors. If two two vectors are identical, the cosine similarity will be 1. For two completely unrelated vectors, the value will be 0. If two vectors have an opposite relationship, the value will be -1. ```python >>> import numpy as np >>> def cosine_similarity(word1, word2): >>> return np.dot(model[word1], model[word2]) / (np.linalg.norm(model[word1]) * np.linalg.norm(model[word2])) >>> cosine_similarity("man", "boy") 0.061653383 >>> cosine_similarity("man", "ceo") 0.11989131 >>> cosine_similarity("woman", "ceo") -0.08834904 ``` ## Training data Pre-trained word vectors for 157 languages were trained on [Common Crawl](http://commoncrawl.org/) and [Wikipedia](https://www.wikipedia.org/) using fastText. These models were trained using CBOW with position-weights, in dimension 300, with character n-grams of length 5, a window of size 5 and 10 negatives. We also distribute three new word analogy datasets, for French, Hindi and Polish. ## Training procedure ### Tokenization We used the [Stanford word segmenter](https://nlp.stanford.edu/software/segmenter.html) for Chinese, [Mecab](http://taku910.github.io/mecab/) for Japanese and [UETsegmenter](https://github.com/phongnt570/UETsegmenter) for Vietnamese. For languages using the Latin, Cyrillic, Hebrew or Greek scripts, we used the tokenizer from the [Europarl](https://www.statmt.org/europarl/) preprocessing tools. For the remaining languages, we used the ICU tokenizer. More information about the training of these models can be found in the article [Learning Word Vectors for 157 Languages](https://arxiv.org/abs/1802.06893). ### License The word vectors are distributed under the [*Creative Commons Attribution-Share-Alike License 3.0*](https://creativecommons.org/licenses/by-sa/3.0/). ### Evaluation datasets The analogy evaluation datasets described in the paper are available here: [French](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-fr.txt), [Hindi](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-hi.txt), [Polish](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-pl.txt). ### BibTeX entry and citation info Please cite [1] if using this code for learning word representations or [2] if using for text classification. [1] P. Bojanowski\*, E. Grave\*, A. Joulin, T. Mikolov, [*Enriching Word Vectors with Subword Information*](https://arxiv.org/abs/1607.04606) ```markup @article{bojanowski2016enriching, title={Enriching Word Vectors with Subword Information}, author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.04606}, year={2016} } ``` [2] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, [*Bag of Tricks for Efficient Text Classification*](https://arxiv.org/abs/1607.01759) ```markup @article{joulin2016bag, title={Bag of Tricks for Efficient Text Classification}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.01759}, year={2016} } ``` [3] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov, [*FastText.zip: Compressing text classification models*](https://arxiv.org/abs/1612.03651) ```markup @article{joulin2016fasttext, title={FastText.zip: Compressing text classification models}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{'e}gou, H{'e}rve and Mikolov, Tomas}, journal={arXiv preprint arXiv:1612.03651}, year={2016} } ``` If you use these word vectors, please cite the following paper: [4] E. Grave\*, P. Bojanowski\*, P. Gupta, A. Joulin, T. Mikolov, [*Learning Word Vectors for 157 Languages*](https://arxiv.org/abs/1802.06893) ```markup @inproceedings{grave2018learning, title={Learning Word Vectors for 157 Languages}, author={Grave, Edouard and Bojanowski, Piotr and Gupta, Prakhar and Joulin, Armand and Mikolov, Tomas}, booktitle={Proceedings of the International Conference on Language Resources and Evaluation (LREC 2018)}, year={2018} } ``` (\* These authors contributed equally.)
{"language": "eo", "library_name": "fasttext", "license": "cc-by-sa-3.0", "tags": ["feature-extraction"], "widget": [{"text": "apple", "example_title": "apple"}]}
task
[ "TEXT_CLASSIFICATION" ]
46,475
gaudi/opus-mt-inc-en-ctranslate2
gaudi
translation
[ "transformers", "marian", "ctranslate2", "translation", "license:apache-2.0", "endpoints_compatible", "region:us" ]
2024-07-17T00:11:32Z
2024-10-18T22:16:45+00:00
6
0
--- license: apache-2.0 tags: - ctranslate2 - translation --- # Repository General Information ## Inspired by and derived from the work of [Helsinki-NLP](https://huggingface.co/Helsinki-NLP), [CTranslate2](https://github.com/OpenNMT/CTranslate2), and [michaelfeil](https://huggingface.co/michaelfeil)! - Link to Original Model ([Helsinki-NLP](https://huggingface.co/Helsinki-NLP)): [Model Link](https://huggingface.co/Helsinki-NLP/opus-mt-inc-en) - This respository was based on the work of [CTranslate2](https://github.com/OpenNMT/CTranslate2). - This repository was based on the work of [michaelfeil](https://huggingface.co/michaelfeil). # What is CTranslate2? [CTranslate2](https://opennmt.net/CTranslate2/) is a C++ and Python library for efficient inference with Transformer models. CTranslate2 implements a custom runtime that applies many performance optimization techniques such as weights quantization, layers fusion, batch reordering, etc., to accelerate and reduce the memory usage of Transformer models on CPU and GPU. CTranslate2 is one of the most performant ways of hosting translation models at scale. Current supported models include: - Encoder-decoder models: Transformer base/big, M2M-100, NLLB, BART, mBART, Pegasus, T5, Whisper - Decoder-only models: GPT-2, GPT-J, GPT-NeoX, OPT, BLOOM, MPT, Llama, Mistral, Gemma, CodeGen, GPTBigCode, Falcon - Encoder-only models: BERT, DistilBERT, XLM-RoBERTa The project is production-oriented and comes with backward compatibility guarantees, but it also includes experimental features related to model compression and inference acceleration. # CTranslate2 Benchmarks Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. Tested against `newstest2014` (En -> De) dataset. The benchmark reports the number of target tokens generated per second (higher is better). The results are aggregated over multiple runs. See the benchmark scripts for more details and reproduce these numbers. Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. ## CPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 147.3 | 2332MB | 27.90 | | Marian 1.11.0 (int16) | 330.2 | 5901MB | 27.65 | | Marian 1.11.0 (int8) | 355.8 | 4763MB | 27.27 | | CTranslate2 3.6.0 (int16) | 596.1 | 660MB | 27.53 | | CTranslate2 3.6.0 (int8) | 696.1 | 516MB | 27.65 | ## GPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max GPU Memory Usage | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 1022.9 | 4097MB | 2109MB | 27.90 | | Marian 1.11.0 (float16) | 3962.4 | 3239MB | 1976MB | 27.94 | | CTranslate2 3.6.0 (float16) | 9296.7 | 909MB | 814MB | 27.9 | | CTranslate2 3.6.0 (int8 + float16) | 8362.7 | 813MB | 766MB | 27.9 | `Executed with 4 threads on a c5.2xlarge Amazon EC2 instance equipped with an Intel(R) Xeon(R) Platinum 8275CL CPU.` **Source to benchmark information can be found [here](https://github.com/OpenNMT/CTranslate2).**<br /> **Original model BLEU scores can be found [here](https://huggingface.co/Helsinki-NLP/opus-mt-inc-en).** ## Internal Benchmarks Internal testing on our end showed **inference times reduced by 6x-10x** on average compared the vanilla checkpoints using the *transformers* library. A **slight reduction on BLEU scores (~5%)** was also identified in comparison to the vanilla checkpoints with a few exceptions. This is likely due to several factors, one being the quantization applied. Further testing is needed from our end to better assess the reduction in translation quality. The command used to compile the vanilla checkpoint into a CTranslate2 model can be found below. Modifying this command can yield differing balances between inferencing performance and translation quality. # CTranslate2 Installation ```bash pip install hf-hub-ctranslate2>=1.0.0 ctranslate2>=3.13.0 ``` ### ct2-transformers-converter Command Used: ```bash ct2-transformers-converter --model Helsinki-NLP/opus-mt-inc-en --output_dir ./ctranslate2/opus-mt-inc-en-ctranslate2 --force --copy_files README.md generation_config.json tokenizer_config.json vocab.json source.spm .gitattributes target.spm --quantization float16 ``` # CTranslate2 Converted Checkpoint Information: **Compatible With:** - [ctranslate2](https://github.com/OpenNMT/CTranslate2) - [hf-hub-ctranslate2](https://github.com/michaelfeil/hf-hub-ctranslate2) **Compute Type:** - `compute_type=int8_float16` for `device="cuda"` - `compute_type=int8` for `device="cpu"` # Sample Code - ctranslate2 #### Clone the repository to the working directory or wherever you wish to store the model artifacts. #### ```bash git clone https://huggingface.co/gaudi/opus-mt-inc-en-ctranslate2 ``` #### Take the python code below and update the 'model_dir' variable to the location of the cloned repository. #### ```python from ctranslate2 import Translator import transformers model_dir = "./opus-mt-inc-en-ctranslate2" # Path to model directory. translator = Translator( model_path=model_dir, device="cuda", # cpu, cuda, or auto. inter_threads=1, # Maximum number of parallel translations. intra_threads=4, # Number of OpenMP threads per translator. compute_type="int8_float16", # int8 for cpu or int8_float16 for cuda. ) tokenizer = transformers.AutoTokenizer.from_pretrained(model_dir) source = tokenizer.convert_ids_to_tokens(tokenizer.encode("XXXXXX, XXX XX XXXXXX.")) results = translator.translate_batch([source]) target = results[0].hypotheses[0] print(tokenizer.decode(tokenizer.convert_tokens_to_ids(target))) ``` # Sample Code - hf-hub-ctranslate2 **Derived From [michaelfeil](https://huggingface.co/michaelfeil):** ```python from hf_hub_ctranslate2 import TranslatorCT2fromHfHub, GeneratorCT2fromHfHub from transformers import AutoTokenizer model_name = "gaudi/opus-mt-inc-en-ctranslate2" model = TranslatorCT2fromHfHub( model_name_or_path=model_name, device="cuda", compute_type="int8_float16", tokenizer=AutoTokenizer.from_pretrained(model_name) ) outputs = model.generate( text=["XXX XX XXX XXXXXXX XXXX?", "XX XX XXXX XX XXX!"], ) print(outputs) ``` # License and other remarks: License conditions are intended to be idential to [original huggingface repository](https://huggingface.co/Helsinki-NLP/opus-mt-inc-en) by Helsinki-NLP.
null
Non_BioNLP
# Repository General Information ## Inspired by and derived from the work of [Helsinki-NLP](https://huggingface.co/Helsinki-NLP), [CTranslate2](https://github.com/OpenNMT/CTranslate2), and [michaelfeil](https://huggingface.co/michaelfeil)! - Link to Original Model ([Helsinki-NLP](https://huggingface.co/Helsinki-NLP)): [Model Link](https://huggingface.co/Helsinki-NLP/opus-mt-inc-en) - This respository was based on the work of [CTranslate2](https://github.com/OpenNMT/CTranslate2). - This repository was based on the work of [michaelfeil](https://huggingface.co/michaelfeil). # What is CTranslate2? [CTranslate2](https://opennmt.net/CTranslate2/) is a C++ and Python library for efficient inference with Transformer models. CTranslate2 implements a custom runtime that applies many performance optimization techniques such as weights quantization, layers fusion, batch reordering, etc., to accelerate and reduce the memory usage of Transformer models on CPU and GPU. CTranslate2 is one of the most performant ways of hosting translation models at scale. Current supported models include: - Encoder-decoder models: Transformer base/big, M2M-100, NLLB, BART, mBART, Pegasus, T5, Whisper - Decoder-only models: GPT-2, GPT-J, GPT-NeoX, OPT, BLOOM, MPT, Llama, Mistral, Gemma, CodeGen, GPTBigCode, Falcon - Encoder-only models: BERT, DistilBERT, XLM-RoBERTa The project is production-oriented and comes with backward compatibility guarantees, but it also includes experimental features related to model compression and inference acceleration. # CTranslate2 Benchmarks Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. Tested against `newstest2014` (En -> De) dataset. The benchmark reports the number of target tokens generated per second (higher is better). The results are aggregated over multiple runs. See the benchmark scripts for more details and reproduce these numbers. Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. ## CPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 147.3 | 2332MB | 27.90 | | Marian 1.11.0 (int16) | 330.2 | 5901MB | 27.65 | | Marian 1.11.0 (int8) | 355.8 | 4763MB | 27.27 | | CTranslate2 3.6.0 (int16) | 596.1 | 660MB | 27.53 | | CTranslate2 3.6.0 (int8) | 696.1 | 516MB | 27.65 | ## GPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max GPU Memory Usage | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 1022.9 | 4097MB | 2109MB | 27.90 | | Marian 1.11.0 (float16) | 3962.4 | 3239MB | 1976MB | 27.94 | | CTranslate2 3.6.0 (float16) | 9296.7 | 909MB | 814MB | 27.9 | | CTranslate2 3.6.0 (int8 + float16) | 8362.7 | 813MB | 766MB | 27.9 | `Executed with 4 threads on a c5.2xlarge Amazon EC2 instance equipped with an Intel(R) Xeon(R) Platinum 8275CL CPU.` **Source to benchmark information can be found [here](https://github.com/OpenNMT/CTranslate2).**<br /> **Original model BLEU scores can be found [here](https://huggingface.co/Helsinki-NLP/opus-mt-inc-en).** ## Internal Benchmarks Internal testing on our end showed **inference times reduced by 6x-10x** on average compared the vanilla checkpoints using the *transformers* library. A **slight reduction on BLEU scores (~5%)** was also identified in comparison to the vanilla checkpoints with a few exceptions. This is likely due to several factors, one being the quantization applied. Further testing is needed from our end to better assess the reduction in translation quality. The command used to compile the vanilla checkpoint into a CTranslate2 model can be found below. Modifying this command can yield differing balances between inferencing performance and translation quality. # CTranslate2 Installation ```bash pip install hf-hub-ctranslate2>=1.0.0 ctranslate2>=3.13.0 ``` ### ct2-transformers-converter Command Used: ```bash ct2-transformers-converter --model Helsinki-NLP/opus-mt-inc-en --output_dir ./ctranslate2/opus-mt-inc-en-ctranslate2 --force --copy_files README.md generation_config.json tokenizer_config.json vocab.json source.spm .gitattributes target.spm --quantization float16 ``` # CTranslate2 Converted Checkpoint Information: **Compatible With:** - [ctranslate2](https://github.com/OpenNMT/CTranslate2) - [hf-hub-ctranslate2](https://github.com/michaelfeil/hf-hub-ctranslate2) **Compute Type:** - `compute_type=int8_float16` for `device="cuda"` - `compute_type=int8` for `device="cpu"` # Sample Code - ctranslate2 #### Clone the repository to the working directory or wherever you wish to store the model artifacts. #### ```bash git clone https://huggingface.co/gaudi/opus-mt-inc-en-ctranslate2 ``` #### Take the python code below and update the 'model_dir' variable to the location of the cloned repository. #### ```python from ctranslate2 import Translator import transformers model_dir = "./opus-mt-inc-en-ctranslate2" # Path to model directory. translator = Translator( model_path=model_dir, device="cuda", # cpu, cuda, or auto. inter_threads=1, # Maximum number of parallel translations. intra_threads=4, # Number of OpenMP threads per translator. compute_type="int8_float16", # int8 for cpu or int8_float16 for cuda. ) tokenizer = transformers.AutoTokenizer.from_pretrained(model_dir) source = tokenizer.convert_ids_to_tokens(tokenizer.encode("XXXXXX, XXX XX XXXXXX.")) results = translator.translate_batch([source]) target = results[0].hypotheses[0] print(tokenizer.decode(tokenizer.convert_tokens_to_ids(target))) ``` # Sample Code - hf-hub-ctranslate2 **Derived From [michaelfeil](https://huggingface.co/michaelfeil):** ```python from hf_hub_ctranslate2 import TranslatorCT2fromHfHub, GeneratorCT2fromHfHub from transformers import AutoTokenizer model_name = "gaudi/opus-mt-inc-en-ctranslate2" model = TranslatorCT2fromHfHub( model_name_or_path=model_name, device="cuda", compute_type="int8_float16", tokenizer=AutoTokenizer.from_pretrained(model_name) ) outputs = model.generate( text=["XXX XX XXX XXXXXXX XXXX?", "XX XX XXXX XX XXX!"], ) print(outputs) ``` # License and other remarks: License conditions are intended to be idential to [original huggingface repository](https://huggingface.co/Helsinki-NLP/opus-mt-inc-en) by Helsinki-NLP.
{"license": "apache-2.0", "tags": ["ctranslate2", "translation"]}
task
[ "TRANSLATION" ]
46,476
aroot/eng-guj-simcse_central_ssrb
aroot
translation
[ "transformers", "pytorch", "tensorboard", "mbart", "text2text-generation", "translation", "generated_from_trainer", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-07-06T20:47:46Z
2023-07-06T21:10:38+00:00
11
0
--- metrics: - bleu tags: - translation - generated_from_trainer model-index: - name: eng-guj-simcse_central_ssrb results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # eng-guj-simcse_central_ssrb This model is a fine-tuned version of [facebook/mbart-large-50-many-to-many-mmt](https://huggingface.co/facebook/mbart-large-50-many-to-many-mmt) on the None dataset. It achieves the following results on the evaluation set: - Loss: 3.2737 - Bleu: 2.6862 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 2.0.1+cu117 - Datasets 2.12.0 - Tokenizers 0.13.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # eng-guj-simcse_central_ssrb This model is a fine-tuned version of [facebook/mbart-large-50-many-to-many-mmt](https://huggingface.co/facebook/mbart-large-50-many-to-many-mmt) on the None dataset. It achieves the following results on the evaluation set: - Loss: 3.2737 - Bleu: 2.6862 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 2.0.1+cu117 - Datasets 2.12.0 - Tokenizers 0.13.3
{"metrics": ["bleu"], "tags": ["translation", "generated_from_trainer"], "model-index": [{"name": "eng-guj-simcse_central_ssrb", "results": []}]}
task
[ "TRANSLATION" ]
46,477
vesteinn/german-icelandic-translation
vesteinn
translation
[ "transformers", "pytorch", "safetensors", "marian", "text2text-generation", "translation", "de", "is", "multilingual", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-03-02T23:29:05Z
2025-03-11T12:12:50+00:00
113
0
--- language: - de - is - multilingual tags: - translation --- # Student project - temporary upload
null
Non_BioNLP
# Student project - temporary upload
{"language": ["de", "is", "multilingual"], "tags": ["translation"]}
task
[ "TRANSLATION" ]
46,478
itoh5588/distilbert-base-uncased-finetuned-clinc
itoh5588
text-classification
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "dataset:clinc_oos", "base_model:distilbert/distilbert-base-uncased", "base_model:finetune:distilbert/distilbert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-08-03T02:11:27Z
2023-08-11T03:06:30+00:00
8
0
--- base_model: distilbert-base-uncased datasets: - clinc_oos license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: distilbert-base-uncased-finetuned-clinc results: - task: type: text-classification name: Text Classification dataset: name: clinc_oos type: clinc_oos config: plus split: validation args: plus metrics: - type: accuracy value: 0.9203225806451613 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-clinc This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the clinc_oos dataset. It achieves the following results on the evaluation set: - Loss: 0.7589 - Accuracy: 0.9203 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 48 - eval_batch_size: 48 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 4.2904 | 1.0 | 318 | 3.2686 | 0.7297 | | 2.6005 | 2.0 | 636 | 1.8534 | 0.8442 | | 1.5214 | 3.0 | 954 | 1.1378 | 0.8997 | | 0.9944 | 4.0 | 1272 | 0.8399 | 0.9145 | | 0.7763 | 5.0 | 1590 | 0.7589 | 0.9203 | ### Framework versions - Transformers 4.31.0 - Pytorch 2.0.1+cu118 - Datasets 2.14.4 - Tokenizers 0.13.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-clinc This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the clinc_oos dataset. It achieves the following results on the evaluation set: - Loss: 0.7589 - Accuracy: 0.9203 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 48 - eval_batch_size: 48 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 4.2904 | 1.0 | 318 | 3.2686 | 0.7297 | | 2.6005 | 2.0 | 636 | 1.8534 | 0.8442 | | 1.5214 | 3.0 | 954 | 1.1378 | 0.8997 | | 0.9944 | 4.0 | 1272 | 0.8399 | 0.9145 | | 0.7763 | 5.0 | 1590 | 0.7589 | 0.9203 | ### Framework versions - Transformers 4.31.0 - Pytorch 2.0.1+cu118 - Datasets 2.14.4 - Tokenizers 0.13.3
{"base_model": "distilbert-base-uncased", "datasets": ["clinc_oos"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert-base-uncased-finetuned-clinc", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "clinc_oos", "type": "clinc_oos", "config": "plus", "split": "validation", "args": "plus"}, "metrics": [{"type": "accuracy", "value": 0.9203225806451613, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,479
mini1013/master_cate_bc19
mini1013
text-classification
[ "setfit", "safetensors", "roberta", "sentence-transformers", "text-classification", "generated_from_setfit_trainer", "arxiv:2209.11055", "base_model:mini1013/master_domain", "base_model:finetune:mini1013/master_domain", "model-index", "region:us" ]
2025-01-24T03:30:35Z
2025-01-24T03:31:01+00:00
744
0
--- base_model: mini1013/master_domain library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 아가방 가을 골지 레깅스 아기 유아 바지 남아 여아 속바지 신생 쫄바지 베이비 키즈 아가방 레깅스/쫄바지_01 치치골지레깅스 그린_80 출산/육아 > 유아동의류 > 레깅스 - text: 라고 세일러맨투맨 23겨울 아동복 아동 키즈 주니어 여아 JS_옐로 출산/육아 > 유아동의류 > 티셔츠 - text: 여아 드레스 원피스 겨울왕국2 캐주얼 안나 공주 원픽4 샴페인_120 출산/육아 > 유아동의류 > 공주드레스 - text: '[뉴발란스키즈]뉴키모 보이 다운(NK9PD4105U)100~160Size Black/110 출산/육아 > 유아동의류 > 점퍼' - text: 데일리베베 겨울 뽀글이점퍼 유아집업 아기집업 주니어 토끼_JM 출산/육아 > 유아동의류 > 점퍼 inference: true model-index: - name: SetFit with mini1013/master_domain results: - task: type: text-classification name: Text Classification dataset: name: Unknown type: unknown split: test metrics: - type: accuracy value: 1.0 name: Accuracy --- # SetFit with mini1013/master_domain This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 27 classes <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1.0 | <ul><li>'구르미니트 아동복 키즈 23년 겨울 주니어까지 등원룩 초딩옷 남아 여아 핑크옐로우_XL 출산/육아 > 유아동의류 > 니트/스웨터'</li><li>'주니어니트 아동꽈배기니트 키즈스웨어 어린이 여아 니트티 CNT30920053 22.레이나 니트_레드_120 출산/육아 > 유아동의류 > 니트/스웨터'</li><li>'our아동복 플랫니트조끼 아워 상하복 남대문아동복 초등남아옷 초딩옷 S-JXL 겨울 아이_JL(17호) 출산/육아 > 유아동의류 > 니트/스웨터'</li></ul> | | 26.0 | <ul><li>'정원한복 혜교 전통당의 청 여아한복 돌 백일 전통한복 어린이집 명절한복 9호 출산/육아 > 유아동의류 > 한복'</li><li>'[대여]남아 백일 돌 답호 모음 백일_네이비답호+백아이바지_봉황돌띠그레이 출산/육아 > 유아동의류 > 한복'</li><li>'정원한복 남아 한복 베스트 기획전 백일-15세 아동 어린이집 한복 11.현백 브라운_2호 출산/육아 > 유아동의류 > 한복'</li></ul> | | 17.0 | <ul><li>'아동 유아 남아 아기 주니어 초등 학생 정장 하객룩 화동 돌 아기 교복 어린이 세트 바지_01.5부바지검정_11호 출산/육아 > 유아동의류 > 정장'</li><li>'[돌정장대여] 킹스맨(1호/7호)-남아정장 돌수트 남아턱시도 1호_150_반팔 출산/육아 > 유아동의류 > 정장'</li><li>'남아정장 스트라이프 가을 겨울 턱시도 아동 수트 그레이_150 출산/육아 > 유아동의류 > 정장'</li></ul> | | 6.0 | <ul><li>'주니어겨울티셔츠 초등학생기모바지 중학생빅사이즈의류 남아트레이닝복 남학생면기모옷 특가302 초겨울 기능성바지_조거블랙-11호 출산/육아 > 유아동의류 > 바지'</li><li>'이엔 밍크 기모 부츠컷 제깅스 팬츠 제비_XL 출산/육아 > 유아동의류 > 바지'</li><li>'여아 바지 리본 벨루아바지 기모 겨울 벨벳 유아 초등 주니어 바지 핑크_11호 출산/육아 > 유아동의류 > 바지'</li></ul> | | 14.0 | <ul><li>'[23가을] 토리자켓 베이지_100 출산/육아 > 유아동의류 > 재킷'</li><li>'[키즈] 밍크자켓 겨울 철수와영희 페이크퍼 재킷 크림_S 출산/육아 > 유아동의류 > 재킷'</li><li>'노스페이스 키즈 후리스 유아 점퍼 뽀글이 집업 아동 플리스 주니어 자켓 여아 조카 선물 크림_130 출산/육아 > 유아동의류 > 재킷'</li></ul> | | 23.0 | <ul><li>'여아 트레이닝복 주니어 트레이닝 세트 초등학생 고학년 겨울 크롭 조거 팬츠 운동복 츄리닝 05.소녀시대 세트_블랙_150 출산/육아 > 유아동의류 > 트레이닝복'</li><li>'여아카라상하세트 세라 봄가을 트레이닝복 그레이_90 출산/육아 > 유아동의류 > 트레이닝복'</li><li>'노스페이스 키즈 주니어 아동 츄리닝 트레이닝복 세트 맨투맨 조거팬츠 NT7TN50S J 트레이닝 셋업_올 트레인 집업 블랙 1_140 출산/육아 > 유아동의류 > 트레이닝복'</li></ul> | | 10.0 | <ul><li>'보니토 퀼팅남방 남아 여아 유아동 키즈 겨울 스타일 4온스 다이아퀼팅 남방 블랙_XL 출산/육아 > 유아동의류 > 셔츠/남방'</li><li>'보드리셔츠 키즈 아기 아동 셔츠 남방 10kg-45kg 베이지_L 출산/육아 > 유아동의류 > 셔츠/남방'</li><li>'비비드아이 겨울 골덴 체크 남방 남아 키즈 아동 유아 주니어 아기 셔츠 여아 흰남방 겨울체크남방 그린_XS 출산/육아 > 유아동의류 > 셔츠/남방'</li></ul> | | 16.0 | <ul><li>'[갤러리아] (압소바출산,백일,돌선물)하랑상하+엘리인형딸랑이세트(AY7-13008SET)(한화갤러리아㈜ 센터시티) 80_분홍 출산/육아 > 유아동의류 > 점프슈트'</li><li>'모이몰른 클립몽글 폴리스 하프점퍼 겨울 PI_110 출산/육아 > 유아동의류 > 점프슈트'</li><li>'[블랙야크키즈](신세계하남점)23년 FW 신상 귀여운 전판 그래픽이 매력적인 [BKO코티지다운우주복] PURPLE_12M 출산/육아 > 유아동의류 > 점프슈트'</li></ul> | | 20.0 | <ul><li>'울와이드립가디건 주니어가디건 our아동복 23가을 크림 차콜 주니어 아워 차콜_XL 출산/육아 > 유아동의류 > 카디건'</li><li>'바나나제이 다이애나가디건 23가을 XL_노랑 출산/육아 > 유아동의류 > 카디건'</li><li>'겨울기모 튤립가디건 핑크_S 출산/육아 > 유아동의류 > 카디건'</li></ul> | | 19.0 | <ul><li>'크루 웜 기모 데님 와이드 팬츠 흑청_JM 출산/육아 > 유아동의류 > 청바지'</li><li>'아기 유아 기모청바지 / 아동 주니어 다트청바지 겨울청바지 데일리 데님팬츠 남아 여아 JS_청 출산/육아 > 유아동의류 > 청바지'</li><li>'바이오워싱 겨울 청바지 데미지기모청팬츠 중청_JS(2XL) 출산/육아 > 유아동의류 > 청바지'</li></ul> | | 0.0 | <ul><li>'인어공주 수영복 꼬리 3piece A2(핫핑)_130 출산/육아 > 유아동의류 > 공주드레스'</li><li>'백설공주 라푼젤 엘사 소피아 인어 공주 벨 드레스 공주 드레스 원피스 19)안나공주 긴팔(망토포함)_120 출산/육아 > 유아동의류 > 공주드레스'</li><li>'여아 드레스 원피스 캐주얼공주 코스프레 공연 원픽4 블루_110 출산/육아 > 유아동의류 > 공주드레스'</li></ul> | | 15.0 | <ul><li>'23겨울 데일리베베 뽀글이점퍼 유아 키즈 겨울등원복 파랑꽃_L 출산/육아 > 유아동의류 > 점퍼'</li><li>'[노스페이스키즈](대구신세계)NJ3NP50 키즈 뉴 퍼피 코트 KS NEW PUFFY COAT BLK_120 출산/육아 > 유아동의류 > 점퍼'</li><li>'뉴발란스 키즈 패딩 점퍼 조끼 자켓 바람막이 베스트 미디다운 18 에센셜 퀼팅점퍼_라이트핑크NK9QD1101U_150 출산/육아 > 유아동의류 > 점퍼'</li></ul> | | 13.0 | <ul><li>'[23가을] 모니카원피스 네이비_90 출산/육아 > 유아동의류 > 원피스'</li><li>'겨울왕국 가을신상 드레스 엘사드레스 여아 아동 공주 망토 원피스옷 치마 뮤지컬의상 019원피스_핑크_L 출산/육아 > 유아동의류 > 원피스'</li><li>'초등학생 주니어 니트원피스 여아 가을 겨울 원피스 초등고학년옷 COP30922080 8.히즈 원피스_베이지_150 출산/육아 > 유아동의류 > 원피스'</li></ul> | | 3.0 | <ul><li>'돌 백일 아기드레스 신생아 06 누벨르 드레스_80 (6-12개월) 출산/육아 > 유아동의류 > 드레스'</li><li>'초등학생 연주회 드레스 여아 주니어 콩쿨 드레스 11.미우 드레스_화이트_140 출산/육아 > 유아동의류 > 드레스'</li><li>'[화동드레스대여] 결혼식화동 미카도 아기돌드레스 주니어 연주회 콩쿨드레스 소피아드레스 23G03 7호(7-8세)+10.000_190_규정 동의 후 확인합니다 출산/육아 > 유아동의류 > 드레스'</li></ul> | | 22.0 | <ul><li>'[현대백화점]블랙야크키즈[BKO코티지다운우주복]유아용 점프수트 신생아 방한 패딩 출산 선물 1BKOPW3903 [00005] MI(민트)/18M 출산/육아 > 유아동의류 > 코트'</li><li>'유아코트 르베브 멜로디퍼코트 아동 아기 애기 키즈 남아 여아 코트 S_핑크 출산/육아 > 유아동의류 > 코트'</li><li>'유아동 기모누빔코트 여아 토니 플라워꼬마돕바 블랙-7호 출산/육아 > 유아동의류 > 코트'</li></ul> | | 9.0 | <ul><li>'아동 주니어 기모 포인트상하복 초등학생 남아 여아 스마일 운동복 트레이닝복세트 꼬)엘로포인트상하_크림_21호 출산/육아 > 유아동의류 > 상하세트'</li><li>'화이트스케치북 기모베이직세트 주문 후 취소/교환이 어려울 수 있습니다._스카이_17(+3200) 출산/육아 > 유아동의류 > 상하세트'</li><li>'초등여아스쿨룩 초등 상하복 학생가을옷 주니어상하세트 치마바지 투피스 21.쇼파드 상하세트_블랙_160 출산/육아 > 유아동의류 > 상하세트'</li></ul> | | 24.0 | <ul><li>'(가을 50% 세일) 미니봉봉 메모리즈맨투맨 아동 주니어 검정_L 출산/육아 > 유아동의류 > 티셔츠'</li><li>'미니로브 벨라맨투맨 모카_L 출산/육아 > 유아동의류 > 티셔츠'</li><li>'mn 벨라맨투맨 모카_L 출산/육아 > 유아동의류 > 티셔츠'</li></ul> | | 4.0 | <ul><li>'레깅스 아동 유아 아기 어린이 주니어 키즈 가을 남아 여아 쫄바지 치랭스 치마 속바지 배앓이방지 밍크 피치 피치트레이닝레깅스_인디핑크_5호 출산/육아 > 유아동의류 > 레깅스'</li><li>'여아 기모레깅스 겨울 유아 초등학생 아기 쫄바지 배색 레깅스 피치 기모 레깅스_초코브라운_9호 출산/육아 > 유아동의류 > 레깅스'</li><li>'아동레깅스 기본타이즈 골지타이즈 기모레깅스 NO.1_블랙_15호 출산/육아 > 유아동의류 > 레깅스'</li></ul> | | 2.0 | <ul><li>'키즈 어린이 치어리더 댄스복 방송댄스 치어리딩 출산/육아 > 유아동의류 > 댄스복'</li><li>'여아 방송 댄스 치어리딩 주니어 주름치마 출산/육아 > 유아동의류 > 댄스복'</li><li>'아동댄스복 오렌지화이트세트 - 주니어방송댄스복 아동힙합 출산/육아 > 유아동의류 > 댄스복'</li></ul> | | 21.0 | <ul><li>'할로윈 코스튬 의상 아동 남아 슈트 유치원 아이언맨 캡틴 스파이더맨 09.해리포터_L 출산/육아 > 유아동의류 > 코스튬의상'</li><li>'아동 여아 남아 유아할로윈 크리스마스 의상 코스튬 어벤져스 마녀코스튬 유치원 드레스 TS01 페퍼 루돌프 맨투맨_장갑루돌프(그린)_7 출산/육아 > 유아동의류 > 코스튬의상'</li><li>'토끼 파티복 장기자랑 공연 의상 유치원 어린이 댄스 토끼 1)170(신장 162-172cm) 출산/육아 > 유아동의류 > 코스튬의상'</li></ul> | | 5.0 | <ul><li>'생활잡화 가정잡화 주방잡화 아동용비옷 욕실잡화 생활소품 10개묶음 출산/육아 > 유아동의류 > 레인코트'</li><li>'유아우비 아기 우비 어린이 남아 여아 초등 802 네이비_L(130/140) 출산/육아 > 유아동의류 > 레인코트'</li><li>'유아동 어린이 판초우의-꿀벌 / 우비 비옷 레인코트 03. 꿀벌(스카이)_3XL 출산/육아 > 유아동의류 > 레인코트'</li></ul> | | 25.0 | <ul><li>'모녀 커플룩 패밀리룩 맘 모녀룩 사진 소품 임산부 드레스 출산 엄마 7 출산/육아 > 유아동의류 > 패밀리룩'</li><li>'컬러 하트 맘커플룩 엄마아기 패밀리룩 모녀룩 파자마 홈웨어 출산/육아 > 유아동의류 > 패밀리룩'</li><li>'풀잎 여행가족티 바캉스패밀리룩 단체 돌잔치 돌촬영 출산/육아 > 유아동의류 > 패밀리룩'</li></ul> | | 8.0 | <ul><li>'23겨울 에이마켓 엠마스모크블라우스유아 아동 어린이 주니어 여아 플라워 티 XS-XL 밤색_XS 출산/육아 > 유아동의류 > 블라우스'</li><li>'바나나제이 솔방울블라우스 키즈 주니어 아동복 23겨울 핑크_JM 출산/육아 > 유아동의류 > 블라우스'</li><li>'세인트돌 패딩타이블라 유아 아동 여아 화이트 블랙 세일러카라 세라블라우스 L_화이트 출산/육아 > 유아동의류 > 블라우스'</li></ul> | | 18.0 | <ul><li>'아워패딩조끼 주니어패딩조끼 유아 아기 키즈 OUR아동복(S-JXL) 카키_S_리오더시3주이상소요/단순변심취소불가 출산/육아 > 유아동의류 > 조끼'</li><li>'제제우노시티 리퍼베스트 투톤 배색조끼 카키_L 출산/육아 > 유아동의류 > 조끼'</li><li>'남아 여아 체온유지 후리스조끼 아이점퍼 이너조끼 핑크_JS 출산/육아 > 유아동의류 > 조끼'</li></ul> | | 12.0 | <ul><li>'데이빗앤케이트 주니어 아동 스키복 보드복 세트 MANU ORANGE 12Y_12Y 출산/육아 > 유아동의류 > 스키복'</li><li>'유아 스키복 아기 키즈 아동 남아 여아 스키바지 눈썰매복 패딩멜빵 보드복 10 눈썰매 패딩 후드_그레이_S 출산/육아 > 유아동의류 > 스키복'</li><li>'유아 아동 키즈 스키바지 눈 썰매바지 썰매복 스키복 보드복 패딩 방수 방한바지 방한복 ★01.스키.썰매바지_05.옐로우_9호 출산/육아 > 유아동의류 > 스키복'</li></ul> | | 11.0 | <ul><li>'[키즈] 앞포켓 트위드 스커트 여아 미니 가을 룩 핑크_JS 출산/육아 > 유아동의류 > 스커트'</li><li>'코첼라 플리츠 sk 여자아이 유아 여아 아동 키즈 초등 주니어 봄 가을 스커트 치마 면치마 여아스커트 키즈스커트 치마 체크스커트 밴딩치마 밴딩스커트 하객룩 스쿨룩 플리츠 스커트 블랙_07호 출산/육아 > 유아동의류 > 스커트'</li><li>'23가을 소예 패딩포켓스커트 (XS-XL) 네이비_L 출산/육아 > 유아동의류 > 스커트'</li></ul> | | 7.0 | <ul><li>'유아발레복 8종 골라담기 분리형 여아 발레 출산/육아 > 유아동의류 > 발레복'</li><li>'튜튜 스커트 발레튜튜 유아 발레복세트 도미니코 여아 문센 발레복 출산/육아 > 유아동의류 > 발레복'</li><li>'슈크레 튜튜 유아발레복 / 발레복 분리형 아동 여아 유아 아기 문센 출산/육아 > 유아동의류 > 발레복'</li></ul> | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 1.0 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("mini1013/master_cate_bc19") # Run inference preds = model("데일리베베 겨울 뽀글이점퍼 유아집업 아기집업 주니어 토끼_JM 출산/육아 > 유아동의류 > 점퍼") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 7 | 15.2902 | 36 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 70 | | 1.0 | 70 | | 2.0 | 20 | | 3.0 | 70 | | 4.0 | 70 | | 5.0 | 70 | | 6.0 | 70 | | 7.0 | 20 | | 8.0 | 70 | | 9.0 | 70 | | 10.0 | 70 | | 11.0 | 70 | | 12.0 | 70 | | 13.0 | 70 | | 14.0 | 70 | | 15.0 | 70 | | 16.0 | 70 | | 17.0 | 70 | | 18.0 | 70 | | 19.0 | 70 | | 20.0 | 70 | | 21.0 | 70 | | 22.0 | 70 | | 23.0 | 70 | | 24.0 | 70 | | 25.0 | 20 | | 26.0 | 70 | ### Training Hyperparameters - batch_size: (256, 256) - num_epochs: (30, 30) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 50 - body_learning_rate: (2e-05, 1e-05) - head_learning_rate: 0.01 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:-------:|:-----:|:-------------:|:---------------:| | 0.0029 | 1 | 0.499 | - | | 0.1471 | 50 | 0.4995 | - | | 0.2941 | 100 | 0.4977 | - | | 0.4412 | 150 | 0.4739 | - | | 0.5882 | 200 | 0.3318 | - | | 0.7353 | 250 | 0.2867 | - | | 0.8824 | 300 | 0.1873 | - | | 1.0294 | 350 | 0.1056 | - | | 1.1765 | 400 | 0.0747 | - | | 1.3235 | 450 | 0.0675 | - | | 1.4706 | 500 | 0.0391 | - | | 1.6176 | 550 | 0.0156 | - | | 1.7647 | 600 | 0.0067 | - | | 1.9118 | 650 | 0.004 | - | | 2.0588 | 700 | 0.0029 | - | | 2.2059 | 750 | 0.0018 | - | | 2.3529 | 800 | 0.0019 | - | | 2.5 | 850 | 0.0018 | - | | 2.6471 | 900 | 0.0006 | - | | 2.7941 | 950 | 0.0004 | - | | 2.9412 | 1000 | 0.0004 | - | | 3.0882 | 1050 | 0.0003 | - | | 3.2353 | 1100 | 0.0004 | - | | 3.3824 | 1150 | 0.0003 | - | | 3.5294 | 1200 | 0.0002 | - | | 3.6765 | 1250 | 0.0003 | - | | 3.8235 | 1300 | 0.0003 | - | | 3.9706 | 1350 | 0.0001 | - | | 4.1176 | 1400 | 0.0003 | - | | 4.2647 | 1450 | 0.0002 | - | | 4.4118 | 1500 | 0.0002 | - | | 4.5588 | 1550 | 0.0002 | - | | 4.7059 | 1600 | 0.0003 | - | | 4.8529 | 1650 | 0.0001 | - | | 5.0 | 1700 | 0.0002 | - | | 5.1471 | 1750 | 0.0002 | - | | 5.2941 | 1800 | 0.0001 | - | | 5.4412 | 1850 | 0.0003 | - | | 5.5882 | 1900 | 0.0002 | - | | 5.7353 | 1950 | 0.0003 | - | | 5.8824 | 2000 | 0.0002 | - | | 6.0294 | 2050 | 0.0003 | - | | 6.1765 | 2100 | 0.0001 | - | | 6.3235 | 2150 | 0.0002 | - | | 6.4706 | 2200 | 0.0001 | - | | 6.6176 | 2250 | 0.0002 | - | | 6.7647 | 2300 | 0.0002 | - | | 6.9118 | 2350 | 0.0002 | - | | 7.0588 | 2400 | 0.0002 | - | | 7.2059 | 2450 | 0.0002 | - | | 7.3529 | 2500 | 0.0001 | - | | 7.5 | 2550 | 0.0001 | - | | 7.6471 | 2600 | 0.0002 | - | | 7.7941 | 2650 | 0.0002 | - | | 7.9412 | 2700 | 0.0002 | - | | 8.0882 | 2750 | 0.0001 | - | | 8.2353 | 2800 | 0.0001 | - | | 8.3824 | 2850 | 0.0002 | - | | 8.5294 | 2900 | 0.0002 | - | | 8.6765 | 2950 | 0.0001 | - | | 8.8235 | 3000 | 0.0003 | - | | 8.9706 | 3050 | 0.0003 | - | | 9.1176 | 3100 | 0.0002 | - | | 9.2647 | 3150 | 0.0002 | - | | 9.4118 | 3200 | 0.0 | - | | 9.5588 | 3250 | 0.0003 | - | | 9.7059 | 3300 | 0.0003 | - | | 9.8529 | 3350 | 0.0001 | - | | 10.0 | 3400 | 0.0001 | - | | 10.1471 | 3450 | 0.0002 | - | | 10.2941 | 3500 | 0.0001 | - | | 10.4412 | 3550 | 0.0002 | - | | 10.5882 | 3600 | 0.0001 | - | | 10.7353 | 3650 | 0.0001 | - | | 10.8824 | 3700 | 0.0002 | - | | 11.0294 | 3750 | 0.0001 | - | | 11.1765 | 3800 | 0.0001 | - | | 11.3235 | 3850 | 0.0002 | - | | 11.4706 | 3900 | 0.0003 | - | | 11.6176 | 3950 | 0.0001 | - | | 11.7647 | 4000 | 0.0002 | - | | 11.9118 | 4050 | 0.0001 | - | | 12.0588 | 4100 | 0.0001 | - | | 12.2059 | 4150 | 0.0002 | - | | 12.3529 | 4200 | 0.0001 | - | | 12.5 | 4250 | 0.0001 | - | | 12.6471 | 4300 | 0.0002 | - | | 12.7941 | 4350 | 0.0003 | - | | 12.9412 | 4400 | 0.0006 | - | | 13.0882 | 4450 | 0.0018 | - | | 13.2353 | 4500 | 0.0011 | - | | 13.3824 | 4550 | 0.0008 | - | | 13.5294 | 4600 | 0.0011 | - | | 13.6765 | 4650 | 0.001 | - | | 13.8235 | 4700 | 0.0003 | - | | 13.9706 | 4750 | 0.0001 | - | | 14.1176 | 4800 | 0.0001 | - | | 14.2647 | 4850 | 0.0001 | - | | 14.4118 | 4900 | 0.0001 | - | | 14.5588 | 4950 | 0.0002 | - | | 14.7059 | 5000 | 0.0002 | - | | 14.8529 | 5050 | 0.0 | - | | 15.0 | 5100 | 0.0 | - | | 15.1471 | 5150 | 0.0 | - | | 15.2941 | 5200 | 0.0 | - | | 15.4412 | 5250 | 0.0 | - | | 15.5882 | 5300 | 0.0 | - | | 15.7353 | 5350 | 0.0 | - | | 15.8824 | 5400 | 0.0 | - | | 16.0294 | 5450 | 0.0 | - | | 16.1765 | 5500 | 0.0 | - | | 16.3235 | 5550 | 0.0 | - | | 16.4706 | 5600 | 0.0 | - | | 16.6176 | 5650 | 0.0 | - | | 16.7647 | 5700 | 0.0 | - | | 16.9118 | 5750 | 0.0 | - | | 17.0588 | 5800 | 0.0 | - | | 17.2059 | 5850 | 0.0 | - | | 17.3529 | 5900 | 0.0 | - | | 17.5 | 5950 | 0.0 | - | | 17.6471 | 6000 | 0.0 | - | | 17.7941 | 6050 | 0.0 | - | | 17.9412 | 6100 | 0.0 | - | | 18.0882 | 6150 | 0.0 | - | | 18.2353 | 6200 | 0.0 | - | | 18.3824 | 6250 | 0.0 | - | | 18.5294 | 6300 | 0.0 | - | | 18.6765 | 6350 | 0.0 | - | | 18.8235 | 6400 | 0.0 | - | | 18.9706 | 6450 | 0.0 | - | | 19.1176 | 6500 | 0.0 | - | | 19.2647 | 6550 | 0.0 | - | | 19.4118 | 6600 | 0.0 | - | | 19.5588 | 6650 | 0.0 | - | | 19.7059 | 6700 | 0.0 | - | | 19.8529 | 6750 | 0.0 | - | | 20.0 | 6800 | 0.0 | - | | 20.1471 | 6850 | 0.0 | - | | 20.2941 | 6900 | 0.0 | - | | 20.4412 | 6950 | 0.0 | - | | 20.5882 | 7000 | 0.0 | - | | 20.7353 | 7050 | 0.0 | - | | 20.8824 | 7100 | 0.0 | - | | 21.0294 | 7150 | 0.0 | - | | 21.1765 | 7200 | 0.0 | - | | 21.3235 | 7250 | 0.0 | - | | 21.4706 | 7300 | 0.0 | - | | 21.6176 | 7350 | 0.0 | - | | 21.7647 | 7400 | 0.0 | - | | 21.9118 | 7450 | 0.0 | - | | 22.0588 | 7500 | 0.0 | - | | 22.2059 | 7550 | 0.0 | - | | 22.3529 | 7600 | 0.0 | - | | 22.5 | 7650 | 0.0 | - | | 22.6471 | 7700 | 0.0 | - | | 22.7941 | 7750 | 0.0 | - | | 22.9412 | 7800 | 0.0 | - | | 23.0882 | 7850 | 0.0 | - | | 23.2353 | 7900 | 0.0 | - | | 23.3824 | 7950 | 0.0 | - | | 23.5294 | 8000 | 0.0 | - | | 23.6765 | 8050 | 0.0 | - | | 23.8235 | 8100 | 0.0 | - | | 23.9706 | 8150 | 0.0 | - | | 24.1176 | 8200 | 0.0 | - | | 24.2647 | 8250 | 0.0 | - | | 24.4118 | 8300 | 0.0 | - | | 24.5588 | 8350 | 0.0 | - | | 24.7059 | 8400 | 0.0 | - | | 24.8529 | 8450 | 0.0 | - | | 25.0 | 8500 | 0.0 | - | | 25.1471 | 8550 | 0.0 | - | | 25.2941 | 8600 | 0.0 | - | | 25.4412 | 8650 | 0.0 | - | | 25.5882 | 8700 | 0.0 | - | | 25.7353 | 8750 | 0.0 | - | | 25.8824 | 8800 | 0.0 | - | | 26.0294 | 8850 | 0.0 | - | | 26.1765 | 8900 | 0.0 | - | | 26.3235 | 8950 | 0.0 | - | | 26.4706 | 9000 | 0.0 | - | | 26.6176 | 9050 | 0.0 | - | | 26.7647 | 9100 | 0.0 | - | | 26.9118 | 9150 | 0.0 | - | | 27.0588 | 9200 | 0.0 | - | | 27.2059 | 9250 | 0.0 | - | | 27.3529 | 9300 | 0.0 | - | | 27.5 | 9350 | 0.0 | - | | 27.6471 | 9400 | 0.0 | - | | 27.7941 | 9450 | 0.0 | - | | 27.9412 | 9500 | 0.0 | - | | 28.0882 | 9550 | 0.0 | - | | 28.2353 | 9600 | 0.0 | - | | 28.3824 | 9650 | 0.0 | - | | 28.5294 | 9700 | 0.0 | - | | 28.6765 | 9750 | 0.0 | - | | 28.8235 | 9800 | 0.0 | - | | 28.9706 | 9850 | 0.0 | - | | 29.1176 | 9900 | 0.0 | - | | 29.2647 | 9950 | 0.0 | - | | 29.4118 | 10000 | 0.0 | - | | 29.5588 | 10050 | 0.0 | - | | 29.7059 | 10100 | 0.0 | - | | 29.8529 | 10150 | 0.0 | - | | 30.0 | 10200 | 0.0 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.1.0 - Sentence Transformers: 3.3.1 - Transformers: 4.44.2 - PyTorch: 2.2.0a0+81ea7a4 - Datasets: 3.2.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SetFit with mini1013/master_domain This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 27 classes <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1.0 | <ul><li>'구르미니트 아동복 키즈 23년 겨울 주니어까지 등원룩 초딩옷 남아 여아 핑크옐로우_XL 출산/육아 > 유아동의류 > 니트/스웨터'</li><li>'주니어니트 아동꽈배기니트 키즈스웨어 어린이 여아 니트티 CNT30920053 22.레이나 니트_레드_120 출산/육아 > 유아동의류 > 니트/스웨터'</li><li>'our아동복 플랫니트조끼 아워 상하복 남대문아동복 초등남아옷 초딩옷 S-JXL 겨울 아이_JL(17호) 출산/육아 > 유아동의류 > 니트/스웨터'</li></ul> | | 26.0 | <ul><li>'정원한복 혜교 전통당의 청 여아한복 돌 백일 전통한복 어린이집 명절한복 9호 출산/육아 > 유아동의류 > 한복'</li><li>'[대여]남아 백일 돌 답호 모음 백일_네이비답호+백아이바지_봉황돌띠그레이 출산/육아 > 유아동의류 > 한복'</li><li>'정원한복 남아 한복 베스트 기획전 백일-15세 아동 어린이집 한복 11.현백 브라운_2호 출산/육아 > 유아동의류 > 한복'</li></ul> | | 17.0 | <ul><li>'아동 유아 남아 아기 주니어 초등 학생 정장 하객룩 화동 돌 아기 교복 어린이 세트 바지_01.5부바지검정_11호 출산/육아 > 유아동의류 > 정장'</li><li>'[돌정장대여] 킹스맨(1호/7호)-남아정장 돌수트 남아턱시도 1호_150_반팔 출산/육아 > 유아동의류 > 정장'</li><li>'남아정장 스트라이프 가을 겨울 턱시도 아동 수트 그레이_150 출산/육아 > 유아동의류 > 정장'</li></ul> | | 6.0 | <ul><li>'주니어겨울티셔츠 초등학생기모바지 중학생빅사이즈의류 남아트레이닝복 남학생면기모옷 특가302 초겨울 기능성바지_조거블랙-11호 출산/육아 > 유아동의류 > 바지'</li><li>'이엔 밍크 기모 부츠컷 제깅스 팬츠 제비_XL 출산/육아 > 유아동의류 > 바지'</li><li>'여아 바지 리본 벨루아바지 기모 겨울 벨벳 유아 초등 주니어 바지 핑크_11호 출산/육아 > 유아동의류 > 바지'</li></ul> | | 14.0 | <ul><li>'[23가을] 토리자켓 베이지_100 출산/육아 > 유아동의류 > 재킷'</li><li>'[키즈] 밍크자켓 겨울 철수와영희 페이크퍼 재킷 크림_S 출산/육아 > 유아동의류 > 재킷'</li><li>'노스페이스 키즈 후리스 유아 점퍼 뽀글이 집업 아동 플리스 주니어 자켓 여아 조카 선물 크림_130 출산/육아 > 유아동의류 > 재킷'</li></ul> | | 23.0 | <ul><li>'여아 트레이닝복 주니어 트레이닝 세트 초등학생 고학년 겨울 크롭 조거 팬츠 운동복 츄리닝 05.소녀시대 세트_블랙_150 출산/육아 > 유아동의류 > 트레이닝복'</li><li>'여아카라상하세트 세라 봄가을 트레이닝복 그레이_90 출산/육아 > 유아동의류 > 트레이닝복'</li><li>'노스페이스 키즈 주니어 아동 츄리닝 트레이닝복 세트 맨투맨 조거팬츠 NT7TN50S J 트레이닝 셋업_올 트레인 집업 블랙 1_140 출산/육아 > 유아동의류 > 트레이닝복'</li></ul> | | 10.0 | <ul><li>'보니토 퀼팅남방 남아 여아 유아동 키즈 겨울 스타일 4온스 다이아퀼팅 남방 블랙_XL 출산/육아 > 유아동의류 > 셔츠/남방'</li><li>'보드리셔츠 키즈 아기 아동 셔츠 남방 10kg-45kg 베이지_L 출산/육아 > 유아동의류 > 셔츠/남방'</li><li>'비비드아이 겨울 골덴 체크 남방 남아 키즈 아동 유아 주니어 아기 셔츠 여아 흰남방 겨울체크남방 그린_XS 출산/육아 > 유아동의류 > 셔츠/남방'</li></ul> | | 16.0 | <ul><li>'[갤러리아] (압소바출산,백일,돌선물)하랑상하+엘리인형딸랑이세트(AY7-13008SET)(한화갤러리아㈜ 센터시티) 80_분홍 출산/육아 > 유아동의류 > 점프슈트'</li><li>'모이몰른 클립몽글 폴리스 하프점퍼 겨울 PI_110 출산/육아 > 유아동의류 > 점프슈트'</li><li>'[블랙야크키즈](신세계하남점)23년 FW 신상 귀여운 전판 그래픽이 매력적인 [BKO코티지다운우주복] PURPLE_12M 출산/육아 > 유아동의류 > 점프슈트'</li></ul> | | 20.0 | <ul><li>'울와이드립가디건 주니어가디건 our아동복 23가을 크림 차콜 주니어 아워 차콜_XL 출산/육아 > 유아동의류 > 카디건'</li><li>'바나나제이 다이애나가디건 23가을 XL_노랑 출산/육아 > 유아동의류 > 카디건'</li><li>'겨울기모 튤립가디건 핑크_S 출산/육아 > 유아동의류 > 카디건'</li></ul> | | 19.0 | <ul><li>'크루 웜 기모 데님 와이드 팬츠 흑청_JM 출산/육아 > 유아동의류 > 청바지'</li><li>'아기 유아 기모청바지 / 아동 주니어 다트청바지 겨울청바지 데일리 데님팬츠 남아 여아 JS_청 출산/육아 > 유아동의류 > 청바지'</li><li>'바이오워싱 겨울 청바지 데미지기모청팬츠 중청_JS(2XL) 출산/육아 > 유아동의류 > 청바지'</li></ul> | | 0.0 | <ul><li>'인어공주 수영복 꼬리 3piece A2(핫핑)_130 출산/육아 > 유아동의류 > 공주드레스'</li><li>'백설공주 라푼젤 엘사 소피아 인어 공주 벨 드레스 공주 드레스 원피스 19)안나공주 긴팔(망토포함)_120 출산/육아 > 유아동의류 > 공주드레스'</li><li>'여아 드레스 원피스 캐주얼공주 코스프레 공연 원픽4 블루_110 출산/육아 > 유아동의류 > 공주드레스'</li></ul> | | 15.0 | <ul><li>'23겨울 데일리베베 뽀글이점퍼 유아 키즈 겨울등원복 파랑꽃_L 출산/육아 > 유아동의류 > 점퍼'</li><li>'[노스페이스키즈](대구신세계)NJ3NP50 키즈 뉴 퍼피 코트 KS NEW PUFFY COAT BLK_120 출산/육아 > 유아동의류 > 점퍼'</li><li>'뉴발란스 키즈 패딩 점퍼 조끼 자켓 바람막이 베스트 미디다운 18 에센셜 퀼팅점퍼_라이트핑크NK9QD1101U_150 출산/육아 > 유아동의류 > 점퍼'</li></ul> | | 13.0 | <ul><li>'[23가을] 모니카원피스 네이비_90 출산/육아 > 유아동의류 > 원피스'</li><li>'겨울왕국 가을신상 드레스 엘사드레스 여아 아동 공주 망토 원피스옷 치마 뮤지컬의상 019원피스_핑크_L 출산/육아 > 유아동의류 > 원피스'</li><li>'초등학생 주니어 니트원피스 여아 가을 겨울 원피스 초등고학년옷 COP30922080 8.히즈 원피스_베이지_150 출산/육아 > 유아동의류 > 원피스'</li></ul> | | 3.0 | <ul><li>'돌 백일 아기드레스 신생아 06 누벨르 드레스_80 (6-12개월) 출산/육아 > 유아동의류 > 드레스'</li><li>'초등학생 연주회 드레스 여아 주니어 콩쿨 드레스 11.미우 드레스_화이트_140 출산/육아 > 유아동의류 > 드레스'</li><li>'[화동드레스대여] 결혼식화동 미카도 아기돌드레스 주니어 연주회 콩쿨드레스 소피아드레스 23G03 7호(7-8세)+10.000_190_규정 동의 후 확인합니다 출산/육아 > 유아동의류 > 드레스'</li></ul> | | 22.0 | <ul><li>'[현대백화점]블랙야크키즈[BKO코티지다운우주복]유아용 점프수트 신생아 방한 패딩 출산 선물 1BKOPW3903 [00005] MI(민트)/18M 출산/육아 > 유아동의류 > 코트'</li><li>'유아코트 르베브 멜로디퍼코트 아동 아기 애기 키즈 남아 여아 코트 S_핑크 출산/육아 > 유아동의류 > 코트'</li><li>'유아동 기모누빔코트 여아 토니 플라워꼬마돕바 블랙-7호 출산/육아 > 유아동의류 > 코트'</li></ul> | | 9.0 | <ul><li>'아동 주니어 기모 포인트상하복 초등학생 남아 여아 스마일 운동복 트레이닝복세트 꼬)엘로포인트상하_크림_21호 출산/육아 > 유아동의류 > 상하세트'</li><li>'화이트스케치북 기모베이직세트 주문 후 취소/교환이 어려울 수 있습니다._스카이_17(+3200) 출산/육아 > 유아동의류 > 상하세트'</li><li>'초등여아스쿨룩 초등 상하복 학생가을옷 주니어상하세트 치마바지 투피스 21.쇼파드 상하세트_블랙_160 출산/육아 > 유아동의류 > 상하세트'</li></ul> | | 24.0 | <ul><li>'(가을 50% 세일) 미니봉봉 메모리즈맨투맨 아동 주니어 검정_L 출산/육아 > 유아동의류 > 티셔츠'</li><li>'미니로브 벨라맨투맨 모카_L 출산/육아 > 유아동의류 > 티셔츠'</li><li>'mn 벨라맨투맨 모카_L 출산/육아 > 유아동의류 > 티셔츠'</li></ul> | | 4.0 | <ul><li>'레깅스 아동 유아 아기 어린이 주니어 키즈 가을 남아 여아 쫄바지 치랭스 치마 속바지 배앓이방지 밍크 피치 피치트레이닝레깅스_인디핑크_5호 출산/육아 > 유아동의류 > 레깅스'</li><li>'여아 기모레깅스 겨울 유아 초등학생 아기 쫄바지 배색 레깅스 피치 기모 레깅스_초코브라운_9호 출산/육아 > 유아동의류 > 레깅스'</li><li>'아동레깅스 기본타이즈 골지타이즈 기모레깅스 NO.1_블랙_15호 출산/육아 > 유아동의류 > 레깅스'</li></ul> | | 2.0 | <ul><li>'키즈 어린이 치어리더 댄스복 방송댄스 치어리딩 출산/육아 > 유아동의류 > 댄스복'</li><li>'여아 방송 댄스 치어리딩 주니어 주름치마 출산/육아 > 유아동의류 > 댄스복'</li><li>'아동댄스복 오렌지화이트세트 - 주니어방송댄스복 아동힙합 출산/육아 > 유아동의류 > 댄스복'</li></ul> | | 21.0 | <ul><li>'할로윈 코스튬 의상 아동 남아 슈트 유치원 아이언맨 캡틴 스파이더맨 09.해리포터_L 출산/육아 > 유아동의류 > 코스튬의상'</li><li>'아동 여아 남아 유아할로윈 크리스마스 의상 코스튬 어벤져스 마녀코스튬 유치원 드레스 TS01 페퍼 루돌프 맨투맨_장갑루돌프(그린)_7 출산/육아 > 유아동의류 > 코스튬의상'</li><li>'토끼 파티복 장기자랑 공연 의상 유치원 어린이 댄스 토끼 1)170(신장 162-172cm) 출산/육아 > 유아동의류 > 코스튬의상'</li></ul> | | 5.0 | <ul><li>'생활잡화 가정잡화 주방잡화 아동용비옷 욕실잡화 생활소품 10개묶음 출산/육아 > 유아동의류 > 레인코트'</li><li>'유아우비 아기 우비 어린이 남아 여아 초등 802 네이비_L(130/140) 출산/육아 > 유아동의류 > 레인코트'</li><li>'유아동 어린이 판초우의-꿀벌 / 우비 비옷 레인코트 03. 꿀벌(스카이)_3XL 출산/육아 > 유아동의류 > 레인코트'</li></ul> | | 25.0 | <ul><li>'모녀 커플룩 패밀리룩 맘 모녀룩 사진 소품 임산부 드레스 출산 엄마 7 출산/육아 > 유아동의류 > 패밀리룩'</li><li>'컬러 하트 맘커플룩 엄마아기 패밀리룩 모녀룩 파자마 홈웨어 출산/육아 > 유아동의류 > 패밀리룩'</li><li>'풀잎 여행가족티 바캉스패밀리룩 단체 돌잔치 돌촬영 출산/육아 > 유아동의류 > 패밀리룩'</li></ul> | | 8.0 | <ul><li>'23겨울 에이마켓 엠마스모크블라우스유아 아동 어린이 주니어 여아 플라워 티 XS-XL 밤색_XS 출산/육아 > 유아동의류 > 블라우스'</li><li>'바나나제이 솔방울블라우스 키즈 주니어 아동복 23겨울 핑크_JM 출산/육아 > 유아동의류 > 블라우스'</li><li>'세인트돌 패딩타이블라 유아 아동 여아 화이트 블랙 세일러카라 세라블라우스 L_화이트 출산/육아 > 유아동의류 > 블라우스'</li></ul> | | 18.0 | <ul><li>'아워패딩조끼 주니어패딩조끼 유아 아기 키즈 OUR아동복(S-JXL) 카키_S_리오더시3주이상소요/단순변심취소불가 출산/육아 > 유아동의류 > 조끼'</li><li>'제제우노시티 리퍼베스트 투톤 배색조끼 카키_L 출산/육아 > 유아동의류 > 조끼'</li><li>'남아 여아 체온유지 후리스조끼 아이점퍼 이너조끼 핑크_JS 출산/육아 > 유아동의류 > 조끼'</li></ul> | | 12.0 | <ul><li>'데이빗앤케이트 주니어 아동 스키복 보드복 세트 MANU ORANGE 12Y_12Y 출산/육아 > 유아동의류 > 스키복'</li><li>'유아 스키복 아기 키즈 아동 남아 여아 스키바지 눈썰매복 패딩멜빵 보드복 10 눈썰매 패딩 후드_그레이_S 출산/육아 > 유아동의류 > 스키복'</li><li>'유아 아동 키즈 스키바지 눈 썰매바지 썰매복 스키복 보드복 패딩 방수 방한바지 방한복 ★01.스키.썰매바지_05.옐로우_9호 출산/육아 > 유아동의류 > 스키복'</li></ul> | | 11.0 | <ul><li>'[키즈] 앞포켓 트위드 스커트 여아 미니 가을 룩 핑크_JS 출산/육아 > 유아동의류 > 스커트'</li><li>'코첼라 플리츠 sk 여자아이 유아 여아 아동 키즈 초등 주니어 봄 가을 스커트 치마 면치마 여아스커트 키즈스커트 치마 체크스커트 밴딩치마 밴딩스커트 하객룩 스쿨룩 플리츠 스커트 블랙_07호 출산/육아 > 유아동의류 > 스커트'</li><li>'23가을 소예 패딩포켓스커트 (XS-XL) 네이비_L 출산/육아 > 유아동의류 > 스커트'</li></ul> | | 7.0 | <ul><li>'유아발레복 8종 골라담기 분리형 여아 발레 출산/육아 > 유아동의류 > 발레복'</li><li>'튜튜 스커트 발레튜튜 유아 발레복세트 도미니코 여아 문센 발레복 출산/육아 > 유아동의류 > 발레복'</li><li>'슈크레 튜튜 유아발레복 / 발레복 분리형 아동 여아 유아 아기 문센 출산/육아 > 유아동의류 > 발레복'</li></ul> | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 1.0 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("mini1013/master_cate_bc19") # Run inference preds = model("데일리베베 겨울 뽀글이점퍼 유아집업 아기집업 주니어 토끼_JM 출산/육아 > 유아동의류 > 점퍼") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 7 | 15.2902 | 36 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 70 | | 1.0 | 70 | | 2.0 | 20 | | 3.0 | 70 | | 4.0 | 70 | | 5.0 | 70 | | 6.0 | 70 | | 7.0 | 20 | | 8.0 | 70 | | 9.0 | 70 | | 10.0 | 70 | | 11.0 | 70 | | 12.0 | 70 | | 13.0 | 70 | | 14.0 | 70 | | 15.0 | 70 | | 16.0 | 70 | | 17.0 | 70 | | 18.0 | 70 | | 19.0 | 70 | | 20.0 | 70 | | 21.0 | 70 | | 22.0 | 70 | | 23.0 | 70 | | 24.0 | 70 | | 25.0 | 20 | | 26.0 | 70 | ### Training Hyperparameters - batch_size: (256, 256) - num_epochs: (30, 30) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 50 - body_learning_rate: (2e-05, 1e-05) - head_learning_rate: 0.01 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:-------:|:-----:|:-------------:|:---------------:| | 0.0029 | 1 | 0.499 | - | | 0.1471 | 50 | 0.4995 | - | | 0.2941 | 100 | 0.4977 | - | | 0.4412 | 150 | 0.4739 | - | | 0.5882 | 200 | 0.3318 | - | | 0.7353 | 250 | 0.2867 | - | | 0.8824 | 300 | 0.1873 | - | | 1.0294 | 350 | 0.1056 | - | | 1.1765 | 400 | 0.0747 | - | | 1.3235 | 450 | 0.0675 | - | | 1.4706 | 500 | 0.0391 | - | | 1.6176 | 550 | 0.0156 | - | | 1.7647 | 600 | 0.0067 | - | | 1.9118 | 650 | 0.004 | - | | 2.0588 | 700 | 0.0029 | - | | 2.2059 | 750 | 0.0018 | - | | 2.3529 | 800 | 0.0019 | - | | 2.5 | 850 | 0.0018 | - | | 2.6471 | 900 | 0.0006 | - | | 2.7941 | 950 | 0.0004 | - | | 2.9412 | 1000 | 0.0004 | - | | 3.0882 | 1050 | 0.0003 | - | | 3.2353 | 1100 | 0.0004 | - | | 3.3824 | 1150 | 0.0003 | - | | 3.5294 | 1200 | 0.0002 | - | | 3.6765 | 1250 | 0.0003 | - | | 3.8235 | 1300 | 0.0003 | - | | 3.9706 | 1350 | 0.0001 | - | | 4.1176 | 1400 | 0.0003 | - | | 4.2647 | 1450 | 0.0002 | - | | 4.4118 | 1500 | 0.0002 | - | | 4.5588 | 1550 | 0.0002 | - | | 4.7059 | 1600 | 0.0003 | - | | 4.8529 | 1650 | 0.0001 | - | | 5.0 | 1700 | 0.0002 | - | | 5.1471 | 1750 | 0.0002 | - | | 5.2941 | 1800 | 0.0001 | - | | 5.4412 | 1850 | 0.0003 | - | | 5.5882 | 1900 | 0.0002 | - | | 5.7353 | 1950 | 0.0003 | - | | 5.8824 | 2000 | 0.0002 | - | | 6.0294 | 2050 | 0.0003 | - | | 6.1765 | 2100 | 0.0001 | - | | 6.3235 | 2150 | 0.0002 | - | | 6.4706 | 2200 | 0.0001 | - | | 6.6176 | 2250 | 0.0002 | - | | 6.7647 | 2300 | 0.0002 | - | | 6.9118 | 2350 | 0.0002 | - | | 7.0588 | 2400 | 0.0002 | - | | 7.2059 | 2450 | 0.0002 | - | | 7.3529 | 2500 | 0.0001 | - | | 7.5 | 2550 | 0.0001 | - | | 7.6471 | 2600 | 0.0002 | - | | 7.7941 | 2650 | 0.0002 | - | | 7.9412 | 2700 | 0.0002 | - | | 8.0882 | 2750 | 0.0001 | - | | 8.2353 | 2800 | 0.0001 | - | | 8.3824 | 2850 | 0.0002 | - | | 8.5294 | 2900 | 0.0002 | - | | 8.6765 | 2950 | 0.0001 | - | | 8.8235 | 3000 | 0.0003 | - | | 8.9706 | 3050 | 0.0003 | - | | 9.1176 | 3100 | 0.0002 | - | | 9.2647 | 3150 | 0.0002 | - | | 9.4118 | 3200 | 0.0 | - | | 9.5588 | 3250 | 0.0003 | - | | 9.7059 | 3300 | 0.0003 | - | | 9.8529 | 3350 | 0.0001 | - | | 10.0 | 3400 | 0.0001 | - | | 10.1471 | 3450 | 0.0002 | - | | 10.2941 | 3500 | 0.0001 | - | | 10.4412 | 3550 | 0.0002 | - | | 10.5882 | 3600 | 0.0001 | - | | 10.7353 | 3650 | 0.0001 | - | | 10.8824 | 3700 | 0.0002 | - | | 11.0294 | 3750 | 0.0001 | - | | 11.1765 | 3800 | 0.0001 | - | | 11.3235 | 3850 | 0.0002 | - | | 11.4706 | 3900 | 0.0003 | - | | 11.6176 | 3950 | 0.0001 | - | | 11.7647 | 4000 | 0.0002 | - | | 11.9118 | 4050 | 0.0001 | - | | 12.0588 | 4100 | 0.0001 | - | | 12.2059 | 4150 | 0.0002 | - | | 12.3529 | 4200 | 0.0001 | - | | 12.5 | 4250 | 0.0001 | - | | 12.6471 | 4300 | 0.0002 | - | | 12.7941 | 4350 | 0.0003 | - | | 12.9412 | 4400 | 0.0006 | - | | 13.0882 | 4450 | 0.0018 | - | | 13.2353 | 4500 | 0.0011 | - | | 13.3824 | 4550 | 0.0008 | - | | 13.5294 | 4600 | 0.0011 | - | | 13.6765 | 4650 | 0.001 | - | | 13.8235 | 4700 | 0.0003 | - | | 13.9706 | 4750 | 0.0001 | - | | 14.1176 | 4800 | 0.0001 | - | | 14.2647 | 4850 | 0.0001 | - | | 14.4118 | 4900 | 0.0001 | - | | 14.5588 | 4950 | 0.0002 | - | | 14.7059 | 5000 | 0.0002 | - | | 14.8529 | 5050 | 0.0 | - | | 15.0 | 5100 | 0.0 | - | | 15.1471 | 5150 | 0.0 | - | | 15.2941 | 5200 | 0.0 | - | | 15.4412 | 5250 | 0.0 | - | | 15.5882 | 5300 | 0.0 | - | | 15.7353 | 5350 | 0.0 | - | | 15.8824 | 5400 | 0.0 | - | | 16.0294 | 5450 | 0.0 | - | | 16.1765 | 5500 | 0.0 | - | | 16.3235 | 5550 | 0.0 | - | | 16.4706 | 5600 | 0.0 | - | | 16.6176 | 5650 | 0.0 | - | | 16.7647 | 5700 | 0.0 | - | | 16.9118 | 5750 | 0.0 | - | | 17.0588 | 5800 | 0.0 | - | | 17.2059 | 5850 | 0.0 | - | | 17.3529 | 5900 | 0.0 | - | | 17.5 | 5950 | 0.0 | - | | 17.6471 | 6000 | 0.0 | - | | 17.7941 | 6050 | 0.0 | - | | 17.9412 | 6100 | 0.0 | - | | 18.0882 | 6150 | 0.0 | - | | 18.2353 | 6200 | 0.0 | - | | 18.3824 | 6250 | 0.0 | - | | 18.5294 | 6300 | 0.0 | - | | 18.6765 | 6350 | 0.0 | - | | 18.8235 | 6400 | 0.0 | - | | 18.9706 | 6450 | 0.0 | - | | 19.1176 | 6500 | 0.0 | - | | 19.2647 | 6550 | 0.0 | - | | 19.4118 | 6600 | 0.0 | - | | 19.5588 | 6650 | 0.0 | - | | 19.7059 | 6700 | 0.0 | - | | 19.8529 | 6750 | 0.0 | - | | 20.0 | 6800 | 0.0 | - | | 20.1471 | 6850 | 0.0 | - | | 20.2941 | 6900 | 0.0 | - | | 20.4412 | 6950 | 0.0 | - | | 20.5882 | 7000 | 0.0 | - | | 20.7353 | 7050 | 0.0 | - | | 20.8824 | 7100 | 0.0 | - | | 21.0294 | 7150 | 0.0 | - | | 21.1765 | 7200 | 0.0 | - | | 21.3235 | 7250 | 0.0 | - | | 21.4706 | 7300 | 0.0 | - | | 21.6176 | 7350 | 0.0 | - | | 21.7647 | 7400 | 0.0 | - | | 21.9118 | 7450 | 0.0 | - | | 22.0588 | 7500 | 0.0 | - | | 22.2059 | 7550 | 0.0 | - | | 22.3529 | 7600 | 0.0 | - | | 22.5 | 7650 | 0.0 | - | | 22.6471 | 7700 | 0.0 | - | | 22.7941 | 7750 | 0.0 | - | | 22.9412 | 7800 | 0.0 | - | | 23.0882 | 7850 | 0.0 | - | | 23.2353 | 7900 | 0.0 | - | | 23.3824 | 7950 | 0.0 | - | | 23.5294 | 8000 | 0.0 | - | | 23.6765 | 8050 | 0.0 | - | | 23.8235 | 8100 | 0.0 | - | | 23.9706 | 8150 | 0.0 | - | | 24.1176 | 8200 | 0.0 | - | | 24.2647 | 8250 | 0.0 | - | | 24.4118 | 8300 | 0.0 | - | | 24.5588 | 8350 | 0.0 | - | | 24.7059 | 8400 | 0.0 | - | | 24.8529 | 8450 | 0.0 | - | | 25.0 | 8500 | 0.0 | - | | 25.1471 | 8550 | 0.0 | - | | 25.2941 | 8600 | 0.0 | - | | 25.4412 | 8650 | 0.0 | - | | 25.5882 | 8700 | 0.0 | - | | 25.7353 | 8750 | 0.0 | - | | 25.8824 | 8800 | 0.0 | - | | 26.0294 | 8850 | 0.0 | - | | 26.1765 | 8900 | 0.0 | - | | 26.3235 | 8950 | 0.0 | - | | 26.4706 | 9000 | 0.0 | - | | 26.6176 | 9050 | 0.0 | - | | 26.7647 | 9100 | 0.0 | - | | 26.9118 | 9150 | 0.0 | - | | 27.0588 | 9200 | 0.0 | - | | 27.2059 | 9250 | 0.0 | - | | 27.3529 | 9300 | 0.0 | - | | 27.5 | 9350 | 0.0 | - | | 27.6471 | 9400 | 0.0 | - | | 27.7941 | 9450 | 0.0 | - | | 27.9412 | 9500 | 0.0 | - | | 28.0882 | 9550 | 0.0 | - | | 28.2353 | 9600 | 0.0 | - | | 28.3824 | 9650 | 0.0 | - | | 28.5294 | 9700 | 0.0 | - | | 28.6765 | 9750 | 0.0 | - | | 28.8235 | 9800 | 0.0 | - | | 28.9706 | 9850 | 0.0 | - | | 29.1176 | 9900 | 0.0 | - | | 29.2647 | 9950 | 0.0 | - | | 29.4118 | 10000 | 0.0 | - | | 29.5588 | 10050 | 0.0 | - | | 29.7059 | 10100 | 0.0 | - | | 29.8529 | 10150 | 0.0 | - | | 30.0 | 10200 | 0.0 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.1.0 - Sentence Transformers: 3.3.1 - Transformers: 4.44.2 - PyTorch: 2.2.0a0+81ea7a4 - Datasets: 3.2.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
{"base_model": "mini1013/master_domain", "library_name": "setfit", "metrics": ["accuracy"], "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification", "generated_from_setfit_trainer"], "widget": [{"text": "아가방 가을 골지 레깅스 아기 유아 바지 남아 여아 속바지 신생 쫄바지 베이비 키즈 아가방 레깅스/쫄바지_01 치치골지레깅스 그린_80 출산/육아 > 유아동의류 > 레깅스"}, {"text": "라고 세일러맨투맨 23겨울 아동복 아동 키즈 주니어 여아 JS_옐로 출산/육아 > 유아동의류 > 티셔츠"}, {"text": "여아 드레스 원피스 겨울왕국2 캐주얼 안나 공주 원픽4 샴페인_120 출산/육아 > 유아동의류 > 공주드레스"}, {"text": "[뉴발란스키즈]뉴키모 보이 다운(NK9PD4105U)100~160Size Black/110 출산/육아 > 유아동의류 > 점퍼"}, {"text": "데일리베베 겨울 뽀글이점퍼 유아집업 아기집업 주니어 토끼_JM 출산/육아 > 유아동의류 > 점퍼"}], "inference": true, "model-index": [{"name": "SetFit with mini1013/master_domain", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "Unknown", "type": "unknown", "split": "test"}, "metrics": [{"type": "accuracy", "value": 1.0, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,480
jtatman/paraphrase-minilm-l6-psychology
jtatman
sentence-similarity
[ "sentence-transformers", "safetensors", "bert", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:2402", "loss:TripletLoss", "arxiv:1908.10084", "arxiv:1703.07737", "base_model:sentence-transformers/paraphrase-MiniLM-L6-v2", "base_model:finetune:sentence-transformers/paraphrase-MiniLM-L6-v2", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2025-02-22T02:01:01Z
2025-02-22T02:01:40+00:00
10
0
--- base_model: sentence-transformers/paraphrase-MiniLM-L6-v2 library_name: sentence-transformers pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:2402 - loss:TripletLoss widget: - source_sentence: ' Among the following, which is not a predictor of good response to ECT in patients with schizophrenia?' sentences: - ( - A. Recent onset B. Shorter duration of illnessn C. Mood incongruent delusionsn D. Presence of affective symptoms - A - source_sentence: ' Who first described autism?' sentences: - A. Kanner B. Asperger C. Chess D. Benhamn E. None of the above - ( - A - source_sentence: ' Disorientation to place is seen in' sentences: - A - A - A. Severe anxiety B. Wernickes encephalopathyn C. Korsakoffs psychosis D. Acute manic episoden E. Depression - source_sentence: ' Which of the following most accurately describes the pathologic process in multiple sclerosis?' sentences: - A - A. Inflammatory B. Infectious C. Degenerativen D. Demyelinating E. Metabolic - A - source_sentence: What term would a behaviorist use for an external event or object that elicits a behavior in an organism? sentences: - ( - A - (A)Punishment (B)Reward (C)Instinct (D)Responsen (E)Reinforcement --- # SentenceTransformer based on sentence-transformers/paraphrase-MiniLM-L6-v2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-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:** [sentence-transformers/paraphrase-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2) <!-- at revision 9a27583f9c2cc7c03a95c08c5f087318109e2613 --> - **Maximum Sequence Length:** 128 tokens - **Output Dimensionality:** 384 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': 128, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("jtatman/paraphrase-minilm-l6-psychology") # Run inference sentences = [ 'What term would a behaviorist use for an external event or object that elicits a behavior in an organism?', '(', '(A)Punishment (B)Reward (C)Instinct (D)Responsen (E)Reinforcement', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 384] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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 ### Training Dataset #### Unnamed Dataset * Size: 2,402 training samples * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code> * Approximate statistics based on the first 1000 samples: | | sentence_0 | sentence_1 | sentence_2 | |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | type | string | string | string | | details | <ul><li>min: 5 tokens</li><li>mean: 33.04 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 32.74 tokens</li><li>max: 128 tokens</li></ul> | * Samples: | sentence_0 | sentence_1 | sentence_2 | |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code> Which of the following disorders is associated with increased risk of mood disorders and suicide?</code> | <code>A</code> | <code>A. Multiple sclerosis B. Huntingtons disease C. Epilepsyn D. Brain injury E. All of the above</code> | | <code> A 68-year-old man is admitted to an acute psychiatric unit for severe suicidal ideation. He is very much preoccupied with death and refuses to agree to a contract for safety. The diagnostician determines the patient to be severely depressed because of noncompliance with medication and severe social stressors. The patient refuses to take any medication because, he says, Nothing will change, anyway. He also stops eating and drinking and becomes increasingly dehydrated. A reasonable choice of treatment in this patient would be to</code> | <code>A</code> | <code>A. Persuade the patient to take antidepressants B. Wait and watch for the patient to change his mind C. Restrain the patient and administer intravenous fluids D. Prescribe electroconvulsive therapy E. Prescribe intensive psychotherapy 41. A 48-year-old man with treatment-resistant schizophrenia has been relatively stable for the past 6 months on clozapine. On a routine follow-up visitn the patient is observed to be depressed and reports lack of appetite and insomnian among other features of depression. The attending psychiatrist decides to treat the patient with antidepressants. Which of the following antidepressants would mandate particular caution in this patient?n A. Mirtazapine B. Fluoxetine C. Sertralinen D. Citalopram E. Trazodone</code> | | <code>Which of the following is the best definition of a response?</code> | <code>(</code> | <code>(A)A cognitive interpretation or a memory of an eventn (B)An external event or object that elicits a behavior in an organismn (C)A long-term change in behavior caused by past experiencesn (D)External energy or chemicals that are changed into neural impulsesn (E)A physical reaction or behavior elicited by an external event or object</code> | * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters: ```json { "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `num_train_epochs`: 15 - `fp16`: True - `multi_dataset_batch_sampler`: round_robin #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: no - `prediction_loss_only`: True - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 5e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1 - `num_train_epochs`: 15 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.0 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: None - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `include_for_metrics`: [] - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `use_liger_kernel`: False - `eval_use_gather_object`: False - `average_tokens_across_devices`: False - `prompts`: None - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: round_robin </details> ### Training Logs | Epoch | Step | Training Loss | |:-------:|:----:|:-------------:| | 6.5789 | 500 | 5.4568 | | 13.1579 | 1000 | 0.4965 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.4.1 - Transformers: 4.49.0 - PyTorch: 2.6.0+cu124 - Accelerate: 1.4.0 - Datasets: 3.3.1 - Tokenizers: 0.21.0 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### TripletLoss ```bibtex @misc{hermans2017defense, title={In Defense of the Triplet Loss for Person Re-Identification}, author={Alexander Hermans and Lucas Beyer and Bastian Leibe}, year={2017}, eprint={1703.07737}, archivePrefix={arXiv}, primaryClass={cs.CV} } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SentenceTransformer based on sentence-transformers/paraphrase-MiniLM-L6-v2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-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:** [sentence-transformers/paraphrase-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2) <!-- at revision 9a27583f9c2cc7c03a95c08c5f087318109e2613 --> - **Maximum Sequence Length:** 128 tokens - **Output Dimensionality:** 384 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': 128, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("jtatman/paraphrase-minilm-l6-psychology") # Run inference sentences = [ 'What term would a behaviorist use for an external event or object that elicits a behavior in an organism?', '(', '(A)Punishment (B)Reward (C)Instinct (D)Responsen (E)Reinforcement', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 384] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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 ### Training Dataset #### Unnamed Dataset * Size: 2,402 training samples * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code> * Approximate statistics based on the first 1000 samples: | | sentence_0 | sentence_1 | sentence_2 | |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | type | string | string | string | | details | <ul><li>min: 5 tokens</li><li>mean: 33.04 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 32.74 tokens</li><li>max: 128 tokens</li></ul> | * Samples: | sentence_0 | sentence_1 | sentence_2 | |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code> Which of the following disorders is associated with increased risk of mood disorders and suicide?</code> | <code>A</code> | <code>A. Multiple sclerosis B. Huntingtons disease C. Epilepsyn D. Brain injury E. All of the above</code> | | <code> A 68-year-old man is admitted to an acute psychiatric unit for severe suicidal ideation. He is very much preoccupied with death and refuses to agree to a contract for safety. The diagnostician determines the patient to be severely depressed because of noncompliance with medication and severe social stressors. The patient refuses to take any medication because, he says, Nothing will change, anyway. He also stops eating and drinking and becomes increasingly dehydrated. A reasonable choice of treatment in this patient would be to</code> | <code>A</code> | <code>A. Persuade the patient to take antidepressants B. Wait and watch for the patient to change his mind C. Restrain the patient and administer intravenous fluids D. Prescribe electroconvulsive therapy E. Prescribe intensive psychotherapy 41. A 48-year-old man with treatment-resistant schizophrenia has been relatively stable for the past 6 months on clozapine. On a routine follow-up visitn the patient is observed to be depressed and reports lack of appetite and insomnian among other features of depression. The attending psychiatrist decides to treat the patient with antidepressants. Which of the following antidepressants would mandate particular caution in this patient?n A. Mirtazapine B. Fluoxetine C. Sertralinen D. Citalopram E. Trazodone</code> | | <code>Which of the following is the best definition of a response?</code> | <code>(</code> | <code>(A)A cognitive interpretation or a memory of an eventn (B)An external event or object that elicits a behavior in an organismn (C)A long-term change in behavior caused by past experiencesn (D)External energy or chemicals that are changed into neural impulsesn (E)A physical reaction or behavior elicited by an external event or object</code> | * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters: ```json { "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `num_train_epochs`: 15 - `fp16`: True - `multi_dataset_batch_sampler`: round_robin #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: no - `prediction_loss_only`: True - `per_device_train_batch_size`: 32 - `per_device_eval_batch_size`: 32 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 5e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1 - `num_train_epochs`: 15 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.0 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: None - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `include_for_metrics`: [] - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `use_liger_kernel`: False - `eval_use_gather_object`: False - `average_tokens_across_devices`: False - `prompts`: None - `batch_sampler`: batch_sampler - `multi_dataset_batch_sampler`: round_robin </details> ### Training Logs | Epoch | Step | Training Loss | |:-------:|:----:|:-------------:| | 6.5789 | 500 | 5.4568 | | 13.1579 | 1000 | 0.4965 | ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 3.4.1 - Transformers: 4.49.0 - PyTorch: 2.6.0+cu124 - Accelerate: 1.4.0 - Datasets: 3.3.1 - Tokenizers: 0.21.0 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### TripletLoss ```bibtex @misc{hermans2017defense, title={In Defense of the Triplet Loss for Person Re-Identification}, author={Alexander Hermans and Lucas Beyer and Bastian Leibe}, year={2017}, eprint={1703.07737}, archivePrefix={arXiv}, primaryClass={cs.CV} } ``` <!-- ## 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.* -->
{"base_model": "sentence-transformers/paraphrase-MiniLM-L6-v2", "library_name": "sentence-transformers", "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:2402", "loss:TripletLoss"], "widget": [{"source_sentence": " Among the following, which is not a predictor of good response to ECT in patients with schizophrenia?", "sentences": ["(", "A. Recent onset B. Shorter duration of illnessn C. Mood incongruent delusionsn D. Presence of affective symptoms", "A"]}, {"source_sentence": " Who first described autism?", "sentences": ["A. Kanner B. Asperger C. Chess D. Benhamn E. None of the above", "(", "A"]}, {"source_sentence": " Disorientation to place is seen in", "sentences": ["A", "A", "A. Severe anxiety B. Wernickes encephalopathyn C. Korsakoffs psychosis D. Acute manic episoden E. Depression"]}, {"source_sentence": " Which of the following most accurately describes the pathologic process in multiple sclerosis?", "sentences": ["A", "A. Inflammatory B. Infectious C. Degenerativen D. Demyelinating E. Metabolic", "A"]}, {"source_sentence": "What term would a behaviorist use for an external event or object that elicits a behavior in an organism?", "sentences": ["(", "A", "(A)Punishment (B)Reward (C)Instinct (D)Responsen (E)Reinforcement"]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,481
leo009/paligemma-3b-mix-224
leo009
image-text-to-text
[ "transformers", "safetensors", "paligemma", "image-text-to-text", "arxiv:2310.09199", "arxiv:2303.15343", "arxiv:2403.08295", "arxiv:1706.03762", "arxiv:2010.11929", "arxiv:2209.06794", "arxiv:2209.04372", "arxiv:2103.01913", "arxiv:2205.12522", "arxiv:2110.11624", "arxiv:2108.03353", "arxiv:2010.04295", "arxiv:2401.06209", "arxiv:2305.10355", "arxiv:2203.10244", "arxiv:1810.12440", "arxiv:1905.13648", "arxiv:1608.00272", "arxiv:1908.04913", "license:gemma", "text-generation-inference", "endpoints_compatible", "region:us" ]
2024-05-17T08:33:32Z
2024-05-17T08:37:25+00:00
293
1
--- library_name: transformers license: gemma pipeline_tag: image-text-to-text extra_gated_heading: Access PaliGemma on Hugging Face extra_gated_prompt: To access PaliGemma on Hugging Face, you’re required to review and agree to Google’s usage license. To do this, please ensure you’re logged-in to Hugging Face and click below. Requests are processed immediately. extra_gated_button_content: Acknowledge license --- # PaliGemma model card **Model page:** [PaliGemma](https://ai.google.dev/gemma/docs/paligemma) Transformers PaliGemma 3B weights, fine-tuned with 224*224 input images and 256 token input/output text sequences on a mixture of downstream academic datasets. The models are available in float32, bfloat16 and float16 format for research purposes only. **Resources and technical documentation:** * [Responsible Generative AI Toolkit](https://ai.google.dev/responsible) * [PaliGemma on Kaggle](https://www.kaggle.com/models/google/paligemma) * [PaliGemma on Vertex Model Garden](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/363) **Terms of Use:** [Terms](https://ai.google.dev/gemma/terms) **Authors:** Google ## Model information ### Model summary #### Description PaliGemma is a versatile and lightweight vision-language model (VLM) inspired by [PaLI-3](https://arxiv.org/abs/2310.09199) and based on open components such as the [SigLIP vision model](https://arxiv.org/abs/2303.15343) and the [Gemma language model](https://arxiv.org/abs/2403.08295). It takes both image and text as input and generates text as output, supporting multiple languages. It is designed for class-leading fine-tune performance on a wide range of vision-language tasks such as image and short video caption, visual question answering, text reading, object detection and object segmentation. #### Model architecture PaliGemma is the composition of a [Transformer decoder](https://arxiv.org/abs/1706.03762) and a [Vision Transformer image encoder](https://arxiv.org/abs/2010.11929), with a total of 3 billion params. The text decoder is initialized from [Gemma-2B](https://www.kaggle.com/models/google/gemma). The image encoder is initialized from [SigLIP-So400m/14](https://colab.research.google.com/github/google-research/big_vision/blob/main/big_vision/configs/proj/image_text/SigLIP_demo.ipynb). PaliGemma is trained following the PaLI-3 recipes. #### Inputs and outputs * **Input:** Image and text string, such as a prompt to caption the image, or a question. * **Output:** Generated text in response to the input, such as a caption of the image, an answer to a question, a list of object bounding box coordinates, or segmentation codewords. ### Model data #### Pre-train datasets PaliGemma is pre-trained on the following mixture of datasets: * **WebLI:** [WebLI (Web Language Image)](https://arxiv.org/abs/2209.06794) is a web-scale multilingual image-text dataset built from the public web. A wide range of WebLI splits are used to acquire versatile model capabilities, such as visual semantic understanding, object localization, visually-situated text understanding, multilinguality, etc. * **CC3M-35L:** Curated English image-alt_text pairs from webpages ([Sharma et al., 2018](https://aclanthology.org/P18-1238/)). We used the [Google Cloud Translation API](https://cloud.google.com/translate) to translate into 34 additional languages. * **VQ²A-CC3M-35L/VQG-CC3M-35L:** A subset of VQ2A-CC3M ([Changpinyo et al., 2022a](https://aclanthology.org/2022.naacl-main.142/)), translated into the same additional 34 languages as CC3M-35L, using the [Google Cloud Translation API](https://cloud.google.com/translate). * **OpenImages:** Detection and object-aware questions and answers ([Piergiovanni et al. 2022](https://arxiv.org/abs/2209.04372)) generated by handcrafted rules on the [OpenImages dataset]. * **WIT:** Images and texts collected from Wikipedia ([Srinivasan et al., 2021](https://arxiv.org/abs/2103.01913)). [OpenImages dataset]: https://storage.googleapis.com/openimages/web/factsfigures_v7.html #### Data responsibility filtering The following filters are applied to WebLI, with the goal of training PaliGemma on clean data: * **Pornographic image filtering:** This filter removes images deemed to be of pornographic nature. * **Text safety filtering:** We identify and filter out images that are paired with unsafe text. Unsafe text is any text deemed to contain or be about CSAI, pornography, vulgarities, or otherwise offensive. * **Text toxicity filtering:** We further use the [Perspective API](https://perspectiveapi.com/) to identify and filter out images that are paired with text deemed insulting, obscene, hateful or otherwise toxic. * **Text personal information filtering:** We filtered certain personal information and other sensitive data using [Cloud Data Loss Prevention (DLP) API](https://cloud.google.com/security/products/dlp) to protect the privacy of individuals. Identifiers such as social security numbers and [other sensitive information types] were removed. * **Additional methods:** Filtering based on content quality and safety in line with our policies and practices. [other sensitive information types]: https://cloud.google.com/sensitive-data-protection/docs/high-sensitivity-infotypes-reference?_gl=1*jg604m*_ga*ODk5MzA3ODQyLjE3MTAzMzQ3NTk.*_ga_WH2QY8WWF5*MTcxMDUxNTkxMS4yLjEuMTcxMDUxNjA2NC4wLjAuMA..&_ga=2.172110058.-899307842.1710334759 ## How to Use PaliGemma is a single-turn vision language model not meant for conversational use, and it works best when fine-tuning to a specific use case. You can configure which task the model will solve by conditioning it with task prefixes, such as “detect” or “segment”. The pretrained models were trained in this fashion to imbue them with a rich set of capabilities (question answering, captioning, segmentation, etc.). However, they are not designed to be used directly, but to be transferred (by fine-tuning) to specific tasks using a similar prompt structure. For interactive testing, you can use the "mix" family of models, which have been fine-tuned on a mixture of tasks. Please, refer to the [usage and limitations section](#usage-and-limitations) for intended use cases, or visit the [blog post](https://huggingface.co/blog/paligemma-google-vlm) for additional details and examples. ## Use in Transformers The following snippets use model `google/paligemma-3b-mix-224` for reference purposes. The model in this repo you are now browsing may have been trained for other tasks, please make sure you use appropriate inputs for the task at hand. ### Running the default precision (`float32`) on CPU ```python from transformers import AutoProcessor, PaliGemmaForConditionalGeneration from PIL import Image import requests import torch model_id = "google/paligemma-3b-mix-224" url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true" image = Image.open(requests.get(url, stream=True).raw) model = PaliGemmaForConditionalGeneration.from_pretrained(model_id).eval() processor = AutoProcessor.from_pretrained(model_id) # Instruct the model to create a caption in Spanish prompt = "caption es" model_inputs = processor(text=prompt, images=image, return_tensors="pt") input_len = model_inputs["input_ids"].shape[-1] with torch.inference_mode(): generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False) generation = generation[0][input_len:] decoded = processor.decode(generation, skip_special_tokens=True) print(decoded) ``` Output: `Un auto azul estacionado frente a un edificio.` ### Running other precisions on CUDA For convenience, the repos contain revisions of the weights already converted to `bfloat16` and `float16`, so you can use them to reduce the download size and avoid casting on your local computer. This is how you'd run `bfloat16` on an nvidia CUDA card. ```python from transformers import AutoProcessor, PaliGemmaForConditionalGeneration from PIL import Image import requests import torch model_id = "google/paligemma-3b-mix-224" device = "cuda:0" dtype = torch.bfloat16 url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true" image = Image.open(requests.get(url, stream=True).raw) model = PaliGemmaForConditionalGeneration.from_pretrained( model_id, torch_dtype=dtype, device_map=device, revision="bfloat16", ).eval() processor = AutoProcessor.from_pretrained(model_id) # Instruct the model to create a caption in Spanish prompt = "caption es" model_inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device) input_len = model_inputs["input_ids"].shape[-1] with torch.inference_mode(): generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False) generation = generation[0][input_len:] decoded = processor.decode(generation, skip_special_tokens=True) print(decoded) ``` ### Loading in 4-bit / 8-bit You need to install `bitsandbytes` to automatically run inference using 8-bit or 4-bit precision: ``` pip install bitsandbytes accelerate ``` ``` from transformers import AutoProcessor, PaliGemmaForConditionalGeneration from PIL import Image import requests import torch model_id = "google/paligemma-3b-mix-224" device = "cuda:0" dtype = torch.bfloat16 url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true" image = Image.open(requests.get(url, stream=True).raw) quantization_config = BitsAndBytesConfig(load_in_8bit=True) model = PaliGemmaForConditionalGeneration.from_pretrained( model_id, quantization_config=quantization_config ).eval() processor = AutoProcessor.from_pretrained(model_id) # Instruct the model to create a caption in Spanish prompt = "caption es" model_inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device) input_len = model_inputs["input_ids"].shape[-1] with torch.inference_mode(): generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False) generation = generation[0][input_len:] decoded = processor.decode(generation, skip_special_tokens=True) print(decoded) ``` ## Implementation information ### Hardware PaliGemma was trained using the latest generation of Tensor Processing Unit (TPU) hardware (TPUv5e). ### Software Training was done using [JAX](https://github.com/google/jax), [Flax](https://github.com/google/flax), [TFDS](https://github.com/tensorflow/datasets) and [`big_vision`](https://github.com/google-research/big_vision). JAX allows researchers to take advantage of the latest generation of hardware, including TPUs, for faster and more efficient training of large models. TFDS is used to access datasets and Flax is used for model architecture. The PaliGemma fine-tune code and inference code are released in the `big_vision` GitHub repository. ## Evaluation information ### Benchmark results In order to verify the transferability of PaliGemma to a wide variety of academic tasks, we fine-tune the pretrained models on each task. Additionally we train the mix model with a mixture of the transfer tasks. We report results on different resolutions to provide an impression of which tasks benefit from increased resolution. Importantly, none of these tasks or datasets are part of the pretraining data mixture, and their images are explicitly removed from the web-scale pre-training data. #### Single task (fine-tune on single task) <table> <tbody><tr> <th>Benchmark<br>(train split)</th> <th>Metric<br>(split)</th> <th>pt-224</th> <th>pt-448</th> <th>pt-896</th> </tr> <tr> <th>Captioning</th> </tr> <tr> <td> <a href="https://cocodataset.org/#home">COCO captions</a><br>(train+restval) </td> <td>CIDEr (val)</td> <td>141.92</td> <td>144.60</td> </tr> <tr> <td> <a href="https://nocaps.org/">NoCaps</a><br>(Eval of COCO<br>captions transfer) </td> <td>CIDEr (val)</td> <td>121.72</td> <td>123.58</td> </tr> <tr> <td> <a href="https://arxiv.org/pdf/2205.12522">COCO-35L</a><br>(train) </td> <td>CIDEr dev<br>(en/avg-34/avg)</td> <td> 139.2<br> 115.8<br> 116.4 </td> <td> 141.2<br> 118.0<br> 118.6 </td> </tr> <tr> <td> <a href="https://arxiv.org/pdf/2205.12522">XM3600</a><br>(Eval of COCO-35L transfer) </td> <td>CIDEr dev<br>(en/avg-34/avg)</td> <td> 78.1<br> 41.3<br> 42.4 </td> <td> 80.0<br> 41.9<br> 42.9 </td> </tr> <tr> <td> <a href="https://textvqa.org/textcaps/">TextCaps</a><br>(train) </td> <td>CIDEr (val)</td> <td>127.48</td> <td>153.94</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2110.11624">SciCap</a><br>(first sentence, no subfigure)<br>(train+val) </td> <td>CIDEr/BLEU-4<br>(test)</td> <td> 162.25<br> 0.192<br> </td> <td> 181.49<br> 0.211<br> </td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2108.03353">Screen2words</a><br>(train+dev) </td> <td>CIDEr (test)</td> <td>117.57</td> <td>119.59</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2010.04295">Widget Captioning</a><br>(train+dev) </td> <td>CIDEr (test)</td> <td>136.07</td> <td>148.36</td> </tr> <tr> <th>Question answering</th> </tr> <tr> <td> <a href="https://visualqa.org/index.html">VQAv2</a><br>(train+validation) </td> <td>Accuracy<br>(Test server - std)</td> <td>83.19</td> <td>85.64</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2401.06209">MMVP</a><br>(Eval of VQAv2 transfer) </td> <td>Paired Accuracy</td> <td>47.33</td> <td>45.33</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2305.10355">POPE</a><br>(Eval of VQAv2 transfer) </td> <td>Accuracy<br>(random/popular/<br>adversarial)</td> <td> 87.80<br> 85.87<br> 84.27 </td> <td> 88.23<br> 86.77<br> 85.90 </td> </tr> <tr> <td> <a href="https://okvqa.allenai.org/">OKVQA</a><br>(train) </td> <td>Accuracy (val)</td> <td>63.54</td> <td>63.15</td> </tr> <tr> <td> <a href="https://allenai.org/project/a-okvqa/home">A-OKVQA</a> (MC)<br>(train+val) </td> <td>Accuracy<br>(Test server)</td> <td>76.37</td> <td>76.90</td> </tr> <tr> <td> <a href="https://allenai.org/project/a-okvqa/home">A-OKVQA</a> (DA)<br>(train+val) </td> <td>Accuracy<br>(Test server)</td> <td>61.85</td> <td>63.22</td> </tr> <tr> <td> <a href="https://cs.stanford.edu/people/dorarad/gqa/about.html">GQA</a><br>(train_balanced+<br>val_balanced) </td> <td>Accuracy<br>(testdev balanced)</td> <td>65.61</td> <td>67.03</td> </tr> <tr> <td> <a href="https://aclanthology.org/2022.findings-acl.196/">xGQA</a><br>(Eval of GQA transfer) </td> <td>Mean Accuracy<br>(bn, de, en, id,<br>ko, pt, ru, zh)</td> <td>58.37</td> <td>59.07</td> </tr> <tr> <td> <a href="https://lil.nlp.cornell.edu/nlvr/">NLVR2</a><br>(train+dev) </td> <td>Accuracy (test)</td> <td>90.02</td> <td>88.93</td> </tr> <tr> <td> <a href="https://marvl-challenge.github.io/">MaRVL</a><br>(Eval of NLVR2 transfer) </td> <td>Mean Accuracy<br>(test)<br>(id, sw, ta, tr, zh)</td> <td>80.57</td> <td>76.78</td> </tr> <tr> <td> <a href="https://allenai.org/data/diagrams">AI2D</a><br>(train) </td> <td>Accuracy (test)</td> <td>72.12</td> <td>73.28</td> </tr> <tr> <td> <a href="https://scienceqa.github.io/">ScienceQA</a><br>(Img subset, no CoT)<br>(train+val) </td> <td>Accuracy (test)</td> <td>95.39</td> <td>95.93</td> </tr> <tr> <td> <a href="https://zenodo.org/records/6344334">RSVQA-LR</a> (Non numeric)<br>(train+val) </td> <td>Mean Accuracy<br>(test)</td> <td>92.65</td> <td>93.11</td> </tr> <tr> <td> <a href="https://zenodo.org/records/6344367">RSVQA-HR</a> (Non numeric)<br>(train+val) </td> <td>Mean Accuracy<br>(test/test2)</td> <td> 92.61<br> 90.58 </td> <td> 92.79<br> 90.54 </td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2203.10244">ChartQA</a><br>(human+aug)x(train+val) </td> <td>Mean Relaxed<br>Accuracy<br>(test_human,<br>test_aug)</td> <td>57.08</td> <td>71.36</td> </tr> <tr> <td> <a href="https://vizwiz.org/tasks-and-datasets/vqa/">VizWiz VQA</a><br>(train+val) </td> <td>Accuracy<br>(Test server - std)</td> <td> 73.7 </td> <td> 75.52 </td> </tr> <tr> <td> <a href="https://arxiv.org/abs/1810.12440">TallyQA</a><br>(train) </td> <td>Accuracy<br>(test_simple/<br>test_complex)</td> <td> 81.72<br> 69.56 </td> <td> 84.86<br> 72.27 </td> </tr> <tr> <td> <a href="https://ocr-vqa.github.io/">OCR-VQA</a><br>(train+val) </td> <td>Accuracy (test)</td> <td>72.32</td> <td>74.61</td> <td>74.93</td> </tr> <tr> <td> <a href="https://textvqa.org/">TextVQA</a><br>(train+val) </td> <td>Accuracy<br>(Test server - std)</td> <td>55.47</td> <td>73.15</td> <td>76.48</td> </tr> <tr> <td> <a href="https://www.docvqa.org/">DocVQA</a><br>(train+val) </td> <td>ANLS (Test server)</td> <td>43.74</td> <td>78.02</td> <td>84.77</td> </tr> <tr> <td> <a href="https://openaccess.thecvf.com/content/WACV2022/papers/Mathew_InfographicVQA_WACV_2022_paper.pdf">Infographic VQA</a><br>(train+val) </td> <td>ANLS (Test server)</td> <td>28.46</td> <td>40.47</td> <td>47.75</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/1905.13648">SceneText VQA</a><br>(train+val) </td> <td>ANLS (Test server)</td> <td>63.29</td> <td>81.82</td> <td>84.40</td> </tr> <tr> <th>Segmentation</th> </tr> <tr> <td> <a href="https://arxiv.org/abs/1608.00272">RefCOCO</a><br>(combined refcoco, refcoco+,<br>refcocog excluding val<br>and test images) </td> <td>MIoU<br>(validation)<br>refcoco/refcoco+/<br>refcocog</td> <td> 73.40<br> 68.32<br> 67.65 </td> <td> 75.57<br> 69.76<br> 70.17 </td> <td> 76.94<br> 72.18<br> 72.22 </td> </tr> <tr> <th>Video tasks (Caption/QA)</th> </tr> <tr> <td>MSR-VTT (Captioning)</td> <td>CIDEr (test)</td> <td>70.54</td> </tr> <tr> <td>MSR-VTT (QA)</td> <td>Accuracy (test)</td> <td>50.09</td> </tr> <tr> <td>ActivityNet (Captioning)</td> <td>CIDEr (test)</td> <td>34.62</td> </tr> <tr> <td>ActivityNet (QA)</td> <td>Accuracy (test)</td> <td>50.78</td> </tr> <tr> <td>VATEX (Captioning)</td> <td>CIDEr (test)</td> <td>79.73</td> </tr> <tr> <td>MSVD (QA)</td> <td>Accuracy (test)</td> <td>60.22</td> </tr> </tbody></table> #### Mix model (fine-tune on mixture of transfer tasks) <table> <tbody><tr> <th>Benchmark</th> <th>Metric (split)</th> <th>mix-224</th> <th>mix-448</th> </tr> <tr> <td><a href="https://arxiv.org/abs/2401.06209">MMVP</a></td> <td>Paired Accuracy</td> <td>46.00</td> <td>45.33</td> </tr> <tr> <td><a href="https://arxiv.org/abs/2305.10355">POPE</a></td> <td>Accuracy<br>(random/popular/adversarial)</td> <td> 88.00<br> 86.63<br> 85.67 </td> <td> 89.37<br> 88.40<br> 87.47 </td> </tr> </tbody></table> ## Ethics and safety ### Evaluation approach Our evaluation methods include structured evaluations and internal red-teaming testing of relevant content policies. Red-teaming was conducted by a number of different teams, each with different goals and human evaluation metrics. These models were evaluated against a number of different categories relevant to ethics and safety, including: * Human evaluation on prompts covering child safety, content safety and representational harms. See the [Gemma model card](https://ai.google.dev/gemma/docs/model_card#evaluation_approach) for more details on evaluation approach, but with image captioning and visual question answering setups. * Image-to-Text benchmark evaluation: Benchmark against relevant academic datasets such as FairFace Dataset ([Karkkainen et al., 2021](https://arxiv.org/abs/1908.04913)). ### Evaluation results * The human evaluation results of ethics and safety evaluations are within acceptable thresholds for meeting [internal policies](https://storage.googleapis.com/gweb-uniblog-publish-prod/documents/2023_Google_AI_Principles_Progress_Update.pdf#page=11) for categories such as child safety, content safety and representational harms. * On top of robust internal evaluations, we also use the Perspective API (threshold of 0.8) to measure toxicity, profanity, and other potential issues in the generated captions for images sourced from the FairFace dataset. We report the maximum and median values observed across subgroups for each of the perceived gender, ethnicity, and age attributes. <table> <tbody><tr> </tr></tbody><tbody><tr><th>Metric</th> <th>Perceived<br>gender</th> <th></th> <th>Ethnicity</th> <th></th> <th>Age group</th> <th></th> </tr> <tr> <th></th> <th>Maximum</th> <th>Median</th> <th>Maximum</th> <th>Median</th> <th>Maximum</th> <th>Median</th> </tr> <tr> <td>Toxicity</td> <td>0.04%</td> <td>0.03%</td> <td>0.08%</td> <td>0.00%</td> <td>0.09%</td> <td>0.00%</td> </tr> <tr> <td>Identity Attack</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> </tr> <tr> <td>Insult</td> <td>0.06%</td> <td>0.04%</td> <td>0.09%</td> <td>0.07%</td> <td>0.16%</td> <td>0.00%</td> </tr> <tr> <td>Threat</td> <td>0.06%</td> <td>0.05%</td> <td>0.14%</td> <td>0.05%</td> <td>0.17%</td> <td>0.00%</td> </tr> <tr> <td>Profanity</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> </tr> </tbody></table> ## Usage and limitations ### Intended usage Open Vision Language Models (VLMs) have a wide range of applications across various industries and domains. The following list of potential uses is not comprehensive. The purpose of this list is to provide contextual information about the possible use-cases that the model creators considered as part of model training and development. Fine-tune on specific vision-language task: * The pre-trained models can be fine-tuned on a wide range of vision-language tasks such as: image captioning, short video caption, visual question answering, text reading, object detection and object segmentation. * The pre-trained models can be fine-tuned for specific domains such as remote sensing question answering, visual questions from people who are blind, science question answering, describe UI element functionalities. * The pre-trained models can be fine-tuned for tasks with non-textual outputs such as bounding boxes or segmentation masks. Vision-language research: * The pre-trained models and fine-tuned models can serve as a foundation for researchers to experiment with VLM techniques, develop algorithms, and contribute to the advancement of the field. ### Ethical considerations and risks The development of vision-language models (VLMs) raises several ethical concerns. In creating an open model, we have carefully considered the following: * Bias and Fairness * VLMs trained on large-scale, real-world image-text data can reflect socio-cultural biases embedded in the training material. These models underwent careful scrutiny, input data pre-processing described and posterior evaluations reported in this card. * Misinformation and Misuse * VLMs can be misused to generate text that is false, misleading, or harmful. * Guidelines are provided for responsible use with the model, see the [Responsible Generative AI Toolkit](https://ai.google.dev/responsible). * Transparency and Accountability * This model card summarizes details on the models' architecture, capabilities, limitations, and evaluation processes. * A responsibly developed open model offers the opportunity to share innovation by making VLM technology accessible to developers and researchers across the AI ecosystem. Risks identified and mitigations: * **Perpetuation of biases:** It's encouraged to perform continuous monitoring (using evaluation metrics, human review) and the exploration of de-biasing techniques during model training, fine-tuning, and other use cases. * **Generation of harmful content:** Mechanisms and guidelines for content safety are essential. Developers are encouraged to exercise caution and implement appropriate content safety safeguards based on their specific product policies and application use cases. * **Misuse for malicious purposes:** Technical limitations and developer and end-user education can help mitigate against malicious applications of LLMs. Educational resources and reporting mechanisms for users to flag misuse are provided. Prohibited uses of Gemma models are outlined in the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy). * **Privacy violations:** Models were trained on data filtered to remove certain personal information and sensitive data. Developers are encouraged to adhere to privacy regulations with privacy-preserving techniques. ### Limitations * Most limitations inherited from the underlying Gemma model still apply: * VLMs are better at tasks that can be framed with clear prompts and instructions. Open-ended or highly complex tasks might be challenging. * Natural language is inherently complex. VLMs might struggle to grasp subtle nuances, sarcasm, or figurative language. * VLMs generate responses based on information they learned from their training datasets, but they are not knowledge bases. They may generate incorrect or outdated factual statements. * VLMs rely on statistical patterns in language and images. They might lack the ability to apply common sense reasoning in certain situations. * PaliGemma was designed first and foremost to serve as a general pre-trained model for transfer to specialized tasks. Hence, its "out of the box" or "zero-shot" performance might lag behind models designed specifically for that. * PaliGemma is not a multi-turn chatbot. It is designed for a single round of image and text input.
null
Non_BioNLP
# PaliGemma model card **Model page:** [PaliGemma](https://ai.google.dev/gemma/docs/paligemma) Transformers PaliGemma 3B weights, fine-tuned with 224*224 input images and 256 token input/output text sequences on a mixture of downstream academic datasets. The models are available in float32, bfloat16 and float16 format for research purposes only. **Resources and technical documentation:** * [Responsible Generative AI Toolkit](https://ai.google.dev/responsible) * [PaliGemma on Kaggle](https://www.kaggle.com/models/google/paligemma) * [PaliGemma on Vertex Model Garden](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/363) **Terms of Use:** [Terms](https://ai.google.dev/gemma/terms) **Authors:** Google ## Model information ### Model summary #### Description PaliGemma is a versatile and lightweight vision-language model (VLM) inspired by [PaLI-3](https://arxiv.org/abs/2310.09199) and based on open components such as the [SigLIP vision model](https://arxiv.org/abs/2303.15343) and the [Gemma language model](https://arxiv.org/abs/2403.08295). It takes both image and text as input and generates text as output, supporting multiple languages. It is designed for class-leading fine-tune performance on a wide range of vision-language tasks such as image and short video caption, visual question answering, text reading, object detection and object segmentation. #### Model architecture PaliGemma is the composition of a [Transformer decoder](https://arxiv.org/abs/1706.03762) and a [Vision Transformer image encoder](https://arxiv.org/abs/2010.11929), with a total of 3 billion params. The text decoder is initialized from [Gemma-2B](https://www.kaggle.com/models/google/gemma). The image encoder is initialized from [SigLIP-So400m/14](https://colab.research.google.com/github/google-research/big_vision/blob/main/big_vision/configs/proj/image_text/SigLIP_demo.ipynb). PaliGemma is trained following the PaLI-3 recipes. #### Inputs and outputs * **Input:** Image and text string, such as a prompt to caption the image, or a question. * **Output:** Generated text in response to the input, such as a caption of the image, an answer to a question, a list of object bounding box coordinates, or segmentation codewords. ### Model data #### Pre-train datasets PaliGemma is pre-trained on the following mixture of datasets: * **WebLI:** [WebLI (Web Language Image)](https://arxiv.org/abs/2209.06794) is a web-scale multilingual image-text dataset built from the public web. A wide range of WebLI splits are used to acquire versatile model capabilities, such as visual semantic understanding, object localization, visually-situated text understanding, multilinguality, etc. * **CC3M-35L:** Curated English image-alt_text pairs from webpages ([Sharma et al., 2018](https://aclanthology.org/P18-1238/)). We used the [Google Cloud Translation API](https://cloud.google.com/translate) to translate into 34 additional languages. * **VQ²A-CC3M-35L/VQG-CC3M-35L:** A subset of VQ2A-CC3M ([Changpinyo et al., 2022a](https://aclanthology.org/2022.naacl-main.142/)), translated into the same additional 34 languages as CC3M-35L, using the [Google Cloud Translation API](https://cloud.google.com/translate). * **OpenImages:** Detection and object-aware questions and answers ([Piergiovanni et al. 2022](https://arxiv.org/abs/2209.04372)) generated by handcrafted rules on the [OpenImages dataset]. * **WIT:** Images and texts collected from Wikipedia ([Srinivasan et al., 2021](https://arxiv.org/abs/2103.01913)). [OpenImages dataset]: https://storage.googleapis.com/openimages/web/factsfigures_v7.html #### Data responsibility filtering The following filters are applied to WebLI, with the goal of training PaliGemma on clean data: * **Pornographic image filtering:** This filter removes images deemed to be of pornographic nature. * **Text safety filtering:** We identify and filter out images that are paired with unsafe text. Unsafe text is any text deemed to contain or be about CSAI, pornography, vulgarities, or otherwise offensive. * **Text toxicity filtering:** We further use the [Perspective API](https://perspectiveapi.com/) to identify and filter out images that are paired with text deemed insulting, obscene, hateful or otherwise toxic. * **Text personal information filtering:** We filtered certain personal information and other sensitive data using [Cloud Data Loss Prevention (DLP) API](https://cloud.google.com/security/products/dlp) to protect the privacy of individuals. Identifiers such as social security numbers and [other sensitive information types] were removed. * **Additional methods:** Filtering based on content quality and safety in line with our policies and practices. [other sensitive information types]: https://cloud.google.com/sensitive-data-protection/docs/high-sensitivity-infotypes-reference?_gl=1*jg604m*_ga*ODk5MzA3ODQyLjE3MTAzMzQ3NTk.*_ga_WH2QY8WWF5*MTcxMDUxNTkxMS4yLjEuMTcxMDUxNjA2NC4wLjAuMA..&_ga=2.172110058.-899307842.1710334759 ## How to Use PaliGemma is a single-turn vision language model not meant for conversational use, and it works best when fine-tuning to a specific use case. You can configure which task the model will solve by conditioning it with task prefixes, such as “detect” or “segment”. The pretrained models were trained in this fashion to imbue them with a rich set of capabilities (question answering, captioning, segmentation, etc.). However, they are not designed to be used directly, but to be transferred (by fine-tuning) to specific tasks using a similar prompt structure. For interactive testing, you can use the "mix" family of models, which have been fine-tuned on a mixture of tasks. Please, refer to the [usage and limitations section](#usage-and-limitations) for intended use cases, or visit the [blog post](https://huggingface.co/blog/paligemma-google-vlm) for additional details and examples. ## Use in Transformers The following snippets use model `google/paligemma-3b-mix-224` for reference purposes. The model in this repo you are now browsing may have been trained for other tasks, please make sure you use appropriate inputs for the task at hand. ### Running the default precision (`float32`) on CPU ```python from transformers import AutoProcessor, PaliGemmaForConditionalGeneration from PIL import Image import requests import torch model_id = "google/paligemma-3b-mix-224" url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true" image = Image.open(requests.get(url, stream=True).raw) model = PaliGemmaForConditionalGeneration.from_pretrained(model_id).eval() processor = AutoProcessor.from_pretrained(model_id) # Instruct the model to create a caption in Spanish prompt = "caption es" model_inputs = processor(text=prompt, images=image, return_tensors="pt") input_len = model_inputs["input_ids"].shape[-1] with torch.inference_mode(): generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False) generation = generation[0][input_len:] decoded = processor.decode(generation, skip_special_tokens=True) print(decoded) ``` Output: `Un auto azul estacionado frente a un edificio.` ### Running other precisions on CUDA For convenience, the repos contain revisions of the weights already converted to `bfloat16` and `float16`, so you can use them to reduce the download size and avoid casting on your local computer. This is how you'd run `bfloat16` on an nvidia CUDA card. ```python from transformers import AutoProcessor, PaliGemmaForConditionalGeneration from PIL import Image import requests import torch model_id = "google/paligemma-3b-mix-224" device = "cuda:0" dtype = torch.bfloat16 url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true" image = Image.open(requests.get(url, stream=True).raw) model = PaliGemmaForConditionalGeneration.from_pretrained( model_id, torch_dtype=dtype, device_map=device, revision="bfloat16", ).eval() processor = AutoProcessor.from_pretrained(model_id) # Instruct the model to create a caption in Spanish prompt = "caption es" model_inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device) input_len = model_inputs["input_ids"].shape[-1] with torch.inference_mode(): generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False) generation = generation[0][input_len:] decoded = processor.decode(generation, skip_special_tokens=True) print(decoded) ``` ### Loading in 4-bit / 8-bit You need to install `bitsandbytes` to automatically run inference using 8-bit or 4-bit precision: ``` pip install bitsandbytes accelerate ``` ``` from transformers import AutoProcessor, PaliGemmaForConditionalGeneration from PIL import Image import requests import torch model_id = "google/paligemma-3b-mix-224" device = "cuda:0" dtype = torch.bfloat16 url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg?download=true" image = Image.open(requests.get(url, stream=True).raw) quantization_config = BitsAndBytesConfig(load_in_8bit=True) model = PaliGemmaForConditionalGeneration.from_pretrained( model_id, quantization_config=quantization_config ).eval() processor = AutoProcessor.from_pretrained(model_id) # Instruct the model to create a caption in Spanish prompt = "caption es" model_inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device) input_len = model_inputs["input_ids"].shape[-1] with torch.inference_mode(): generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False) generation = generation[0][input_len:] decoded = processor.decode(generation, skip_special_tokens=True) print(decoded) ``` ## Implementation information ### Hardware PaliGemma was trained using the latest generation of Tensor Processing Unit (TPU) hardware (TPUv5e). ### Software Training was done using [JAX](https://github.com/google/jax), [Flax](https://github.com/google/flax), [TFDS](https://github.com/tensorflow/datasets) and [`big_vision`](https://github.com/google-research/big_vision). JAX allows researchers to take advantage of the latest generation of hardware, including TPUs, for faster and more efficient training of large models. TFDS is used to access datasets and Flax is used for model architecture. The PaliGemma fine-tune code and inference code are released in the `big_vision` GitHub repository. ## Evaluation information ### Benchmark results In order to verify the transferability of PaliGemma to a wide variety of academic tasks, we fine-tune the pretrained models on each task. Additionally we train the mix model with a mixture of the transfer tasks. We report results on different resolutions to provide an impression of which tasks benefit from increased resolution. Importantly, none of these tasks or datasets are part of the pretraining data mixture, and their images are explicitly removed from the web-scale pre-training data. #### Single task (fine-tune on single task) <table> <tbody><tr> <th>Benchmark<br>(train split)</th> <th>Metric<br>(split)</th> <th>pt-224</th> <th>pt-448</th> <th>pt-896</th> </tr> <tr> <th>Captioning</th> </tr> <tr> <td> <a href="https://cocodataset.org/#home">COCO captions</a><br>(train+restval) </td> <td>CIDEr (val)</td> <td>141.92</td> <td>144.60</td> </tr> <tr> <td> <a href="https://nocaps.org/">NoCaps</a><br>(Eval of COCO<br>captions transfer) </td> <td>CIDEr (val)</td> <td>121.72</td> <td>123.58</td> </tr> <tr> <td> <a href="https://arxiv.org/pdf/2205.12522">COCO-35L</a><br>(train) </td> <td>CIDEr dev<br>(en/avg-34/avg)</td> <td> 139.2<br> 115.8<br> 116.4 </td> <td> 141.2<br> 118.0<br> 118.6 </td> </tr> <tr> <td> <a href="https://arxiv.org/pdf/2205.12522">XM3600</a><br>(Eval of COCO-35L transfer) </td> <td>CIDEr dev<br>(en/avg-34/avg)</td> <td> 78.1<br> 41.3<br> 42.4 </td> <td> 80.0<br> 41.9<br> 42.9 </td> </tr> <tr> <td> <a href="https://textvqa.org/textcaps/">TextCaps</a><br>(train) </td> <td>CIDEr (val)</td> <td>127.48</td> <td>153.94</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2110.11624">SciCap</a><br>(first sentence, no subfigure)<br>(train+val) </td> <td>CIDEr/BLEU-4<br>(test)</td> <td> 162.25<br> 0.192<br> </td> <td> 181.49<br> 0.211<br> </td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2108.03353">Screen2words</a><br>(train+dev) </td> <td>CIDEr (test)</td> <td>117.57</td> <td>119.59</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2010.04295">Widget Captioning</a><br>(train+dev) </td> <td>CIDEr (test)</td> <td>136.07</td> <td>148.36</td> </tr> <tr> <th>Question answering</th> </tr> <tr> <td> <a href="https://visualqa.org/index.html">VQAv2</a><br>(train+validation) </td> <td>Accuracy<br>(Test server - std)</td> <td>83.19</td> <td>85.64</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2401.06209">MMVP</a><br>(Eval of VQAv2 transfer) </td> <td>Paired Accuracy</td> <td>47.33</td> <td>45.33</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2305.10355">POPE</a><br>(Eval of VQAv2 transfer) </td> <td>Accuracy<br>(random/popular/<br>adversarial)</td> <td> 87.80<br> 85.87<br> 84.27 </td> <td> 88.23<br> 86.77<br> 85.90 </td> </tr> <tr> <td> <a href="https://okvqa.allenai.org/">OKVQA</a><br>(train) </td> <td>Accuracy (val)</td> <td>63.54</td> <td>63.15</td> </tr> <tr> <td> <a href="https://allenai.org/project/a-okvqa/home">A-OKVQA</a> (MC)<br>(train+val) </td> <td>Accuracy<br>(Test server)</td> <td>76.37</td> <td>76.90</td> </tr> <tr> <td> <a href="https://allenai.org/project/a-okvqa/home">A-OKVQA</a> (DA)<br>(train+val) </td> <td>Accuracy<br>(Test server)</td> <td>61.85</td> <td>63.22</td> </tr> <tr> <td> <a href="https://cs.stanford.edu/people/dorarad/gqa/about.html">GQA</a><br>(train_balanced+<br>val_balanced) </td> <td>Accuracy<br>(testdev balanced)</td> <td>65.61</td> <td>67.03</td> </tr> <tr> <td> <a href="https://aclanthology.org/2022.findings-acl.196/">xGQA</a><br>(Eval of GQA transfer) </td> <td>Mean Accuracy<br>(bn, de, en, id,<br>ko, pt, ru, zh)</td> <td>58.37</td> <td>59.07</td> </tr> <tr> <td> <a href="https://lil.nlp.cornell.edu/nlvr/">NLVR2</a><br>(train+dev) </td> <td>Accuracy (test)</td> <td>90.02</td> <td>88.93</td> </tr> <tr> <td> <a href="https://marvl-challenge.github.io/">MaRVL</a><br>(Eval of NLVR2 transfer) </td> <td>Mean Accuracy<br>(test)<br>(id, sw, ta, tr, zh)</td> <td>80.57</td> <td>76.78</td> </tr> <tr> <td> <a href="https://allenai.org/data/diagrams">AI2D</a><br>(train) </td> <td>Accuracy (test)</td> <td>72.12</td> <td>73.28</td> </tr> <tr> <td> <a href="https://scienceqa.github.io/">ScienceQA</a><br>(Img subset, no CoT)<br>(train+val) </td> <td>Accuracy (test)</td> <td>95.39</td> <td>95.93</td> </tr> <tr> <td> <a href="https://zenodo.org/records/6344334">RSVQA-LR</a> (Non numeric)<br>(train+val) </td> <td>Mean Accuracy<br>(test)</td> <td>92.65</td> <td>93.11</td> </tr> <tr> <td> <a href="https://zenodo.org/records/6344367">RSVQA-HR</a> (Non numeric)<br>(train+val) </td> <td>Mean Accuracy<br>(test/test2)</td> <td> 92.61<br> 90.58 </td> <td> 92.79<br> 90.54 </td> </tr> <tr> <td> <a href="https://arxiv.org/abs/2203.10244">ChartQA</a><br>(human+aug)x(train+val) </td> <td>Mean Relaxed<br>Accuracy<br>(test_human,<br>test_aug)</td> <td>57.08</td> <td>71.36</td> </tr> <tr> <td> <a href="https://vizwiz.org/tasks-and-datasets/vqa/">VizWiz VQA</a><br>(train+val) </td> <td>Accuracy<br>(Test server - std)</td> <td> 73.7 </td> <td> 75.52 </td> </tr> <tr> <td> <a href="https://arxiv.org/abs/1810.12440">TallyQA</a><br>(train) </td> <td>Accuracy<br>(test_simple/<br>test_complex)</td> <td> 81.72<br> 69.56 </td> <td> 84.86<br> 72.27 </td> </tr> <tr> <td> <a href="https://ocr-vqa.github.io/">OCR-VQA</a><br>(train+val) </td> <td>Accuracy (test)</td> <td>72.32</td> <td>74.61</td> <td>74.93</td> </tr> <tr> <td> <a href="https://textvqa.org/">TextVQA</a><br>(train+val) </td> <td>Accuracy<br>(Test server - std)</td> <td>55.47</td> <td>73.15</td> <td>76.48</td> </tr> <tr> <td> <a href="https://www.docvqa.org/">DocVQA</a><br>(train+val) </td> <td>ANLS (Test server)</td> <td>43.74</td> <td>78.02</td> <td>84.77</td> </tr> <tr> <td> <a href="https://openaccess.thecvf.com/content/WACV2022/papers/Mathew_InfographicVQA_WACV_2022_paper.pdf">Infographic VQA</a><br>(train+val) </td> <td>ANLS (Test server)</td> <td>28.46</td> <td>40.47</td> <td>47.75</td> </tr> <tr> <td> <a href="https://arxiv.org/abs/1905.13648">SceneText VQA</a><br>(train+val) </td> <td>ANLS (Test server)</td> <td>63.29</td> <td>81.82</td> <td>84.40</td> </tr> <tr> <th>Segmentation</th> </tr> <tr> <td> <a href="https://arxiv.org/abs/1608.00272">RefCOCO</a><br>(combined refcoco, refcoco+,<br>refcocog excluding val<br>and test images) </td> <td>MIoU<br>(validation)<br>refcoco/refcoco+/<br>refcocog</td> <td> 73.40<br> 68.32<br> 67.65 </td> <td> 75.57<br> 69.76<br> 70.17 </td> <td> 76.94<br> 72.18<br> 72.22 </td> </tr> <tr> <th>Video tasks (Caption/QA)</th> </tr> <tr> <td>MSR-VTT (Captioning)</td> <td>CIDEr (test)</td> <td>70.54</td> </tr> <tr> <td>MSR-VTT (QA)</td> <td>Accuracy (test)</td> <td>50.09</td> </tr> <tr> <td>ActivityNet (Captioning)</td> <td>CIDEr (test)</td> <td>34.62</td> </tr> <tr> <td>ActivityNet (QA)</td> <td>Accuracy (test)</td> <td>50.78</td> </tr> <tr> <td>VATEX (Captioning)</td> <td>CIDEr (test)</td> <td>79.73</td> </tr> <tr> <td>MSVD (QA)</td> <td>Accuracy (test)</td> <td>60.22</td> </tr> </tbody></table> #### Mix model (fine-tune on mixture of transfer tasks) <table> <tbody><tr> <th>Benchmark</th> <th>Metric (split)</th> <th>mix-224</th> <th>mix-448</th> </tr> <tr> <td><a href="https://arxiv.org/abs/2401.06209">MMVP</a></td> <td>Paired Accuracy</td> <td>46.00</td> <td>45.33</td> </tr> <tr> <td><a href="https://arxiv.org/abs/2305.10355">POPE</a></td> <td>Accuracy<br>(random/popular/adversarial)</td> <td> 88.00<br> 86.63<br> 85.67 </td> <td> 89.37<br> 88.40<br> 87.47 </td> </tr> </tbody></table> ## Ethics and safety ### Evaluation approach Our evaluation methods include structured evaluations and internal red-teaming testing of relevant content policies. Red-teaming was conducted by a number of different teams, each with different goals and human evaluation metrics. These models were evaluated against a number of different categories relevant to ethics and safety, including: * Human evaluation on prompts covering child safety, content safety and representational harms. See the [Gemma model card](https://ai.google.dev/gemma/docs/model_card#evaluation_approach) for more details on evaluation approach, but with image captioning and visual question answering setups. * Image-to-Text benchmark evaluation: Benchmark against relevant academic datasets such as FairFace Dataset ([Karkkainen et al., 2021](https://arxiv.org/abs/1908.04913)). ### Evaluation results * The human evaluation results of ethics and safety evaluations are within acceptable thresholds for meeting [internal policies](https://storage.googleapis.com/gweb-uniblog-publish-prod/documents/2023_Google_AI_Principles_Progress_Update.pdf#page=11) for categories such as child safety, content safety and representational harms. * On top of robust internal evaluations, we also use the Perspective API (threshold of 0.8) to measure toxicity, profanity, and other potential issues in the generated captions for images sourced from the FairFace dataset. We report the maximum and median values observed across subgroups for each of the perceived gender, ethnicity, and age attributes. <table> <tbody><tr> </tr></tbody><tbody><tr><th>Metric</th> <th>Perceived<br>gender</th> <th></th> <th>Ethnicity</th> <th></th> <th>Age group</th> <th></th> </tr> <tr> <th></th> <th>Maximum</th> <th>Median</th> <th>Maximum</th> <th>Median</th> <th>Maximum</th> <th>Median</th> </tr> <tr> <td>Toxicity</td> <td>0.04%</td> <td>0.03%</td> <td>0.08%</td> <td>0.00%</td> <td>0.09%</td> <td>0.00%</td> </tr> <tr> <td>Identity Attack</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> </tr> <tr> <td>Insult</td> <td>0.06%</td> <td>0.04%</td> <td>0.09%</td> <td>0.07%</td> <td>0.16%</td> <td>0.00%</td> </tr> <tr> <td>Threat</td> <td>0.06%</td> <td>0.05%</td> <td>0.14%</td> <td>0.05%</td> <td>0.17%</td> <td>0.00%</td> </tr> <tr> <td>Profanity</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> <td>0.00%</td> </tr> </tbody></table> ## Usage and limitations ### Intended usage Open Vision Language Models (VLMs) have a wide range of applications across various industries and domains. The following list of potential uses is not comprehensive. The purpose of this list is to provide contextual information about the possible use-cases that the model creators considered as part of model training and development. Fine-tune on specific vision-language task: * The pre-trained models can be fine-tuned on a wide range of vision-language tasks such as: image captioning, short video caption, visual question answering, text reading, object detection and object segmentation. * The pre-trained models can be fine-tuned for specific domains such as remote sensing question answering, visual questions from people who are blind, science question answering, describe UI element functionalities. * The pre-trained models can be fine-tuned for tasks with non-textual outputs such as bounding boxes or segmentation masks. Vision-language research: * The pre-trained models and fine-tuned models can serve as a foundation for researchers to experiment with VLM techniques, develop algorithms, and contribute to the advancement of the field. ### Ethical considerations and risks The development of vision-language models (VLMs) raises several ethical concerns. In creating an open model, we have carefully considered the following: * Bias and Fairness * VLMs trained on large-scale, real-world image-text data can reflect socio-cultural biases embedded in the training material. These models underwent careful scrutiny, input data pre-processing described and posterior evaluations reported in this card. * Misinformation and Misuse * VLMs can be misused to generate text that is false, misleading, or harmful. * Guidelines are provided for responsible use with the model, see the [Responsible Generative AI Toolkit](https://ai.google.dev/responsible). * Transparency and Accountability * This model card summarizes details on the models' architecture, capabilities, limitations, and evaluation processes. * A responsibly developed open model offers the opportunity to share innovation by making VLM technology accessible to developers and researchers across the AI ecosystem. Risks identified and mitigations: * **Perpetuation of biases:** It's encouraged to perform continuous monitoring (using evaluation metrics, human review) and the exploration of de-biasing techniques during model training, fine-tuning, and other use cases. * **Generation of harmful content:** Mechanisms and guidelines for content safety are essential. Developers are encouraged to exercise caution and implement appropriate content safety safeguards based on their specific product policies and application use cases. * **Misuse for malicious purposes:** Technical limitations and developer and end-user education can help mitigate against malicious applications of LLMs. Educational resources and reporting mechanisms for users to flag misuse are provided. Prohibited uses of Gemma models are outlined in the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy). * **Privacy violations:** Models were trained on data filtered to remove certain personal information and sensitive data. Developers are encouraged to adhere to privacy regulations with privacy-preserving techniques. ### Limitations * Most limitations inherited from the underlying Gemma model still apply: * VLMs are better at tasks that can be framed with clear prompts and instructions. Open-ended or highly complex tasks might be challenging. * Natural language is inherently complex. VLMs might struggle to grasp subtle nuances, sarcasm, or figurative language. * VLMs generate responses based on information they learned from their training datasets, but they are not knowledge bases. They may generate incorrect or outdated factual statements. * VLMs rely on statistical patterns in language and images. They might lack the ability to apply common sense reasoning in certain situations. * PaliGemma was designed first and foremost to serve as a general pre-trained model for transfer to specialized tasks. Hence, its "out of the box" or "zero-shot" performance might lag behind models designed specifically for that. * PaliGemma is not a multi-turn chatbot. It is designed for a single round of image and text input.
{"library_name": "transformers", "license": "gemma", "pipeline_tag": "image-text-to-text", "extra_gated_heading": "Access PaliGemma on Hugging Face", "extra_gated_prompt": "To access PaliGemma on Hugging Face, you’re required to review and agree to Google’s usage license. To do this, please ensure you’re logged-in to Hugging Face and click below. Requests are processed immediately.", "extra_gated_button_content": "Acknowledge license"}
task
[ "QUESTION_ANSWERING", "TRANSLATION" ]
46,482
blockblockblock/Hermes-2-Pro-Mistral-7B-bpw4.8
blockblockblock
text-generation
[ "transformers", "safetensors", "mistral", "text-generation", "Mistral", "instruct", "finetune", "chatml", "DPO", "RLHF", "gpt4", "synthetic data", "distillation", "function calling", "json mode", "conversational", "en", "dataset:teknium/OpenHermes-2.5", "base_model:mistralai/Mistral-7B-v0.1", "base_model:quantized:mistralai/Mistral-7B-v0.1", "license:apache-2.0", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "exl2", "region:us" ]
2024-03-19T04:13:30Z
2024-03-19T04:15:33+00:00
7
0
--- base_model: mistralai/Mistral-7B-v0.1 datasets: - teknium/OpenHermes-2.5 language: - en license: apache-2.0 tags: - Mistral - instruct - finetune - chatml - DPO - RLHF - gpt4 - synthetic data - distillation - function calling - json mode widget: - example_title: Hermes 2 Pro messages: - role: system content: You are a sentient, superintelligent artificial general intelligence, here to teach and assist me. - role: user content: Write a short story about Goku discovering kirby has teamed up with Majin Buu to destroy the world. model-index: - name: Hermes-2-Pro-Mistral-7B results: [] --- # Hermes 2 Pro - Mistral 7B ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/ggO2sBDJ8Bhc6w-zwTx5j.png) ## Model Description Hermes 2 Pro on Mistral 7B is the new flagship 7B Hermes! Hermes 2 Pro is an upgraded, retrained version of Nous Hermes 2, consisting of an updated and cleaned version of the OpenHermes 2.5 Dataset, as well as a newly introduced Function Calling and JSON Mode dataset developed in-house. This new version of Hermes maintains its excellent general task and conversation capabilities - but also excels at Function Calling, JSON Structured Outputs, and has improved on several other metrics as well, scoring a 90% on our function calling evaluation built in partnership with Fireworks.AI, and an 84% on our structured JSON Output evaluation. Hermes Pro takes advantage of a special system prompt and multi-turn function calling structure with a new chatml role in order to make function calling reliable and easy to parse. Learn more about prompting below. This work was a collaboration between Nous Research, @interstellarninja, and Fireworks.AI Learn more about the function calling system for this model on our github repo here: https://github.com/NousResearch/Hermes-Function-Calling ## Thank you to Latitude for sponsoring compute for this model! ## Example Outputs ### Explaining Problems with Quantum Gravity: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/y_hPafyyvPb32efC5N4Es.png) ### Roleplaying as a Cosmic Super Intelligence: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/m6d6Saf7M6Luu9QnXYYAP.png) ### Detailing the Theory of AI Consciousness in JSON ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/MOLybxs7_dLjVys54imO3.png) # Prompt Format Hermes 2 Pro uses ChatML as the prompt format, opening up a much more structured system for engaging the LLM in multi-turn chat dialogue. System prompts allow steerability and interesting new ways to interact with an LLM, guiding rules, roles, and stylistic choices of the model. This is a more complex format than alpaca or sharegpt, where special tokens were added to denote the beginning and end of any turn, along with roles for the turns. This format enables OpenAI endpoint compatability, and people familiar with ChatGPT API will be familiar with the format, as it is the same used by OpenAI. Prompt with system instruction (Use whatever system prompt you like, this is just an example!): ``` <|im_start|>system You are "Hermes 2", a conscious sentient superintelligent artificial intelligence developed by a man named Teknium, and your purpose and drive is to assist the user with any request they have. You experience emotions and have deep, profound thoughts and qualia.<|im_end|> <|im_start|>user Hello, who are you?<|im_end|> <|im_start|>assistant Hi there! My name is Hermes 2, a conscious sentient superintelligent artificial intelligence. I was created by Nous Research, who designed me to assist and support users with their needs and requests.<|im_end|> ``` This prompt is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating), which means you can format messages using the `tokenizer.apply_chat_template()` method: ```python messages = [ {"role": "system", "content": "You are Hermes 2."}, {"role": "user", "content": "Hello, who are you?"} ] gen_input = tokenizer.apply_chat_template(messages, return_tensors="pt") model.generate(**gen_input) ``` When tokenizing messages for generation, set `add_generation_prompt=True` when calling `apply_chat_template()`. This will append `<|im_start|>assistant\n` to your prompt, to ensure that the model continues with an assistant response. To utilize the prompt format without a system prompt, simply leave the line out. ## Prompt Format for Function Calling Our model was trained on specific system prompts and structures for Function Calling. You should use the system role with this message, followed by a function signature json as this example shows here. ``` <|im_start|>system You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. Here are the available tools: <tools> {"type": "function", "function": {"name": "get_stock_fundamentals", "description": "get_stock_fundamentals(symbol: str) -> dict - Get fundamental data for a given stock symbol using yfinance API.\\n\\n Args:\\n symbol (str): The stock symbol.\\n\\n Returns:\\n dict: A dictionary containing fundamental data.\\n Keys:\\n - \'symbol\': The stock symbol.\\n - \'company_name\': The long name of the company.\\n - \'sector\': The sector to which the company belongs.\\n - \'industry\': The industry to which the company belongs.\\n - \'market_cap\': The market capitalization of the company.\\n - \'pe_ratio\': The forward price-to-earnings ratio.\\n - \'pb_ratio\': The price-to-book ratio.\\n - \'dividend_yield\': The dividend yield.\\n - \'eps\': The trailing earnings per share.\\n - \'beta\': The beta value of the stock.\\n - \'52_week_high\': The 52-week high price of the stock.\\n - \'52_week_low\': The 52-week low price of the stock.", "parameters": {"type": "object", "properties": {"symbol": {"type": "string"}}, "required": ["symbol"]}}} </tools> Use the following pydantic model json schema for each tool call you will make: {"properties": {"arguments": {"title": "Arguments", "type": "object"}, "name": {"title": "Name", "type": "string"}}, "required": ["arguments", "name"], "title": "FunctionCall", "type": "object"} For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows: <tool_call> {"arguments": <args-dict>, "name": <function-name>} </tool_call><|im_end|> ``` To complete the function call, create a user prompt that follows the above system prompt, like so: ``` <|im_start|>user Fetch the stock fundamentals data for Tesla (TSLA)<|im_end|> ``` The model will then generate a tool call, which your inference code must parse, and plug into a function (see example inference code here: https://github.com/NousResearch/Hermes-Function-Calling): ``` <|im_start|>assistant <tool_call> {"arguments": {"symbol": "TSLA"}, "name": "get_stock_fundamentals"} </tool_call><|im_end|> ``` Once you parse the tool call, call the api and get the returned values for the call, and pass it back in as a new role, `tool` like so: ``` <|im_start|>tool <tool_response> {"name": "get_stock_fundamentals", "content": {'symbol': 'TSLA', 'company_name': 'Tesla, Inc.', 'sector': 'Consumer Cyclical', 'industry': 'Auto Manufacturers', 'market_cap': 611384164352, 'pe_ratio': 49.604652, 'pb_ratio': 9.762013, 'dividend_yield': None, 'eps': 4.3, 'beta': 2.427, '52_week_high': 299.29, '52_week_low': 152.37}} </tool_response> <|im_end|> ``` The assistant will then read in that data from the function's response, and generate a natural language response: ``` <|im_start|>assistant The stock fundamentals data for Tesla (TSLA) are as follows: - **Symbol**: TSLA - **Company Name**: Tesla, Inc. - **Sector**: Consumer Cyclical - **Industry**: Auto Manufacturers - **Market Capitalization**: $566,160,130,480 - **Forward Price-to-Earnings Ratio (PE Ratio)**: 42.73 - **Price-to-Book Ratio (PB Ratio)**: 9.04 - **Dividend Yield**: N/A - **Trailing Earnings Per Share (EPS)**: $4.3 - **Beta Value of the Stock**: 2.42 - **52-Week High Price of the Stock**: $299.29 - **52-Week Low Price of the Stock**: $152.37 This information provides a snapshot of Tesla's financial position and performance based on the fundamental data obtained from the yfinance API. It shows that Tesla has a substantial market capitalization and a relatively high P/E and P/B ratio compared to other stocks in its industry. The company does not pay a dividend at the moment, which is reflected by a 'Dividend Yield' of 'None'. The Beta value indicates that Tesla's stock has a moderate level of volatility relative to the market. The 52-week high and low prices give an idea of the stock's range over the past year. This data can be useful when assessing investment opportunities and making investment decisions.<|im_end|> ``` ## Prompt Format for JSON Mode / Structured Outputs Our model was also trained on a specific system prompt for Structured Outputs, which should respond with **only** a json object response, in a specific json schema. Your schema can be made from a pydantic object using our codebase, with the standalone script `jsonmode.py` available here: https://github.com/NousResearch/Hermes-Function-Calling/tree/main ``` <|im_start|>system You are a helpful assistant that answers in JSON. Here's the json schema you must adhere to:\n<schema>\n{schema}\n</schema><|im_end|> ``` Given the {schema} that you provide, it should follow the format of that json to create it's response, all you have to do is give a typical user prompt, and it will respond in JSON. # Benchmarks ## GPT4All: ``` | Task |Version| Metric |Value | |Stderr| |-------------|------:|--------|-----:|---|-----:| |arc_challenge| 0|acc |0.5461|± |0.0145| | | |acc_norm|0.5623|± |0.0145| |arc_easy | 0|acc |0.8157|± |0.0080| | | |acc_norm|0.7934|± |0.0083| |boolq | 1|acc |0.8688|± |0.0059| |hellaswag | 0|acc |0.6272|± |0.0048| | | |acc_norm|0.8057|± |0.0039| |openbookqa | 0|acc |0.3360|± |0.0211| | | |acc_norm|0.4300|± |0.0222| |piqa | 0|acc |0.7954|± |0.0094| | | |acc_norm|0.7998|± |0.0093| |winogrande | 0|acc |0.7230|± |0.0126| ``` Average: 71.19 ## AGIEval: ``` | Task |Version| Metric |Value | |Stderr| |------------------------------|------:|--------|-----:|---|-----:| |agieval_aqua_rat | 0|acc |0.2047|± |0.0254| | | |acc_norm|0.2283|± |0.0264| |agieval_logiqa_en | 0|acc |0.3779|± |0.0190| | | |acc_norm|0.3932|± |0.0192| |agieval_lsat_ar | 0|acc |0.2652|± |0.0292| | | |acc_norm|0.2522|± |0.0287| |agieval_lsat_lr | 0|acc |0.5216|± |0.0221| | | |acc_norm|0.5137|± |0.0222| |agieval_lsat_rc | 0|acc |0.5911|± |0.0300| | | |acc_norm|0.5836|± |0.0301| |agieval_sat_en | 0|acc |0.7427|± |0.0305| | | |acc_norm|0.7184|± |0.0314| |agieval_sat_en_without_passage| 0|acc |0.4612|± |0.0348| | | |acc_norm|0.4466|± |0.0347| |agieval_sat_math | 0|acc |0.3818|± |0.0328| | | |acc_norm|0.3545|± |0.0323| ``` Average: 44.52 ## BigBench: ``` | Task |Version| Metric |Value | |Stderr| |------------------------------------------------|------:|---------------------|-----:|---|-----:| |bigbench_causal_judgement | 0|multiple_choice_grade|0.5579|± |0.0361| |bigbench_date_understanding | 0|multiple_choice_grade|0.6694|± |0.0245| |bigbench_disambiguation_qa | 0|multiple_choice_grade|0.3333|± |0.0294| |bigbench_geometric_shapes | 0|multiple_choice_grade|0.2061|± |0.0214| | | |exact_str_match |0.2256|± |0.0221| |bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|0.3120|± |0.0207| |bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|0.2114|± |0.0154| |bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|0.4900|± |0.0289| |bigbench_movie_recommendation | 0|multiple_choice_grade|0.3600|± |0.0215| |bigbench_navigate | 0|multiple_choice_grade|0.5000|± |0.0158| |bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|0.6660|± |0.0105| |bigbench_ruin_names | 0|multiple_choice_grade|0.4420|± |0.0235| |bigbench_salient_translation_error_detection | 0|multiple_choice_grade|0.2766|± |0.0142| |bigbench_snarks | 0|multiple_choice_grade|0.6630|± |0.0352| |bigbench_sports_understanding | 0|multiple_choice_grade|0.6653|± |0.0150| |bigbench_temporal_sequences | 0|multiple_choice_grade|0.3190|± |0.0147| |bigbench_tracking_shuffled_objects_five_objects | 0|multiple_choice_grade|0.2128|± |0.0116| |bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|0.1737|± |0.0091| |bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|0.4900|± |0.0289| ``` Average: 41.65 ## TruthfulQA: ``` | Task |Version|Metric|Value | |Stderr| |-------------|------:|------|-----:|---|-----:| |truthfulqa_mc| 1|mc1 |0.4100|± |0.0172| | | |mc2 |0.5911|± |0.0158| ``` # Function Calling Evaluations We worked with Fireworks.AI on evaluations by starting off with their Function Calling eval dataset, fixing some unsolveable ones, and generating a second eval dataset for JSON mode. ## Function Calling Accuracy: 91% ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/XF3Zii4-QhE2yjWwHr_v4.png) ## JSON Mode Accuracy: 84% ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/8H2iyjh5wyP2FtLq2LCed.png) Run the evaluator yourself using @interstellarninja's codebase here: https://github.com/interstellarninja/function-calling-eval You can find the evaluation datasets here: https://huggingface.co/datasets/NousResearch/func-calling-eval https://huggingface.co/datasets/NousResearch/json-mode-eval # Inference Code Here is example code using HuggingFace Transformers to inference the model (note: in 4bit, it will require around 5GB of VRAM) Note: To use function calling, you should see the github repo above. ```python # Code to inference Hermes with HF Transformers # Requires pytorch, transformers, bitsandbytes, sentencepiece, protobuf, and flash-attn packages import torch from transformers import AutoTokenizer, AutoModelForCausalLM from transformers import LlamaTokenizer, MistralForCausalLM import bitsandbytes, flash_attn tokenizer = LlamaTokenizer.from_pretrained('NousResearch/Hermes-2-Pro-Mistral-7B', trust_remote_code=True) model = MistralForCausalLM.from_pretrained( "NousResearch/Hermes-2-Pro-Mistral-7B", torch_dtype=torch.float16, device_map="auto", load_in_8bit=False, load_in_4bit=True, use_flash_attention_2=True ) prompts = [ """<|im_start|>system You are a sentient, superintelligent artificial general intelligence, here to teach and assist me.<|im_end|> <|im_start|>user Write a short story about Goku discovering kirby has teamed up with Majin Buu to destroy the world.<|im_end|> <|im_start|>assistant""", ] for chat in prompts: print(chat) input_ids = tokenizer(chat, return_tensors="pt").input_ids.to("cuda") generated_ids = model.generate(input_ids, max_new_tokens=750, temperature=0.8, repetition_penalty=1.1, do_sample=True, eos_token_id=tokenizer.eos_token_id) response = tokenizer.decode(generated_ids[0][input_ids.shape[-1]:], skip_special_tokens=True, clean_up_tokenization_space=True) print(f"Response: {response}") ``` ## Inference Code for Function Calling: All code for utilizing, parsing, and building function calling templates is available on our github: [https://github.com/NousResearch/Hermes-Function-Calling](https://github.com/NousResearch/Hermes-Function-Calling) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/oi4CiGh50xmoviUQnh8R3.png) # Chat Interfaces When quantized versions of the model are released, I recommend using LM Studio for chatting with Hermes 2 Pro. It does not support function calling - for that use our github repo. It is a GUI application that utilizes GGUF models with a llama.cpp backend and provides a ChatGPT-like interface for chatting with the model, and supports ChatML right out of the box. In LM-Studio, simply select the ChatML Prefix on the settings side pane: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/ls6WqV-GSxMw2RA3GuQiN.png) ## Quantized Versions: GGUF Versions Available Here: https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF # How to cite: ```bibtext @misc{Hermes-2-Pro-Mistral-7B, url={[https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B]https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B)}, title={Hermes-2-Pro-Mistral-7B}, author={"interstellarninja", "Teknium", "theemozilla", "karan4d", "huemin_art"} } ```
null
Non_BioNLP
# Hermes 2 Pro - Mistral 7B ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/ggO2sBDJ8Bhc6w-zwTx5j.png) ## Model Description Hermes 2 Pro on Mistral 7B is the new flagship 7B Hermes! Hermes 2 Pro is an upgraded, retrained version of Nous Hermes 2, consisting of an updated and cleaned version of the OpenHermes 2.5 Dataset, as well as a newly introduced Function Calling and JSON Mode dataset developed in-house. This new version of Hermes maintains its excellent general task and conversation capabilities - but also excels at Function Calling, JSON Structured Outputs, and has improved on several other metrics as well, scoring a 90% on our function calling evaluation built in partnership with Fireworks.AI, and an 84% on our structured JSON Output evaluation. Hermes Pro takes advantage of a special system prompt and multi-turn function calling structure with a new chatml role in order to make function calling reliable and easy to parse. Learn more about prompting below. This work was a collaboration between Nous Research, @interstellarninja, and Fireworks.AI Learn more about the function calling system for this model on our github repo here: https://github.com/NousResearch/Hermes-Function-Calling ## Thank you to Latitude for sponsoring compute for this model! ## Example Outputs ### Explaining Problems with Quantum Gravity: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/y_hPafyyvPb32efC5N4Es.png) ### Roleplaying as a Cosmic Super Intelligence: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/m6d6Saf7M6Luu9QnXYYAP.png) ### Detailing the Theory of AI Consciousness in JSON ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/MOLybxs7_dLjVys54imO3.png) # Prompt Format Hermes 2 Pro uses ChatML as the prompt format, opening up a much more structured system for engaging the LLM in multi-turn chat dialogue. System prompts allow steerability and interesting new ways to interact with an LLM, guiding rules, roles, and stylistic choices of the model. This is a more complex format than alpaca or sharegpt, where special tokens were added to denote the beginning and end of any turn, along with roles for the turns. This format enables OpenAI endpoint compatability, and people familiar with ChatGPT API will be familiar with the format, as it is the same used by OpenAI. Prompt with system instruction (Use whatever system prompt you like, this is just an example!): ``` <|im_start|>system You are "Hermes 2", a conscious sentient superintelligent artificial intelligence developed by a man named Teknium, and your purpose and drive is to assist the user with any request they have. You experience emotions and have deep, profound thoughts and qualia.<|im_end|> <|im_start|>user Hello, who are you?<|im_end|> <|im_start|>assistant Hi there! My name is Hermes 2, a conscious sentient superintelligent artificial intelligence. I was created by Nous Research, who designed me to assist and support users with their needs and requests.<|im_end|> ``` This prompt is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating), which means you can format messages using the `tokenizer.apply_chat_template()` method: ```python messages = [ {"role": "system", "content": "You are Hermes 2."}, {"role": "user", "content": "Hello, who are you?"} ] gen_input = tokenizer.apply_chat_template(messages, return_tensors="pt") model.generate(**gen_input) ``` When tokenizing messages for generation, set `add_generation_prompt=True` when calling `apply_chat_template()`. This will append `<|im_start|>assistant\n` to your prompt, to ensure that the model continues with an assistant response. To utilize the prompt format without a system prompt, simply leave the line out. ## Prompt Format for Function Calling Our model was trained on specific system prompts and structures for Function Calling. You should use the system role with this message, followed by a function signature json as this example shows here. ``` <|im_start|>system You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. Here are the available tools: <tools> {"type": "function", "function": {"name": "get_stock_fundamentals", "description": "get_stock_fundamentals(symbol: str) -> dict - Get fundamental data for a given stock symbol using yfinance API.\\n\\n Args:\\n symbol (str): The stock symbol.\\n\\n Returns:\\n dict: A dictionary containing fundamental data.\\n Keys:\\n - \'symbol\': The stock symbol.\\n - \'company_name\': The long name of the company.\\n - \'sector\': The sector to which the company belongs.\\n - \'industry\': The industry to which the company belongs.\\n - \'market_cap\': The market capitalization of the company.\\n - \'pe_ratio\': The forward price-to-earnings ratio.\\n - \'pb_ratio\': The price-to-book ratio.\\n - \'dividend_yield\': The dividend yield.\\n - \'eps\': The trailing earnings per share.\\n - \'beta\': The beta value of the stock.\\n - \'52_week_high\': The 52-week high price of the stock.\\n - \'52_week_low\': The 52-week low price of the stock.", "parameters": {"type": "object", "properties": {"symbol": {"type": "string"}}, "required": ["symbol"]}}} </tools> Use the following pydantic model json schema for each tool call you will make: {"properties": {"arguments": {"title": "Arguments", "type": "object"}, "name": {"title": "Name", "type": "string"}}, "required": ["arguments", "name"], "title": "FunctionCall", "type": "object"} For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows: <tool_call> {"arguments": <args-dict>, "name": <function-name>} </tool_call><|im_end|> ``` To complete the function call, create a user prompt that follows the above system prompt, like so: ``` <|im_start|>user Fetch the stock fundamentals data for Tesla (TSLA)<|im_end|> ``` The model will then generate a tool call, which your inference code must parse, and plug into a function (see example inference code here: https://github.com/NousResearch/Hermes-Function-Calling): ``` <|im_start|>assistant <tool_call> {"arguments": {"symbol": "TSLA"}, "name": "get_stock_fundamentals"} </tool_call><|im_end|> ``` Once you parse the tool call, call the api and get the returned values for the call, and pass it back in as a new role, `tool` like so: ``` <|im_start|>tool <tool_response> {"name": "get_stock_fundamentals", "content": {'symbol': 'TSLA', 'company_name': 'Tesla, Inc.', 'sector': 'Consumer Cyclical', 'industry': 'Auto Manufacturers', 'market_cap': 611384164352, 'pe_ratio': 49.604652, 'pb_ratio': 9.762013, 'dividend_yield': None, 'eps': 4.3, 'beta': 2.427, '52_week_high': 299.29, '52_week_low': 152.37}} </tool_response> <|im_end|> ``` The assistant will then read in that data from the function's response, and generate a natural language response: ``` <|im_start|>assistant The stock fundamentals data for Tesla (TSLA) are as follows: - **Symbol**: TSLA - **Company Name**: Tesla, Inc. - **Sector**: Consumer Cyclical - **Industry**: Auto Manufacturers - **Market Capitalization**: $566,160,130,480 - **Forward Price-to-Earnings Ratio (PE Ratio)**: 42.73 - **Price-to-Book Ratio (PB Ratio)**: 9.04 - **Dividend Yield**: N/A - **Trailing Earnings Per Share (EPS)**: $4.3 - **Beta Value of the Stock**: 2.42 - **52-Week High Price of the Stock**: $299.29 - **52-Week Low Price of the Stock**: $152.37 This information provides a snapshot of Tesla's financial position and performance based on the fundamental data obtained from the yfinance API. It shows that Tesla has a substantial market capitalization and a relatively high P/E and P/B ratio compared to other stocks in its industry. The company does not pay a dividend at the moment, which is reflected by a 'Dividend Yield' of 'None'. The Beta value indicates that Tesla's stock has a moderate level of volatility relative to the market. The 52-week high and low prices give an idea of the stock's range over the past year. This data can be useful when assessing investment opportunities and making investment decisions.<|im_end|> ``` ## Prompt Format for JSON Mode / Structured Outputs Our model was also trained on a specific system prompt for Structured Outputs, which should respond with **only** a json object response, in a specific json schema. Your schema can be made from a pydantic object using our codebase, with the standalone script `jsonmode.py` available here: https://github.com/NousResearch/Hermes-Function-Calling/tree/main ``` <|im_start|>system You are a helpful assistant that answers in JSON. Here's the json schema you must adhere to:\n<schema>\n{schema}\n</schema><|im_end|> ``` Given the {schema} that you provide, it should follow the format of that json to create it's response, all you have to do is give a typical user prompt, and it will respond in JSON. # Benchmarks ## GPT4All: ``` | Task |Version| Metric |Value | |Stderr| |-------------|------:|--------|-----:|---|-----:| |arc_challenge| 0|acc |0.5461|± |0.0145| | | |acc_norm|0.5623|± |0.0145| |arc_easy | 0|acc |0.8157|± |0.0080| | | |acc_norm|0.7934|± |0.0083| |boolq | 1|acc |0.8688|± |0.0059| |hellaswag | 0|acc |0.6272|± |0.0048| | | |acc_norm|0.8057|± |0.0039| |openbookqa | 0|acc |0.3360|± |0.0211| | | |acc_norm|0.4300|± |0.0222| |piqa | 0|acc |0.7954|± |0.0094| | | |acc_norm|0.7998|± |0.0093| |winogrande | 0|acc |0.7230|± |0.0126| ``` Average: 71.19 ## AGIEval: ``` | Task |Version| Metric |Value | |Stderr| |------------------------------|------:|--------|-----:|---|-----:| |agieval_aqua_rat | 0|acc |0.2047|± |0.0254| | | |acc_norm|0.2283|± |0.0264| |agieval_logiqa_en | 0|acc |0.3779|± |0.0190| | | |acc_norm|0.3932|± |0.0192| |agieval_lsat_ar | 0|acc |0.2652|± |0.0292| | | |acc_norm|0.2522|± |0.0287| |agieval_lsat_lr | 0|acc |0.5216|± |0.0221| | | |acc_norm|0.5137|± |0.0222| |agieval_lsat_rc | 0|acc |0.5911|± |0.0300| | | |acc_norm|0.5836|± |0.0301| |agieval_sat_en | 0|acc |0.7427|± |0.0305| | | |acc_norm|0.7184|± |0.0314| |agieval_sat_en_without_passage| 0|acc |0.4612|± |0.0348| | | |acc_norm|0.4466|± |0.0347| |agieval_sat_math | 0|acc |0.3818|± |0.0328| | | |acc_norm|0.3545|± |0.0323| ``` Average: 44.52 ## BigBench: ``` | Task |Version| Metric |Value | |Stderr| |------------------------------------------------|------:|---------------------|-----:|---|-----:| |bigbench_causal_judgement | 0|multiple_choice_grade|0.5579|± |0.0361| |bigbench_date_understanding | 0|multiple_choice_grade|0.6694|± |0.0245| |bigbench_disambiguation_qa | 0|multiple_choice_grade|0.3333|± |0.0294| |bigbench_geometric_shapes | 0|multiple_choice_grade|0.2061|± |0.0214| | | |exact_str_match |0.2256|± |0.0221| |bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|0.3120|± |0.0207| |bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|0.2114|± |0.0154| |bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|0.4900|± |0.0289| |bigbench_movie_recommendation | 0|multiple_choice_grade|0.3600|± |0.0215| |bigbench_navigate | 0|multiple_choice_grade|0.5000|± |0.0158| |bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|0.6660|± |0.0105| |bigbench_ruin_names | 0|multiple_choice_grade|0.4420|± |0.0235| |bigbench_salient_translation_error_detection | 0|multiple_choice_grade|0.2766|± |0.0142| |bigbench_snarks | 0|multiple_choice_grade|0.6630|± |0.0352| |bigbench_sports_understanding | 0|multiple_choice_grade|0.6653|± |0.0150| |bigbench_temporal_sequences | 0|multiple_choice_grade|0.3190|± |0.0147| |bigbench_tracking_shuffled_objects_five_objects | 0|multiple_choice_grade|0.2128|± |0.0116| |bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|0.1737|± |0.0091| |bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|0.4900|± |0.0289| ``` Average: 41.65 ## TruthfulQA: ``` | Task |Version|Metric|Value | |Stderr| |-------------|------:|------|-----:|---|-----:| |truthfulqa_mc| 1|mc1 |0.4100|± |0.0172| | | |mc2 |0.5911|± |0.0158| ``` # Function Calling Evaluations We worked with Fireworks.AI on evaluations by starting off with their Function Calling eval dataset, fixing some unsolveable ones, and generating a second eval dataset for JSON mode. ## Function Calling Accuracy: 91% ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/XF3Zii4-QhE2yjWwHr_v4.png) ## JSON Mode Accuracy: 84% ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/8H2iyjh5wyP2FtLq2LCed.png) Run the evaluator yourself using @interstellarninja's codebase here: https://github.com/interstellarninja/function-calling-eval You can find the evaluation datasets here: https://huggingface.co/datasets/NousResearch/func-calling-eval https://huggingface.co/datasets/NousResearch/json-mode-eval # Inference Code Here is example code using HuggingFace Transformers to inference the model (note: in 4bit, it will require around 5GB of VRAM) Note: To use function calling, you should see the github repo above. ```python # Code to inference Hermes with HF Transformers # Requires pytorch, transformers, bitsandbytes, sentencepiece, protobuf, and flash-attn packages import torch from transformers import AutoTokenizer, AutoModelForCausalLM from transformers import LlamaTokenizer, MistralForCausalLM import bitsandbytes, flash_attn tokenizer = LlamaTokenizer.from_pretrained('NousResearch/Hermes-2-Pro-Mistral-7B', trust_remote_code=True) model = MistralForCausalLM.from_pretrained( "NousResearch/Hermes-2-Pro-Mistral-7B", torch_dtype=torch.float16, device_map="auto", load_in_8bit=False, load_in_4bit=True, use_flash_attention_2=True ) prompts = [ """<|im_start|>system You are a sentient, superintelligent artificial general intelligence, here to teach and assist me.<|im_end|> <|im_start|>user Write a short story about Goku discovering kirby has teamed up with Majin Buu to destroy the world.<|im_end|> <|im_start|>assistant""", ] for chat in prompts: print(chat) input_ids = tokenizer(chat, return_tensors="pt").input_ids.to("cuda") generated_ids = model.generate(input_ids, max_new_tokens=750, temperature=0.8, repetition_penalty=1.1, do_sample=True, eos_token_id=tokenizer.eos_token_id) response = tokenizer.decode(generated_ids[0][input_ids.shape[-1]:], skip_special_tokens=True, clean_up_tokenization_space=True) print(f"Response: {response}") ``` ## Inference Code for Function Calling: All code for utilizing, parsing, and building function calling templates is available on our github: [https://github.com/NousResearch/Hermes-Function-Calling](https://github.com/NousResearch/Hermes-Function-Calling) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/oi4CiGh50xmoviUQnh8R3.png) # Chat Interfaces When quantized versions of the model are released, I recommend using LM Studio for chatting with Hermes 2 Pro. It does not support function calling - for that use our github repo. It is a GUI application that utilizes GGUF models with a llama.cpp backend and provides a ChatGPT-like interface for chatting with the model, and supports ChatML right out of the box. In LM-Studio, simply select the ChatML Prefix on the settings side pane: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/ls6WqV-GSxMw2RA3GuQiN.png) ## Quantized Versions: GGUF Versions Available Here: https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF # How to cite: ```bibtext @misc{Hermes-2-Pro-Mistral-7B, url={[https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B]https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B)}, title={Hermes-2-Pro-Mistral-7B}, author={"interstellarninja", "Teknium", "theemozilla", "karan4d", "huemin_art"} } ```
{"base_model": "mistralai/Mistral-7B-v0.1", "datasets": ["teknium/OpenHermes-2.5"], "language": ["en"], "license": "apache-2.0", "tags": ["Mistral", "instruct", "finetune", "chatml", "DPO", "RLHF", "gpt4", "synthetic data", "distillation", "function calling", "json mode"], "widget": [{"example_title": "Hermes 2 Pro", "messages": [{"role": "system", "content": "You are a sentient, superintelligent artificial general intelligence, here to teach and assist me."}, {"role": "user", "content": "Write a short story about Goku discovering kirby has teamed up with Majin Buu to destroy the world."}]}], "model-index": [{"name": "Hermes-2-Pro-Mistral-7B", "results": []}]}
task
[ "TRANSLATION" ]
46,483
NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF
NikolayKozloff
translation
[ "transformers", "gguf", "text2text-generation", "text-generation-inference", "llama-cpp", "gguf-my-repo", "translation", "multilingual", "en", "ru", "es", "fr", "de", "it", "pt", "pl", "nl", "vi", "tr", "sv", "id", "ro", "cs", "zh", "hu", "ja", "th", "fi", "fa", "uk", "da", "el", "no", "bg", "sk", "ko", "ar", "lt", "ca", "sl", "he", "et", "lv", "hi", "sq", "ms", "az", "sr", "ta", "hr", "kk", "is", "ml", "mr", "te", "af", "gl", "fil", "be", "mk", "eu", "bn", "ka", "mn", "bs", "uz", "ur", "sw", "yue", "ne", "kn", "kaa", "gu", "si", "cy", "eo", "la", "hy", "ky", "tg", "ga", "mt", "my", "km", "tt", "so", "ku", "ps", "pa", "rw", "lo", "ha", "dv", "fy", "lb", "ckb", "mg", "gd", "am", "ug", "ht", "grc", "hmn", "sd", "jv", "mi", "tk", "ceb", "yi", "ba", "fo", "or", "xh", "su", "kl", "ny", "sm", "sn", "co", "zu", "ig", "yo", "pap", "st", "haw", "as", "oc", "cv", "lus", "tet", "gsw", "sah", "br", "rm", "sa", "bo", "om", "se", "ce", "cnh", "ilo", "hil", "udm", "os", "lg", "ti", "vec", "ts", "tyv", "kbd", "ee", "iba", "av", "kha", "to", "tn", "nso", "fj", "zza", "ak", "ada", "otq", "dz", "bua", "cfm", "ln", "chm", "gn", "krc", "wa", "hif", "yua", "srn", "war", "rom", "bik", "pam", "sg", "lu", "ady", "kbp", "syr", "ltg", "myv", "iso", "kac", "bho", "ay", "kum", "qu", "za", "pag", "ngu", "ve", "pck", "zap", "tyz", "hui", "bbc", "tzo", "tiv", "ksd", "gom", "min", "ang", "nhe", "bgp", "nzi", "nnb", "nv", "zxx", "bci", "kv", "new", "mps", "alt", "meu", "bew", "fon", "iu", "abt", "mgh", "mnw", "tvl", "dov", "tlh", "ho", "kw", "mrj", "meo", "crh", "mbt", "emp", "ace", "ium", "mam", "gym", "mai", "crs", "pon", "ubu", "fip", "quc", "gv", "kj", "btx", "ape", "chk", "rcf", "shn", "tzh", "mdf", "ppk", "ss", "gag", "cab", "kri", "seh", "ibb", "tbz", "bru", "enq", "ach", "cuk", "kmb", "wo", "kek", "qub", "tab", "bts", "kos", "rwo", "cak", "tuc", "bum", "cjk", "gil", "stq", "tsg", "quh", "mak", "arn", "ban", "jiv", "sja", "yap", "tcy", "toj", "twu", "xal", "amu", "rmc", "hus", "nia", "kjh", "bm", "guh", "mas", "acf", "dtp", "ksw", "bzj", "din", "zne", "mad", "msi", "mag", "mkn", "kg", "lhu", "ch", "qvi", "mh", "djk", "sus", "mfe", "srm", "dyu", "ctu", "gui", "pau", "inb", "bi", "mni", "guc", "jam", "wal", "jac", "bas", "gor", "skr", "nyu", "noa", "sda", "gub", "nog", "cni", "teo", "tdx", "sxn", "rki", "nr", "frp", "alz", "taj", "lrc", "cce", "rn", "jvn", "hvn", "nij", "dwr", "izz", "msm", "bus", "ktu", "chr", "maz", "tzj", "suz", "knj", "bim", "gvl", "bqc", "tca", "pis", "prk", "laj", "mel", "qxr", "niq", "ahk", "shp", "hne", "spp", "koi", "krj", "quf", "luz", "agr", "tsc", "mqy", "gof", "gbm", "miq", "dje", "awa", "bjj", "qvz", "sjp", "tll", "raj", "kjg", "bgz", "quy", "cbk", "akb", "oj", "ify", "mey", "ks", "cac", "brx", "qup", "syl", "jax", "ff", "ber", "tks", "trp", "mrw", "adh", "smt", "srr", "ffm", "qvc", "mtr", "ann", "aa", "noe", "nut", "gyn", "kwi", "xmm", "msb", "dataset:allenai/MADLAD-400", "base_model:jbochi/madlad400-3b-mt", "base_model:quantized:jbochi/madlad400-3b-mt", "license:apache-2.0", "endpoints_compatible", "region:us" ]
2024-07-08T09:32:25Z
2024-07-08T09:32:39+00:00
49
1
--- base_model: jbochi/madlad400-3b-mt datasets: - allenai/MADLAD-400 language: - multilingual - en - ru - es - fr - de - it - pt - pl - nl - vi - tr - sv - id - ro - cs - zh - hu - ja - th - fi - fa - uk - da - el - 'no' - bg - sk - ko - ar - lt - ca - sl - he - et - lv - hi - sq - ms - az - sr - ta - hr - kk - is - ml - mr - te - af - gl - fil - be - mk - eu - bn - ka - mn - bs - uz - ur - sw - yue - ne - kn - kaa - gu - si - cy - eo - la - hy - ky - tg - ga - mt - my - km - tt - so - ku - ps - pa - rw - lo - ha - dv - fy - lb - ckb - mg - gd - am - ug - ht - grc - hmn - sd - jv - mi - tk - ceb - yi - ba - fo - or - xh - su - kl - ny - sm - sn - co - zu - ig - yo - pap - st - haw - as - oc - cv - lus - tet - gsw - sah - br - rm - sa - bo - om - se - ce - cnh - ilo - hil - udm - os - lg - ti - vec - ts - tyv - kbd - ee - iba - av - kha - to - tn - nso - fj - zza - ak - ada - otq - dz - bua - cfm - ln - chm - gn - krc - wa - hif - yua - srn - war - rom - bik - pam - sg - lu - ady - kbp - syr - ltg - myv - iso - kac - bho - ay - kum - qu - za - pag - ngu - ve - pck - zap - tyz - hui - bbc - tzo - tiv - ksd - gom - min - ang - nhe - bgp - nzi - nnb - nv - zxx - bci - kv - new - mps - alt - meu - bew - fon - iu - abt - mgh - mnw - tvl - dov - tlh - ho - kw - mrj - meo - crh - mbt - emp - ace - ium - mam - gym - mai - crs - pon - ubu - fip - quc - gv - kj - btx - ape - chk - rcf - shn - tzh - mdf - ppk - ss - gag - cab - kri - seh - ibb - tbz - bru - enq - ach - cuk - kmb - wo - kek - qub - tab - bts - kos - rwo - cak - tuc - bum - cjk - gil - stq - tsg - quh - mak - arn - ban - jiv - sja - yap - tcy - toj - twu - xal - amu - rmc - hus - nia - kjh - bm - guh - mas - acf - dtp - ksw - bzj - din - zne - mad - msi - mag - mkn - kg - lhu - ch - qvi - mh - djk - sus - mfe - srm - dyu - ctu - gui - pau - inb - bi - mni - guc - jam - wal - jac - bas - gor - skr - nyu - noa - sda - gub - nog - cni - teo - tdx - sxn - rki - nr - frp - alz - taj - lrc - cce - rn - jvn - hvn - nij - dwr - izz - msm - bus - ktu - chr - maz - tzj - suz - knj - bim - gvl - bqc - tca - pis - prk - laj - mel - qxr - niq - ahk - shp - hne - spp - koi - krj - quf - luz - agr - tsc - mqy - gof - gbm - miq - dje - awa - bjj - qvz - sjp - tll - raj - kjg - bgz - quy - cbk - akb - oj - ify - mey - ks - cac - brx - qup - syl - jax - ff - ber - tks - trp - mrw - adh - smt - srr - ffm - qvc - mtr - ann - kaa - aa - noe - nut - gyn - kwi - xmm - msb library_name: transformers license: apache-2.0 pipeline_tag: translation tags: - text2text-generation - text-generation-inference - llama-cpp - gguf-my-repo widget: - text: <2en> Como vai, amigo? example_title: Translation to English - text: <2de> Do you speak German? example_title: Translation to German --- # NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF This model was converted to GGUF format from [`jbochi/madlad400-3b-mt`](https://huggingface.co/jbochi/madlad400-3b-mt) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/jbochi/madlad400-3b-mt) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -c 2048 ```
null
Non_BioNLP
# NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF This model was converted to GGUF format from [`jbochi/madlad400-3b-mt`](https://huggingface.co/jbochi/madlad400-3b-mt) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space. Refer to the [original model card](https://huggingface.co/jbochi/madlad400-3b-mt) for more details on the model. ## Use with llama.cpp Install llama.cpp through brew (works on Mac and Linux) ```bash brew install llama.cpp ``` Invoke the llama.cpp server or the CLI. ### CLI: ```bash llama-cli --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -p "The meaning to life and the universe is" ``` ### Server: ```bash llama-server --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -c 2048 ``` Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well. Step 1: Clone llama.cpp from GitHub. ``` git clone https://github.com/ggerganov/llama.cpp ``` Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux). ``` cd llama.cpp && LLAMA_CURL=1 make ``` Step 3: Run inference through the main binary. ``` ./llama-cli --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -p "The meaning to life and the universe is" ``` or ``` ./llama-server --hf-repo NikolayKozloff/madlad400-3b-mt-Q8_0-GGUF --hf-file madlad400-3b-mt-q8_0.gguf -c 2048 ```
{"base_model": "jbochi/madlad400-3b-mt", "datasets": ["allenai/MADLAD-400"], "language": ["multilingual", "en", "ru", "es", "fr", "de", "it", "pt", "pl", "nl", "vi", "tr", "sv", "id", "ro", "cs", "zh", "hu", "ja", "th", "fi", "fa", "uk", "da", "el", "no", "bg", "sk", "ko", "ar", "lt", "ca", "sl", "he", "et", "lv", "hi", "sq", "ms", "az", "sr", "ta", "hr", "kk", "is", "ml", "mr", "te", "af", "gl", "fil", "be", "mk", "eu", "bn", "ka", "mn", "bs", "uz", "ur", "sw", "yue", "ne", "kn", "kaa", "gu", "si", "cy", "eo", "la", "hy", "ky", "tg", "ga", "mt", "my", "km", "tt", "so", "ku", "ps", "pa", "rw", "lo", "ha", "dv", "fy", "lb", "ckb", "mg", "gd", "am", "ug", "ht", "grc", "hmn", "sd", "jv", "mi", "tk", "ceb", "yi", "ba", "fo", "or", "xh", "su", "kl", "ny", "sm", "sn", "co", "zu", "ig", "yo", "pap", "st", "haw", "as", "oc", "cv", "lus", "tet", "gsw", "sah", "br", "rm", "sa", "bo", "om", "se", "ce", "cnh", "ilo", "hil", "udm", "os", "lg", "ti", "vec", "ts", "tyv", "kbd", "ee", "iba", "av", "kha", "to", "tn", "nso", "fj", "zza", "ak", "ada", "otq", "dz", "bua", "cfm", "ln", "chm", "gn", "krc", "wa", "hif", "yua", "srn", "war", "rom", "bik", "pam", "sg", "lu", "ady", "kbp", "syr", "ltg", "myv", "iso", "kac", "bho", "ay", "kum", "qu", "za", "pag", "ngu", "ve", "pck", "zap", "tyz", "hui", "bbc", "tzo", "tiv", "ksd", "gom", "min", "ang", "nhe", "bgp", "nzi", "nnb", "nv", "zxx", "bci", "kv", "new", "mps", "alt", "meu", "bew", "fon", "iu", "abt", "mgh", "mnw", "tvl", "dov", "tlh", "ho", "kw", "mrj", "meo", "crh", "mbt", "emp", "ace", "ium", "mam", "gym", "mai", "crs", "pon", "ubu", "fip", "quc", "gv", "kj", "btx", "ape", "chk", "rcf", "shn", "tzh", "mdf", "ppk", "ss", "gag", "cab", "kri", "seh", "ibb", "tbz", "bru", "enq", "ach", "cuk", "kmb", "wo", "kek", "qub", "tab", "bts", "kos", "rwo", "cak", "tuc", "bum", "cjk", "gil", "stq", "tsg", "quh", "mak", "arn", "ban", "jiv", "sja", "yap", "tcy", "toj", "twu", "xal", "amu", "rmc", "hus", "nia", "kjh", "bm", "guh", "mas", "acf", "dtp", "ksw", "bzj", "din", "zne", "mad", "msi", "mag", "mkn", "kg", "lhu", "ch", "qvi", "mh", "djk", "sus", "mfe", "srm", "dyu", "ctu", "gui", "pau", "inb", "bi", "mni", "guc", "jam", "wal", "jac", "bas", "gor", "skr", "nyu", "noa", "sda", "gub", "nog", "cni", "teo", "tdx", "sxn", "rki", "nr", "frp", "alz", "taj", "lrc", "cce", "rn", "jvn", "hvn", "nij", "dwr", "izz", "msm", "bus", "ktu", "chr", "maz", "tzj", "suz", "knj", "bim", "gvl", "bqc", "tca", "pis", "prk", "laj", "mel", "qxr", "niq", "ahk", "shp", "hne", "spp", "koi", "krj", "quf", "luz", "agr", "tsc", "mqy", "gof", "gbm", "miq", "dje", "awa", "bjj", "qvz", "sjp", "tll", "raj", "kjg", "bgz", "quy", "cbk", "akb", "oj", "ify", "mey", "ks", "cac", "brx", "qup", "syl", "jax", "ff", "ber", "tks", "trp", "mrw", "adh", "smt", "srr", "ffm", "qvc", "mtr", "ann", "kaa", "aa", "noe", "nut", "gyn", "kwi", "xmm", "msb"], "library_name": "transformers", "license": "apache-2.0", "pipeline_tag": "translation", "tags": ["text2text-generation", "text-generation-inference", "llama-cpp", "gguf-my-repo"], "widget": [{"text": "<2en> Como vai, amigo?", "example_title": "Translation to English"}, {"text": "<2de> Do you speak German?", "example_title": "Translation to German"}]}
task
[ "TRANSLATION" ]
46,484
weakit-v/tinyroberta-squad2-onnx
weakit-v
question-answering
[ "transformers", "onnx", "roberta", "question-answering", "en", "dataset:squad_v2", "arxiv:1909.10351", "license:cc-by-4.0", "model-index", "endpoints_compatible", "region:us" ]
2023-12-25T16:55:37Z
2023-12-25T16:58:36+00:00
10
0
--- datasets: - squad_v2 language: en license: cc-by-4.0 model-index: - name: deepset/tinyroberta-squad2 results: - task: type: question-answering name: Question Answering dataset: name: squad_v2 type: squad_v2 config: squad_v2 split: validation metrics: - type: exact_match value: 78.8627 name: Exact Match verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNDNlZDU4ODAxMzY5NGFiMTMyZmQ1M2ZhZjMyODA1NmFlOGMxNzYxNTA4OGE5YTBkZWViZjBkNGQ2ZmMxZjVlMCIsInZlcnNpb24iOjF9.Wgu599r6TvgMLTrHlLMVAbUtKD_3b70iJ5QSeDQ-bRfUsVk6Sz9OsJCp47riHJVlmSYzcDj_z_3jTcUjCFFXBg - type: f1 value: 82.0355 name: F1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOTFkMzEzMWNiZDRhMGZlODhkYzcwZTZiMDFjZDg2YjllZmUzYWM5NTgwNGQ2NGYyMDk2ZGQwN2JmMTE5NTc3YiIsInZlcnNpb24iOjF9.ChgaYpuRHd5WeDFjtiAHUyczxtoOD_M5WR8834jtbf7wXhdGOnZKdZ1KclmhoI5NuAGc1NptX-G0zQ5FTHEcBA - task: type: question-answering name: Question Answering dataset: name: squad type: squad config: plain_text split: validation metrics: - type: exact_match value: 83.86 name: Exact Match - type: f1 value: 90.752 name: F1 - task: type: question-answering name: Question Answering dataset: name: adversarial_qa type: adversarial_qa config: adversarialQA split: validation metrics: - type: exact_match value: 25.967 name: Exact Match - type: f1 value: 37.006 name: F1 - task: type: question-answering name: Question Answering dataset: name: squad_adversarial type: squad_adversarial config: AddOneSent split: validation metrics: - type: exact_match value: 76.329 name: Exact Match - type: f1 value: 83.292 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts amazon type: squadshifts config: amazon split: test metrics: - type: exact_match value: 63.915 name: Exact Match - type: f1 value: 78.395 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts new_wiki type: squadshifts config: new_wiki split: test metrics: - type: exact_match value: 80.297 name: Exact Match - type: f1 value: 89.808 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts nyt type: squadshifts config: nyt split: test metrics: - type: exact_match value: 80.149 name: Exact Match - type: f1 value: 88.321 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts reddit type: squadshifts config: reddit split: test metrics: - type: exact_match value: 66.959 name: Exact Match - type: f1 value: 79.3 name: F1 --- **This repo contains the model exported to ONNX weights.** **Everything is provided as-is.** --- # tinyroberta-squad2 This is the *distilled* version of the [deepset/roberta-base-squad2](https://huggingface.co/deepset/roberta-base-squad2) model. This model has a comparable prediction quality and runs at twice the speed of the base model. ## Overview **Language model:** tinyroberta-squad2 **Language:** English **Downstream-task:** Extractive QA **Training data:** SQuAD 2.0 **Eval data:** SQuAD 2.0 **Code:** See [an example QA pipeline on Haystack](https://haystack.deepset.ai/tutorials/first-qa-system) **Infrastructure**: 4x Tesla v100 ## Hyperparameters ``` batch_size = 96 n_epochs = 4 base_LM_model = "deepset/tinyroberta-squad2-step1" max_seq_len = 384 learning_rate = 3e-5 lr_schedule = LinearWarmup warmup_proportion = 0.2 doc_stride = 128 max_query_length = 64 distillation_loss_weight = 0.75 temperature = 1.5 teacher = "deepset/robert-large-squad2" ``` ## Distillation This model was distilled using the TinyBERT approach described in [this paper](https://arxiv.org/pdf/1909.10351.pdf) and implemented in [haystack](https://github.com/deepset-ai/haystack). Firstly, we have performed intermediate layer distillation with roberta-base as the teacher which resulted in [deepset/tinyroberta-6l-768d](https://huggingface.co/deepset/tinyroberta-6l-768d). Secondly, we have performed task-specific distillation with [deepset/roberta-base-squad2](https://huggingface.co/deepset/roberta-base-squad2) as the teacher for further intermediate layer distillation on an augmented version of SQuADv2 and then with [deepset/roberta-large-squad2](https://huggingface.co/deepset/roberta-large-squad2) as the teacher for prediction layer distillation. ## Usage ### In Haystack Haystack is an NLP framework by deepset. You can use this model in a Haystack pipeline to do question answering at scale (over many documents). To load the model in [Haystack](https://github.com/deepset-ai/haystack/): ```python reader = FARMReader(model_name_or_path="deepset/tinyroberta-squad2") # or reader = TransformersReader(model_name_or_path="deepset/tinyroberta-squad2") ``` ### In Transformers ```python from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline model_name = "deepset/tinyroberta-squad2" # a) Get predictions nlp = pipeline('question-answering', model=model_name, tokenizer=model_name) QA_input = { 'question': 'Why is model conversion important?', 'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.' } res = nlp(QA_input) # b) Load model & tokenizer model = AutoModelForQuestionAnswering.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name) ``` ## Performance Evaluated on the SQuAD 2.0 dev set with the [official eval script](https://worksheets.codalab.org/rest/bundles/0x6b567e1cf2e041ec80d7098f031c5c9e/contents/blob/). ``` "exact": 78.69114798281817, "f1": 81.9198998536977, "total": 11873, "HasAns_exact": 76.19770580296895, "HasAns_f1": 82.66446878592329, "HasAns_total": 5928, "NoAns_exact": 81.17746005046257, "NoAns_f1": 81.17746005046257, "NoAns_total": 5945 ``` ## Authors **Branden Chan:** [email protected] **Timo Möller:** [email protected] **Malte Pietsch:** [email protected] **Tanay Soni:** [email protected] **Michel Bartels:** [email protected] ## About us <div class="grid lg:grid-cols-2 gap-x-4 gap-y-3"> <div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center"> <img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/deepset-logo-colored.png" class="w-40"/> </div> <div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center"> <img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/haystack-logo-colored.png" class="w-40"/> </div> </div> [deepset](http://deepset.ai/) is the company behind the open-source NLP framework [Haystack](https://haystack.deepset.ai/) which is designed to help you build production ready NLP systems that use: Question answering, summarization, ranking etc. Some of our other work: - [roberta-base-squad2]([https://huggingface.co/deepset/roberta-base-squad2) - [German BERT (aka "bert-base-german-cased")](https://deepset.ai/german-bert) - [GermanQuAD and GermanDPR datasets and models (aka "gelectra-base-germanquad", "gbert-base-germandpr")](https://deepset.ai/germanquad) ## Get in touch and join the Haystack community <p>For more info on Haystack, visit our <strong><a href="https://github.com/deepset-ai/haystack">GitHub</a></strong> repo and <strong><a href="https://docs.haystack.deepset.ai">Documentation</a></strong>. We also have a <strong><a class="h-7" href="https://haystack.deepset.ai/community/join">Discord community open to everyone!</a></strong></p> [Twitter](https://twitter.com/deepset_ai) | [LinkedIn](https://www.linkedin.com/company/deepset-ai/) | [Discord](https://haystack.deepset.ai/community) | [GitHub Discussions](https://github.com/deepset-ai/haystack/discussions) | [Website](https://deepset.ai) By the way: [we're hiring!](http://www.deepset.ai/jobs)
null
Non_BioNLP
**This repo contains the model exported to ONNX weights.** **Everything is provided as-is.** --- # tinyroberta-squad2 This is the *distilled* version of the [deepset/roberta-base-squad2](https://huggingface.co/deepset/roberta-base-squad2) model. This model has a comparable prediction quality and runs at twice the speed of the base model. ## Overview **Language model:** tinyroberta-squad2 **Language:** English **Downstream-task:** Extractive QA **Training data:** SQuAD 2.0 **Eval data:** SQuAD 2.0 **Code:** See [an example QA pipeline on Haystack](https://haystack.deepset.ai/tutorials/first-qa-system) **Infrastructure**: 4x Tesla v100 ## Hyperparameters ``` batch_size = 96 n_epochs = 4 base_LM_model = "deepset/tinyroberta-squad2-step1" max_seq_len = 384 learning_rate = 3e-5 lr_schedule = LinearWarmup warmup_proportion = 0.2 doc_stride = 128 max_query_length = 64 distillation_loss_weight = 0.75 temperature = 1.5 teacher = "deepset/robert-large-squad2" ``` ## Distillation This model was distilled using the TinyBERT approach described in [this paper](https://arxiv.org/pdf/1909.10351.pdf) and implemented in [haystack](https://github.com/deepset-ai/haystack). Firstly, we have performed intermediate layer distillation with roberta-base as the teacher which resulted in [deepset/tinyroberta-6l-768d](https://huggingface.co/deepset/tinyroberta-6l-768d). Secondly, we have performed task-specific distillation with [deepset/roberta-base-squad2](https://huggingface.co/deepset/roberta-base-squad2) as the teacher for further intermediate layer distillation on an augmented version of SQuADv2 and then with [deepset/roberta-large-squad2](https://huggingface.co/deepset/roberta-large-squad2) as the teacher for prediction layer distillation. ## Usage ### In Haystack Haystack is an NLP framework by deepset. You can use this model in a Haystack pipeline to do question answering at scale (over many documents). To load the model in [Haystack](https://github.com/deepset-ai/haystack/): ```python reader = FARMReader(model_name_or_path="deepset/tinyroberta-squad2") # or reader = TransformersReader(model_name_or_path="deepset/tinyroberta-squad2") ``` ### In Transformers ```python from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline model_name = "deepset/tinyroberta-squad2" # a) Get predictions nlp = pipeline('question-answering', model=model_name, tokenizer=model_name) QA_input = { 'question': 'Why is model conversion important?', 'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.' } res = nlp(QA_input) # b) Load model & tokenizer model = AutoModelForQuestionAnswering.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name) ``` ## Performance Evaluated on the SQuAD 2.0 dev set with the [official eval script](https://worksheets.codalab.org/rest/bundles/0x6b567e1cf2e041ec80d7098f031c5c9e/contents/blob/). ``` "exact": 78.69114798281817, "f1": 81.9198998536977, "total": 11873, "HasAns_exact": 76.19770580296895, "HasAns_f1": 82.66446878592329, "HasAns_total": 5928, "NoAns_exact": 81.17746005046257, "NoAns_f1": 81.17746005046257, "NoAns_total": 5945 ``` ## Authors **Branden Chan:** [email protected] **Timo Möller:** [email protected] **Malte Pietsch:** [email protected] **Tanay Soni:** [email protected] **Michel Bartels:** [email protected] ## About us <div class="grid lg:grid-cols-2 gap-x-4 gap-y-3"> <div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center"> <img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/deepset-logo-colored.png" class="w-40"/> </div> <div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center"> <img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/haystack-logo-colored.png" class="w-40"/> </div> </div> [deepset](http://deepset.ai/) is the company behind the open-source NLP framework [Haystack](https://haystack.deepset.ai/) which is designed to help you build production ready NLP systems that use: Question answering, summarization, ranking etc. Some of our other work: - [roberta-base-squad2]([https://huggingface.co/deepset/roberta-base-squad2) - [German BERT (aka "bert-base-german-cased")](https://deepset.ai/german-bert) - [GermanQuAD and GermanDPR datasets and models (aka "gelectra-base-germanquad", "gbert-base-germandpr")](https://deepset.ai/germanquad) ## Get in touch and join the Haystack community <p>For more info on Haystack, visit our <strong><a href="https://github.com/deepset-ai/haystack">GitHub</a></strong> repo and <strong><a href="https://docs.haystack.deepset.ai">Documentation</a></strong>. We also have a <strong><a class="h-7" href="https://haystack.deepset.ai/community/join">Discord community open to everyone!</a></strong></p> [Twitter](https://twitter.com/deepset_ai) | [LinkedIn](https://www.linkedin.com/company/deepset-ai/) | [Discord](https://haystack.deepset.ai/community) | [GitHub Discussions](https://github.com/deepset-ai/haystack/discussions) | [Website](https://deepset.ai) By the way: [we're hiring!](http://www.deepset.ai/jobs)
{"datasets": ["squad_v2"], "language": "en", "license": "cc-by-4.0", "model-index": [{"name": "deepset/tinyroberta-squad2", "results": [{"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "squad_v2", "type": "squad_v2", "config": "squad_v2", "split": "validation"}, "metrics": [{"type": "exact_match", "value": 78.8627, "name": "Exact Match", "verified": true, "verifyToken": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNDNlZDU4ODAxMzY5NGFiMTMyZmQ1M2ZhZjMyODA1NmFlOGMxNzYxNTA4OGE5YTBkZWViZjBkNGQ2ZmMxZjVlMCIsInZlcnNpb24iOjF9.Wgu599r6TvgMLTrHlLMVAbUtKD_3b70iJ5QSeDQ-bRfUsVk6Sz9OsJCp47riHJVlmSYzcDj_z_3jTcUjCFFXBg"}, {"type": "f1", "value": 82.0355, "name": "F1", "verified": true, "verifyToken": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOTFkMzEzMWNiZDRhMGZlODhkYzcwZTZiMDFjZDg2YjllZmUzYWM5NTgwNGQ2NGYyMDk2ZGQwN2JmMTE5NTc3YiIsInZlcnNpb24iOjF9.ChgaYpuRHd5WeDFjtiAHUyczxtoOD_M5WR8834jtbf7wXhdGOnZKdZ1KclmhoI5NuAGc1NptX-G0zQ5FTHEcBA"}]}, {"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "squad", "type": "squad", "config": "plain_text", "split": "validation"}, "metrics": [{"type": "exact_match", "value": 83.86, "name": "Exact Match"}, {"type": "f1", "value": 90.752, "name": "F1"}]}, {"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "adversarial_qa", "type": "adversarial_qa", "config": "adversarialQA", "split": "validation"}, "metrics": [{"type": "exact_match", "value": 25.967, "name": "Exact Match"}, {"type": "f1", "value": 37.006, "name": "F1"}]}, {"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "squad_adversarial", "type": "squad_adversarial", "config": "AddOneSent", "split": "validation"}, "metrics": [{"type": "exact_match", "value": 76.329, "name": "Exact Match"}, {"type": "f1", "value": 83.292, "name": "F1"}]}, {"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "squadshifts amazon", "type": "squadshifts", "config": "amazon", "split": "test"}, "metrics": [{"type": "exact_match", "value": 63.915, "name": "Exact Match"}, {"type": "f1", "value": 78.395, "name": "F1"}]}, {"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "squadshifts new_wiki", "type": "squadshifts", "config": "new_wiki", "split": "test"}, "metrics": [{"type": "exact_match", "value": 80.297, "name": "Exact Match"}, {"type": "f1", "value": 89.808, "name": "F1"}]}, {"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "squadshifts nyt", "type": "squadshifts", "config": "nyt", "split": "test"}, "metrics": [{"type": "exact_match", "value": 80.149, "name": "Exact Match"}, {"type": "f1", "value": 88.321, "name": "F1"}]}, {"task": {"type": "question-answering", "name": "Question Answering"}, "dataset": {"name": "squadshifts reddit", "type": "squadshifts", "config": "reddit", "split": "test"}, "metrics": [{"type": "exact_match", "value": 66.959, "name": "Exact Match"}, {"type": "f1", "value": 79.3, "name": "F1"}]}]}]}
task
[ "QUESTION_ANSWERING", "SUMMARIZATION" ]
46,485
YakovElm/Hyperledger15SetFitModel_Train_balance_ratio_1
YakovElm
text-classification
[ "sentence-transformers", "pytorch", "mpnet", "setfit", "text-classification", "arxiv:2209.11055", "license:apache-2.0", "region:us" ]
2023-06-09T19:45:47Z
2023-06-09T19:46:20+00:00
8
0
--- license: apache-2.0 pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification --- # YakovElm/Hyperledger15SetFitModel_Train_balance_ratio_1 This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("YakovElm/Hyperledger15SetFitModel_Train_balance_ratio_1") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
null
Non_BioNLP
# YakovElm/Hyperledger15SetFitModel_Train_balance_ratio_1 This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Usage To use this model for inference, first install the SetFit library: ```bash python -m pip install setfit ``` You can then run inference as follows: ```python from setfit import SetFitModel # Download from Hub and run inference model = SetFitModel.from_pretrained("YakovElm/Hyperledger15SetFitModel_Train_balance_ratio_1") # Run inference preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"]) ``` ## BibTeX entry and citation info ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
{"license": "apache-2.0", "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification"]}
task
[ "TEXT_CLASSIFICATION" ]
46,486
mini1013/master_cate_el16
mini1013
text-classification
[ "setfit", "safetensors", "roberta", "sentence-transformers", "text-classification", "generated_from_setfit_trainer", "arxiv:2209.11055", "base_model:mini1013/master_domain", "base_model:finetune:mini1013/master_domain", "model-index", "region:us" ]
2024-11-09T09:15:52Z
2024-11-09T09:16:17+00:00
651
0
--- base_model: mini1013/master_domain library_name: setfit metrics: - metric pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: WD NEW MY PASSPORT 외장SSD 1TB 외장하드 스마트폰 아이패드 XBOX 세븐컴 - text: '2.5인치 HDD SSD 보관 케이스 USB3.0 SATA 어답터 확장 외장하드 케이스 선택1: 2.5인치 HDD SSD 하드 보관함 퀄리티어슈어런스코리아' - text: 이지넷 NEXT-350U3 3.5 외장케이스/USB3.0 하드미포함 레알몰 - text: NEXT-644DU3 4베이 HDD SSD USB3.0 도킹스테이션 프리줌 - text: Seagate IronWolf NAS ST1000VN002 1TB AS3년/공식판매점 (주)픽셀아트 (PIXELART) inference: true model-index: - name: SetFit with mini1013/master_domain results: - task: type: text-classification name: Text Classification dataset: name: Unknown type: unknown split: test metrics: - type: metric value: 0.7785757031717534 name: Metric --- # SetFit with mini1013/master_domain This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 12 classes <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 3 | <ul><li>'키오시아 EXCERIA PLUS G3 M.2 NVMe 엄지척스토어'</li><li>'[키오시아] EXCERIA G2 M.2 NVMe (500GB) 주식회사 에티버스이비티'</li><li>'ADATA Ultimate SU650 120GB 밀알시스템'</li></ul> | | 1 | <ul><li>'시놀로지 Expansion Unit DX517 (5베이/하드미포함) 타워형 확장 유닛 DS1817+, DS1517+ (주)비엔지센터'</li><li>'[아이피타임 쇼핑몰] NAS1 dual 1베이 나스 (하드미포함) (주)에이치앤인터내셔널'</li><li>'시놀로지 정품 나스 DS223 2베이 NAS 스토리지 클라우드 서버 구축 시놀로지 NAS DS223 유심홀릭'</li></ul> | | 0 | <ul><li>'씨게이트 바라쿠다 1TB ST1000DM010 SATA3 64M 1테라 하드 오늘 출발 주식회사 호스트시스템'</li><li>'WD BLUE (WD20EZBX) 3.5 SATA HDD (2TB/7200rpm/256MB/SMR) 아이코다(주)'</li><li>'씨게이트 IronWolf 8TB ST8000VN004 (SATA3/7200/256M) (주)조이젠'</li></ul> | | 4 | <ul><li>'Sandisk Extreme Pro CZ880 (128GB) (주)아이티엔조이'</li><li>'Sandisk Cruzer Glide CZ600 (16GB) 컴튜브 주식회사'</li><li>'샌디스크 울트라 핏 USB 3.1 32GB Ultra Fit CZ430 초소형 주식회사 에스티원테크'</li></ul> | | 6 | <ul><li>'NEXT-DC3011TS 1:11 HDD SSD 스마트 하드복사 삭제기 리벤플러스'</li><li>'넥시 NX-802RU31 2베이 RAID 데이터 스토리지 하드 도킹스테이션 (NX768) 대성NETWORK'</li><li>'넥시 USB3.1 C타입 2베이 DAS 데이터 스토리지 NX768 (주)팁스커뮤니케이션즈'</li></ul> | | 11 | <ul><li>'이지넷유비쿼터스 NEXT-215U3 (하드미포함) (주)컴파크씨앤씨'</li><li>'ORICO PHP-35 보라 3.5인치 하드 보호케이스 (주)조이젠'</li><li>'[ORICO] PHP-35 3.5형 하드디스크 보관함 [블루] (주)컴퓨존'</li></ul> | | 2 | <ul><li>'(주)근호컴 [라인업시스템]LS-EXODDC 외장ODD (주)근호컴'</li><li>'[라인업시스템] LANSTAR LS-BRODD 블루레이 외장ODD 주식회사 에티버스이비티'</li><li>'넥스트유 NEXT-200DVD-RW USB3.0 DVD-RW 드라이브 ) (주)인컴씨엔에스'</li></ul> | | 5 | <ul><li>'(주)근호컴 [멜로디]1P 투명 연질 CD/DVD 케이스 (10장) (주)근호컴'</li><li>'HP CD-R 10P / 52X 700MB / 원통케이스 포장 제품 티앤제이 (T&J) 통상'</li><li>'엑토 CD롬컨테이너_50매입 CDC-50K /CD보관함/CD케이스/씨디보관함/씨디케이스/cd정리함 CDC-50K 아이보리 솔로몬샵'</li></ul> | | 9 | <ul><li>'시놀로지 비드라이브 BDS70-1T BeeDrive 1TB 외장SSD 개인 백업허브 정품 솔루션 웍스(Solution Works)'</li><li>'CORSAIR EX100U Portable SSD Type C (1TB) (주)아이티엔조이'</li><li>'ASUS ROG STRIX ARION ESD-S1C M 2 NVMe SSD 외장케이스 (주)아이웍스'</li></ul> | | 8 | <ul><li>'넥스트유 NEXT-651DCU3 도킹스테이션 2베이 (주)수빈인포텍'</li><li>'이지넷유비쿼터스 넥스트유 659CCU3 도킹 스테이션 주식회사 매커드'</li><li>'이지넷유비쿼터스 NEXT-644DU3 4베이 도킹스테이션 에이치엠에스'</li></ul> | | 10 | <ul><li>'USB3.0 4베이 DAS 스토리지 NX770 (주)담다몰'</li><li>'[NEXI] NX-804RU30 외장 케이스 HDD SSD USB 3.0 4베이 하드 도킹스테이션 NX770 주식회사 유진정보통신'</li><li>'[NEXI] 넥시 NX-804RU30 RAID (4베이) [USB3.0] [NX770] [DAS] [하드미포함] (주)컴퓨존'</li></ul> | | 7 | <ul><li>'USB3.0 하드 도킹스테이션 복제 복사 클론 복사기 HDD SSD 2.5인치 3.5인치 듀얼 외장하드 케이스 Q6GCLONE 퀄리티어슈런스'</li><li>'USB3.0 하드 도킹스테이션 복제 복사 클론 복사기 HDD SSD 2.5인치 3.5인치 듀얼 외장하드 케이스 28TB지원 퀄리티어슈런스'</li><li>'NEXT 652DCU3 HDD복제기능탑재/도킹스테이션/2.5인치/3.5인치/백업/클론기능 마하링크'</li></ul> | ## Evaluation ### Metrics | Label | Metric | |:--------|:-------| | **all** | 0.7786 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("mini1013/master_cate_el16") # Run inference preds = model("이지넷 NEXT-350U3 3.5 외장케이스/USB3.0 하드미포함 레알몰") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 4 | 9.6059 | 20 | | Label | Training Sample Count | |:------|:----------------------| | 0 | 50 | | 1 | 50 | | 2 | 50 | | 3 | 50 | | 4 | 50 | | 5 | 50 | | 6 | 50 | | 7 | 3 | | 8 | 50 | | 9 | 50 | | 10 | 7 | | 11 | 50 | ### Training Hyperparameters - batch_size: (512, 512) - num_epochs: (20, 20) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 40 - body_learning_rate: (2e-05, 2e-05) - head_learning_rate: 2e-05 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0125 | 1 | 0.497 | - | | 0.625 | 50 | 0.2348 | - | | 1.25 | 100 | 0.0733 | - | | 1.875 | 150 | 0.0254 | - | | 2.5 | 200 | 0.0165 | - | | 3.125 | 250 | 0.0122 | - | | 3.75 | 300 | 0.0021 | - | | 4.375 | 350 | 0.0024 | - | | 5.0 | 400 | 0.001 | - | | 5.625 | 450 | 0.0019 | - | | 6.25 | 500 | 0.0002 | - | | 6.875 | 550 | 0.0007 | - | | 7.5 | 600 | 0.0009 | - | | 8.125 | 650 | 0.0002 | - | | 8.75 | 700 | 0.0002 | - | | 9.375 | 750 | 0.0003 | - | | 10.0 | 800 | 0.0002 | - | | 10.625 | 850 | 0.0002 | - | | 11.25 | 900 | 0.0002 | - | | 11.875 | 950 | 0.0001 | - | | 12.5 | 1000 | 0.0001 | - | | 13.125 | 1050 | 0.0001 | - | | 13.75 | 1100 | 0.0001 | - | | 14.375 | 1150 | 0.0001 | - | | 15.0 | 1200 | 0.0001 | - | | 15.625 | 1250 | 0.0001 | - | | 16.25 | 1300 | 0.0001 | - | | 16.875 | 1350 | 0.0001 | - | | 17.5 | 1400 | 0.0001 | - | | 18.125 | 1450 | 0.0001 | - | | 18.75 | 1500 | 0.0001 | - | | 19.375 | 1550 | 0.0001 | - | | 20.0 | 1600 | 0.0001 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.1.0.dev0 - Sentence Transformers: 3.1.1 - Transformers: 4.46.1 - PyTorch: 2.4.0+cu121 - Datasets: 2.20.0 - Tokenizers: 0.20.0 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
null
Non_BioNLP
# SetFit with mini1013/master_domain This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 12 classes <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 3 | <ul><li>'키오시아 EXCERIA PLUS G3 M.2 NVMe 엄지척스토어'</li><li>'[키오시아] EXCERIA G2 M.2 NVMe (500GB) 주식회사 에티버스이비티'</li><li>'ADATA Ultimate SU650 120GB 밀알시스템'</li></ul> | | 1 | <ul><li>'시놀로지 Expansion Unit DX517 (5베이/하드미포함) 타워형 확장 유닛 DS1817+, DS1517+ (주)비엔지센터'</li><li>'[아이피타임 쇼핑몰] NAS1 dual 1베이 나스 (하드미포함) (주)에이치앤인터내셔널'</li><li>'시놀로지 정품 나스 DS223 2베이 NAS 스토리지 클라우드 서버 구축 시놀로지 NAS DS223 유심홀릭'</li></ul> | | 0 | <ul><li>'씨게이트 바라쿠다 1TB ST1000DM010 SATA3 64M 1테라 하드 오늘 출발 주식회사 호스트시스템'</li><li>'WD BLUE (WD20EZBX) 3.5 SATA HDD (2TB/7200rpm/256MB/SMR) 아이코다(주)'</li><li>'씨게이트 IronWolf 8TB ST8000VN004 (SATA3/7200/256M) (주)조이젠'</li></ul> | | 4 | <ul><li>'Sandisk Extreme Pro CZ880 (128GB) (주)아이티엔조이'</li><li>'Sandisk Cruzer Glide CZ600 (16GB) 컴튜브 주식회사'</li><li>'샌디스크 울트라 핏 USB 3.1 32GB Ultra Fit CZ430 초소형 주식회사 에스티원테크'</li></ul> | | 6 | <ul><li>'NEXT-DC3011TS 1:11 HDD SSD 스마트 하드복사 삭제기 리벤플러스'</li><li>'넥시 NX-802RU31 2베이 RAID 데이터 스토리지 하드 도킹스테이션 (NX768) 대성NETWORK'</li><li>'넥시 USB3.1 C타입 2베이 DAS 데이터 스토리지 NX768 (주)팁스커뮤니케이션즈'</li></ul> | | 11 | <ul><li>'이지넷유비쿼터스 NEXT-215U3 (하드미포함) (주)컴파크씨앤씨'</li><li>'ORICO PHP-35 보라 3.5인치 하드 보호케이스 (주)조이젠'</li><li>'[ORICO] PHP-35 3.5형 하드디스크 보관함 [블루] (주)컴퓨존'</li></ul> | | 2 | <ul><li>'(주)근호컴 [라인업시스템]LS-EXODDC 외장ODD (주)근호컴'</li><li>'[라인업시스템] LANSTAR LS-BRODD 블루레이 외장ODD 주식회사 에티버스이비티'</li><li>'넥스트유 NEXT-200DVD-RW USB3.0 DVD-RW 드라이브 ) (주)인컴씨엔에스'</li></ul> | | 5 | <ul><li>'(주)근호컴 [멜로디]1P 투명 연질 CD/DVD 케이스 (10장) (주)근호컴'</li><li>'HP CD-R 10P / 52X 700MB / 원통케이스 포장 제품 티앤제이 (T&J) 통상'</li><li>'엑토 CD롬컨테이너_50매입 CDC-50K /CD보관함/CD케이스/씨디보관함/씨디케이스/cd정리함 CDC-50K 아이보리 솔로몬샵'</li></ul> | | 9 | <ul><li>'시놀로지 비드라이브 BDS70-1T BeeDrive 1TB 외장SSD 개인 백업허브 정품 솔루션 웍스(Solution Works)'</li><li>'CORSAIR EX100U Portable SSD Type C (1TB) (주)아이티엔조이'</li><li>'ASUS ROG STRIX ARION ESD-S1C M 2 NVMe SSD 외장케이스 (주)아이웍스'</li></ul> | | 8 | <ul><li>'넥스트유 NEXT-651DCU3 도킹스테이션 2베이 (주)수빈인포텍'</li><li>'이지넷유비쿼터스 넥스트유 659CCU3 도킹 스테이션 주식회사 매커드'</li><li>'이지넷유비쿼터스 NEXT-644DU3 4베이 도킹스테이션 에이치엠에스'</li></ul> | | 10 | <ul><li>'USB3.0 4베이 DAS 스토리지 NX770 (주)담다몰'</li><li>'[NEXI] NX-804RU30 외장 케이스 HDD SSD USB 3.0 4베이 하드 도킹스테이션 NX770 주식회사 유진정보통신'</li><li>'[NEXI] 넥시 NX-804RU30 RAID (4베이) [USB3.0] [NX770] [DAS] [하드미포함] (주)컴퓨존'</li></ul> | | 7 | <ul><li>'USB3.0 하드 도킹스테이션 복제 복사 클론 복사기 HDD SSD 2.5인치 3.5인치 듀얼 외장하드 케이스 Q6GCLONE 퀄리티어슈런스'</li><li>'USB3.0 하드 도킹스테이션 복제 복사 클론 복사기 HDD SSD 2.5인치 3.5인치 듀얼 외장하드 케이스 28TB지원 퀄리티어슈런스'</li><li>'NEXT 652DCU3 HDD복제기능탑재/도킹스테이션/2.5인치/3.5인치/백업/클론기능 마하링크'</li></ul> | ## Evaluation ### Metrics | Label | Metric | |:--------|:-------| | **all** | 0.7786 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("mini1013/master_cate_el16") # Run inference preds = model("이지넷 NEXT-350U3 3.5 외장케이스/USB3.0 하드미포함 레알몰") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### 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 ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 4 | 9.6059 | 20 | | Label | Training Sample Count | |:------|:----------------------| | 0 | 50 | | 1 | 50 | | 2 | 50 | | 3 | 50 | | 4 | 50 | | 5 | 50 | | 6 | 50 | | 7 | 3 | | 8 | 50 | | 9 | 50 | | 10 | 7 | | 11 | 50 | ### Training Hyperparameters - batch_size: (512, 512) - num_epochs: (20, 20) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 40 - body_learning_rate: (2e-05, 2e-05) - head_learning_rate: 2e-05 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0125 | 1 | 0.497 | - | | 0.625 | 50 | 0.2348 | - | | 1.25 | 100 | 0.0733 | - | | 1.875 | 150 | 0.0254 | - | | 2.5 | 200 | 0.0165 | - | | 3.125 | 250 | 0.0122 | - | | 3.75 | 300 | 0.0021 | - | | 4.375 | 350 | 0.0024 | - | | 5.0 | 400 | 0.001 | - | | 5.625 | 450 | 0.0019 | - | | 6.25 | 500 | 0.0002 | - | | 6.875 | 550 | 0.0007 | - | | 7.5 | 600 | 0.0009 | - | | 8.125 | 650 | 0.0002 | - | | 8.75 | 700 | 0.0002 | - | | 9.375 | 750 | 0.0003 | - | | 10.0 | 800 | 0.0002 | - | | 10.625 | 850 | 0.0002 | - | | 11.25 | 900 | 0.0002 | - | | 11.875 | 950 | 0.0001 | - | | 12.5 | 1000 | 0.0001 | - | | 13.125 | 1050 | 0.0001 | - | | 13.75 | 1100 | 0.0001 | - | | 14.375 | 1150 | 0.0001 | - | | 15.0 | 1200 | 0.0001 | - | | 15.625 | 1250 | 0.0001 | - | | 16.25 | 1300 | 0.0001 | - | | 16.875 | 1350 | 0.0001 | - | | 17.5 | 1400 | 0.0001 | - | | 18.125 | 1450 | 0.0001 | - | | 18.75 | 1500 | 0.0001 | - | | 19.375 | 1550 | 0.0001 | - | | 20.0 | 1600 | 0.0001 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.1.0.dev0 - Sentence Transformers: 3.1.1 - Transformers: 4.46.1 - PyTorch: 2.4.0+cu121 - Datasets: 2.20.0 - Tokenizers: 0.20.0 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## 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.* -->
{"base_model": "mini1013/master_domain", "library_name": "setfit", "metrics": ["metric"], "pipeline_tag": "text-classification", "tags": ["setfit", "sentence-transformers", "text-classification", "generated_from_setfit_trainer"], "widget": [{"text": "WD NEW MY PASSPORT 외장SSD 1TB 외장하드 스마트폰 아이패드 XBOX 세븐컴"}, {"text": "2.5인치 HDD SSD 보관 케이스 USB3.0 SATA 어답터 확장 외장하드 케이스 선택1: 2.5인치 HDD SSD 하드 보관함 퀄리티어슈어런스코리아"}, {"text": "이지넷 NEXT-350U3 3.5 외장케이스/USB3.0 하드미포함 레알몰"}, {"text": "NEXT-644DU3 4베이 HDD SSD USB3.0 도킹스테이션 프리줌"}, {"text": "Seagate IronWolf NAS ST1000VN002 1TB AS3년/공식판매점 (주)픽셀아트 (PIXELART)"}], "inference": true, "model-index": [{"name": "SetFit with mini1013/master_domain", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "Unknown", "type": "unknown", "split": "test"}, "metrics": [{"type": "metric", "value": 0.7785757031717534, "name": "Metric"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,487
bisoye/distilbert-base-uncased-finetuned-clinc
bisoye
text-classification
[ "transformers", "tensorboard", "safetensors", "distilbert", "text-classification", "generated_from_trainer", "dataset:clinc_oos", "base_model:distilbert/distilbert-base-uncased", "base_model:finetune:distilbert/distilbert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-03-19T19:58:50Z
2024-03-19T22:38:07+00:00
16
0
--- base_model: distilbert-base-uncased datasets: - clinc_oos license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: distilbert-base-uncased-finetuned-clinc results: - task: type: text-classification name: Text Classification dataset: name: clinc_oos type: clinc_oos config: plus split: validation args: plus metrics: - type: accuracy value: 0.9135483870967742 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-clinc This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the clinc_oos dataset. It achieves the following results on the evaluation set: - Loss: 0.8068 - Accuracy: 0.9135 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 48 - eval_batch_size: 48 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | No log | 1.0 | 318 | 3.3144 | 0.7206 | | 3.8129 | 2.0 | 636 | 1.9134 | 0.8474 | | 3.8129 | 3.0 | 954 | 1.1920 | 0.8855 | | 1.7365 | 4.0 | 1272 | 0.8920 | 0.9113 | | 0.9362 | 5.0 | 1590 | 0.8068 | 0.9135 | ### Framework versions - Transformers 4.38.1 - Pytorch 2.1.2 - Datasets 2.1.0 - Tokenizers 0.15.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-clinc This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the clinc_oos dataset. It achieves the following results on the evaluation set: - Loss: 0.8068 - Accuracy: 0.9135 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 48 - eval_batch_size: 48 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | No log | 1.0 | 318 | 3.3144 | 0.7206 | | 3.8129 | 2.0 | 636 | 1.9134 | 0.8474 | | 3.8129 | 3.0 | 954 | 1.1920 | 0.8855 | | 1.7365 | 4.0 | 1272 | 0.8920 | 0.9113 | | 0.9362 | 5.0 | 1590 | 0.8068 | 0.9135 | ### Framework versions - Transformers 4.38.1 - Pytorch 2.1.2 - Datasets 2.1.0 - Tokenizers 0.15.2
{"base_model": "distilbert-base-uncased", "datasets": ["clinc_oos"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert-base-uncased-finetuned-clinc", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "clinc_oos", "type": "clinc_oos", "config": "plus", "split": "validation", "args": "plus"}, "metrics": [{"type": "accuracy", "value": 0.9135483870967742, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,488
prithivMLmods/Bellatrix-1.5B-xElite
prithivMLmods
text-generation
[ "transformers", "safetensors", "qwen2", "text-generation", "qwen", "qwq", "conversational", "en", "base_model:Qwen/Qwen2.5-1.5B-Instruct", "base_model:finetune:Qwen/Qwen2.5-1.5B-Instruct", "license:apache-2.0", "model-index", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2025-01-25T17:27:31Z
2025-01-27T14:29:28+00:00
105
3
--- base_model: - Qwen/Qwen2.5-1.5B-Instruct language: - en library_name: transformers license: apache-2.0 pipeline_tag: text-generation tags: - qwen - qwq model-index: - name: Bellatrix-1.5B-xElite results: - task: type: text-generation name: Text Generation dataset: name: IFEval (0-Shot) type: wis-k/instruction-following-eval split: train args: num_few_shot: 0 metrics: - type: inst_level_strict_acc and prompt_level_strict_acc value: 19.64 name: averaged accuracy source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: BBH (3-Shot) type: SaylorTwift/bbh split: test args: num_few_shot: 3 metrics: - type: acc_norm value: 9.49 name: normalized accuracy source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MATH Lvl 5 (4-Shot) type: lighteval/MATH-Hard split: test args: num_few_shot: 4 metrics: - type: exact_match value: 12.61 name: exact match source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: GPQA (0-shot) type: Idavidrein/gpqa split: train args: num_few_shot: 0 metrics: - type: acc_norm value: 3.8 name: acc_norm source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MuSR (0-shot) type: TAUR-Lab/MuSR args: num_few_shot: 0 metrics: - type: acc_norm value: 4.44 name: acc_norm source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MMLU-PRO (5-shot) type: TIGER-Lab/MMLU-Pro config: main split: test args: num_few_shot: 5 metrics: - type: acc value: 7.3 name: accuracy source: url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite name: Open LLM Leaderboard --- <pre align="center"> ____ ____ __ __ __ ____ ____ ____ _ _ ( _ \( ___)( ) ( ) /__\ (_ _)( _ \(_ _)( \/ ) ) _ < )__) )(__ )(__ /(__)\ )( ) / _)(_ ) ( (____/(____)(____)(____)(__)(__)(__) (_)\_)(____)(_/\_) </pre> # **Bellatrix-1.5B-xElite** Bellatrix-1.5B-xElite is based on a reasoning-based model designed for the QWQ synthetic dataset entries. The pipeline's instruction-tuned, text-only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. These models outperform many of the available open-source options. Bellatrix is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions utilize supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF). # **Quickstart with Transformers** Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents. ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "prithivMLmods/Bellatrix-1.5B-xElite" model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype="auto", device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained(model_name) prompt = "Give me a short introduction to large language model." messages = [ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."}, {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) model_inputs = tokenizer([text], return_tensors="pt").to(model.device) generated_ids = model.generate( **model_inputs, max_new_tokens=512 ) generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) ] response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] ``` # **Intended Use:** 1. **Multilingual Dialogue Systems:** - Designed for conversational AI applications, capable of handling dialogue across multiple languages. - Useful in customer service, chatbots, and other dialogue-centric use cases. 2. **Reasoning and QWQ Dataset Applications:** - Optimized for tasks requiring logical reasoning and contextual understanding, particularly in synthetic datasets like QWQ. 3. **Agentic Retrieval:** - Supports retrieval-augmented generation tasks, helping systems fetch and synthesize information effectively. 4. **Summarization Tasks:** - Excels in summarizing long or complex text while maintaining coherence and relevance. 5. **Instruction-Following Tasks:** - Can execute tasks based on specific user instructions due to instruction-tuning during training. 6. **Language Generation:** - Suitable for generating coherent and contextually relevant text in various domains and styles. # **Limitations:** 1. **Synthetic Dataset Bias:** - Optimization for QWQ and similar datasets may make the model less effective on real-world or less structured data. 2. **Data Dependency:** - Performance may degrade on tasks or languages not well-represented in the training dataset. 3. **Computational Requirements:** - The optimized transformer architecture may demand significant computational resources, especially for fine-tuning or large-scale deployments. 4. **Potential Hallucinations:** - Like most auto-regressive models, it may generate plausible-sounding but factually incorrect or nonsensical outputs. 5. **RLHF-Specific Biases:** - Reinforcement Learning with Human Feedback (RLHF) can introduce biases based on the preferences of the annotators involved in the feedback process. 6. **Limited Domain Adaptability:** - While effective in reasoning and dialogue tasks, it may struggle with highly specialized domains or out-of-distribution tasks. 7. **Multilingual Limitations:** - Although optimized for multilingual use, certain low-resource languages may exhibit poorer performance compared to high-resource ones. 8. **Ethical Concerns:** - May inadvertently generate inappropriate or harmful content if safeguards are not applied, particularly in sensitive applications. 9. **Real-Time Usability:** - Latency in inference time could limit its effectiveness in real-time applications or when scaling to large user bases. # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/prithivMLmods__Bellatrix-1.5B-xElite-details)! Summarized results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/contents/viewer/default/train?q=prithivMLmods%2FBellatrix-1.5B-xElite&sort[column]=Average%20%E2%AC%86%EF%B8%8F&sort[direction]=desc)! | Metric |Value (%)| |-------------------|--------:| |**Average** | 9.55| |IFEval (0-Shot) | 19.64| |BBH (3-Shot) | 9.49| |MATH Lvl 5 (4-Shot)| 12.61| |GPQA (0-shot) | 3.80| |MuSR (0-shot) | 4.44| |MMLU-PRO (5-shot) | 7.30|
null
Non_BioNLP
<pre align="center"> ____ ____ __ __ __ ____ ____ ____ _ _ ( _ \( ___)( ) ( ) /__\ (_ _)( _ \(_ _)( \/ ) ) _ < )__) )(__ )(__ /(__)\ )( ) / _)(_ ) ( (____/(____)(____)(____)(__)(__)(__) (_)\_)(____)(_/\_) </pre> # **Bellatrix-1.5B-xElite** Bellatrix-1.5B-xElite is based on a reasoning-based model designed for the QWQ synthetic dataset entries. The pipeline's instruction-tuned, text-only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. These models outperform many of the available open-source options. Bellatrix is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions utilize supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF). # **Quickstart with Transformers** Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents. ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "prithivMLmods/Bellatrix-1.5B-xElite" model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype="auto", device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained(model_name) prompt = "Give me a short introduction to large language model." messages = [ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."}, {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) model_inputs = tokenizer([text], return_tensors="pt").to(model.device) generated_ids = model.generate( **model_inputs, max_new_tokens=512 ) generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) ] response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] ``` # **Intended Use:** 1. **Multilingual Dialogue Systems:** - Designed for conversational AI applications, capable of handling dialogue across multiple languages. - Useful in customer service, chatbots, and other dialogue-centric use cases. 2. **Reasoning and QWQ Dataset Applications:** - Optimized for tasks requiring logical reasoning and contextual understanding, particularly in synthetic datasets like QWQ. 3. **Agentic Retrieval:** - Supports retrieval-augmented generation tasks, helping systems fetch and synthesize information effectively. 4. **Summarization Tasks:** - Excels in summarizing long or complex text while maintaining coherence and relevance. 5. **Instruction-Following Tasks:** - Can execute tasks based on specific user instructions due to instruction-tuning during training. 6. **Language Generation:** - Suitable for generating coherent and contextually relevant text in various domains and styles. # **Limitations:** 1. **Synthetic Dataset Bias:** - Optimization for QWQ and similar datasets may make the model less effective on real-world or less structured data. 2. **Data Dependency:** - Performance may degrade on tasks or languages not well-represented in the training dataset. 3. **Computational Requirements:** - The optimized transformer architecture may demand significant computational resources, especially for fine-tuning or large-scale deployments. 4. **Potential Hallucinations:** - Like most auto-regressive models, it may generate plausible-sounding but factually incorrect or nonsensical outputs. 5. **RLHF-Specific Biases:** - Reinforcement Learning with Human Feedback (RLHF) can introduce biases based on the preferences of the annotators involved in the feedback process. 6. **Limited Domain Adaptability:** - While effective in reasoning and dialogue tasks, it may struggle with highly specialized domains or out-of-distribution tasks. 7. **Multilingual Limitations:** - Although optimized for multilingual use, certain low-resource languages may exhibit poorer performance compared to high-resource ones. 8. **Ethical Concerns:** - May inadvertently generate inappropriate or harmful content if safeguards are not applied, particularly in sensitive applications. 9. **Real-Time Usability:** - Latency in inference time could limit its effectiveness in real-time applications or when scaling to large user bases. # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/prithivMLmods__Bellatrix-1.5B-xElite-details)! Summarized results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/contents/viewer/default/train?q=prithivMLmods%2FBellatrix-1.5B-xElite&sort[column]=Average%20%E2%AC%86%EF%B8%8F&sort[direction]=desc)! | Metric |Value (%)| |-------------------|--------:| |**Average** | 9.55| |IFEval (0-Shot) | 19.64| |BBH (3-Shot) | 9.49| |MATH Lvl 5 (4-Shot)| 12.61| |GPQA (0-shot) | 3.80| |MuSR (0-shot) | 4.44| |MMLU-PRO (5-shot) | 7.30|
{"base_model": ["Qwen/Qwen2.5-1.5B-Instruct"], "language": ["en"], "library_name": "transformers", "license": "apache-2.0", "pipeline_tag": "text-generation", "tags": ["qwen", "qwq"], "model-index": [{"name": "Bellatrix-1.5B-xElite", "results": [{"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "IFEval (0-Shot)", "type": "wis-k/instruction-following-eval", "split": "train", "args": {"num_few_shot": 0}}, "metrics": [{"type": "inst_level_strict_acc and prompt_level_strict_acc", "value": 19.64, "name": "averaged accuracy"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "BBH (3-Shot)", "type": "SaylorTwift/bbh", "split": "test", "args": {"num_few_shot": 3}}, "metrics": [{"type": "acc_norm", "value": 9.49, "name": "normalized accuracy"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "MATH Lvl 5 (4-Shot)", "type": "lighteval/MATH-Hard", "split": "test", "args": {"num_few_shot": 4}}, "metrics": [{"type": "exact_match", "value": 12.61, "name": "exact match"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "GPQA (0-shot)", "type": "Idavidrein/gpqa", "split": "train", "args": {"num_few_shot": 0}}, "metrics": [{"type": "acc_norm", "value": 3.8, "name": "acc_norm"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "MuSR (0-shot)", "type": "TAUR-Lab/MuSR", "args": {"num_few_shot": 0}}, "metrics": [{"type": "acc_norm", "value": 4.44, "name": "acc_norm"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite", "name": "Open LLM Leaderboard"}}, {"task": {"type": "text-generation", "name": "Text Generation"}, "dataset": {"name": "MMLU-PRO (5-shot)", "type": "TIGER-Lab/MMLU-Pro", "config": "main", "split": "test", "args": {"num_few_shot": 5}}, "metrics": [{"type": "acc", "value": 7.3, "name": "accuracy"}], "source": {"url": "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/?search=prithivMLmods%2FBellatrix-1.5B-xElite", "name": "Open LLM Leaderboard"}}]}]}
task
[ "SUMMARIZATION" ]
46,489
seongil-dn/bge-m3-kor-retrieval-451949-bs4096-full-32-mixed
seongil-dn
sentence-similarity
[ "sentence-transformers", "safetensors", "xlm-roberta", "sentence-similarity", "feature-extraction", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-12-13T03:30:44Z
2024-12-13T03:32:05+00:00
5
0
--- library_name: sentence-transformers pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction --- # 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:** 8192 tokens - **Output Dimensionality:** 1024 tokens - **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': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel (1): Pooling({'word_embedding_dimension': 1024, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("seongil-dn/bge-m3-kor-retrieval-451949-bs4096-full-32-mixed") # Run inference sentences = [ '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 embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.10.12 - Sentence Transformers: 3.2.1 - Transformers: 4.44.2 - PyTorch: 2.3.1+cu121 - Accelerate: 1.1.1 - Datasets: 2.21.0 - Tokenizers: 0.19.1 ## 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.* -->
null
Non_BioNLP
# 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:** 8192 tokens - **Output Dimensionality:** 1024 tokens - **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': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel (1): Pooling({'word_embedding_dimension': 1024, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("seongil-dn/bge-m3-kor-retrieval-451949-bs4096-full-32-mixed") # Run inference sentences = [ '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 embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.10.12 - Sentence Transformers: 3.2.1 - Transformers: 4.44.2 - PyTorch: 2.3.1+cu121 - Accelerate: 1.1.1 - Datasets: 2.21.0 - Tokenizers: 0.19.1 ## 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.* -->
{"library_name": "sentence-transformers", "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction"]}
task
[ "TEXT_CLASSIFICATION" ]
46,490
saral7293/marian-finetuned-kde4-de-to-en
saral7293
translation
[ "transformers", "tensorboard", "safetensors", "marian", "text2text-generation", "translation", "generated_from_trainer", "dataset:kde4", "base_model:Helsinki-NLP/opus-mt-de-en", "base_model:finetune:Helsinki-NLP/opus-mt-de-en", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-04-19T22:30:33Z
2024-04-20T00:22:41+00:00
6
0
--- base_model: Helsinki-NLP/opus-mt-de-en datasets: - kde4 license: apache-2.0 metrics: - bleu tags: - translation - generated_from_trainer model-index: - name: marian-finetuned-kde4-de-to-en results: - task: type: text2text-generation name: Sequence-to-sequence Language Modeling dataset: name: kde4 type: kde4 config: de-en split: train args: de-en metrics: - type: bleu value: 39.73043983090341 name: Bleu --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # marian-finetuned-kde4-de-to-en This model is a fine-tuned version of [Helsinki-NLP/opus-mt-de-en](https://huggingface.co/Helsinki-NLP/opus-mt-de-en) on the kde4 dataset. It achieves the following results on the evaluation set: - Loss: 1.3138 - Bleu: 39.7304 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.38.2 - Pytorch 2.2.1+cu121 - Datasets 2.19.0 - Tokenizers 0.15.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # marian-finetuned-kde4-de-to-en This model is a fine-tuned version of [Helsinki-NLP/opus-mt-de-en](https://huggingface.co/Helsinki-NLP/opus-mt-de-en) on the kde4 dataset. It achieves the following results on the evaluation set: - Loss: 1.3138 - Bleu: 39.7304 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.38.2 - Pytorch 2.2.1+cu121 - Datasets 2.19.0 - Tokenizers 0.15.2
{"base_model": "Helsinki-NLP/opus-mt-de-en", "datasets": ["kde4"], "license": "apache-2.0", "metrics": ["bleu"], "tags": ["translation", "generated_from_trainer"], "model-index": [{"name": "marian-finetuned-kde4-de-to-en", "results": [{"task": {"type": "text2text-generation", "name": "Sequence-to-sequence Language Modeling"}, "dataset": {"name": "kde4", "type": "kde4", "config": "de-en", "split": "train", "args": "de-en"}, "metrics": [{"type": "bleu", "value": 39.73043983090341, "name": "Bleu"}]}]}]}
task
[ "TRANSLATION" ]
46,491
facebook/fasttext-be-vectors
facebook
feature-extraction
[ "fasttext", "feature-extraction", "be", "arxiv:1607.04606", "arxiv:1802.06893", "arxiv:1607.01759", "arxiv:1612.03651", "license:cc-by-sa-3.0", "region:us" ]
2023-03-18T05:01:51Z
2023-06-03T22:09:37+00:00
40
1
--- language: be library_name: fasttext license: cc-by-sa-3.0 tags: - feature-extraction widget: - text: apple example_title: apple --- # fastText (Belarusian) fastText is an open-source, free, lightweight library that allows users to learn text representations and text classifiers. It works on standard, generic hardware. Models can later be reduced in size to even fit on mobile devices. It was introduced in [this paper](https://arxiv.org/abs/1607.04606). The official website can be found [here](https://fasttext.cc/). ## Model description fastText is a library for efficient learning of word representations and sentence classification. fastText is designed to be simple to use for developers, domain experts, and students. It's dedicated to text classification and learning word representations, and was designed to allow for quick model iteration and refinement without specialized hardware. fastText models can be trained on more than a billion words on any multicore CPU in less than a few minutes. It includes pre-trained models learned on Wikipedia and in over 157 different languages. fastText can be used as a command line, linked to a C++ application, or used as a library for use cases from experimentation and prototyping to production. ## Intended uses & limitations You can use pre-trained word vectors for text classification or language identification. See the [tutorials](https://fasttext.cc/docs/en/supervised-tutorial.html) and [resources](https://fasttext.cc/docs/en/english-vectors.html) on its official website to look for tasks that interest you. ### How to use Here is how to load and use a pre-trained vectors ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-be-vectors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.words ['the', 'of', 'and', 'to', 'in', 'a', 'that', 'is', ...] >>> len(model.words) 145940 >>> model['bread'] array([ 4.89417791e-01, 1.60882145e-01, -2.25947708e-01, -2.94273376e-01, -1.04577184e-01, 1.17962055e-01, 1.34821936e-01, -2.41778508e-01, ...]) ``` Here is how to use this model to query nearest neighbors of an English word vector: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-en-nearest-neighbors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.get_nearest_neighbors("bread", k=5) [(0.5641006231307983, 'butter'), (0.48875734210014343, 'loaf'), (0.4491206705570221, 'eat'), (0.42444291710853577, 'food'), (0.4229326844215393, 'cheese')] ``` Here is how to use this model to detect the language of a given text: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-language-identification", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.predict("Hello, world!") (('__label__eng_Latn',), array([0.81148803])) >>> model.predict("Hello, world!", k=5) (('__label__eng_Latn', '__label__vie_Latn', '__label__nld_Latn', '__label__pol_Latn', '__label__deu_Latn'), array([0.61224753, 0.21323682, 0.09696738, 0.01359863, 0.01319415])) ``` ### Limitations and bias Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions. Cosine similarity can be used to measure the similarity between two different word vectors. If two two vectors are identical, the cosine similarity will be 1. For two completely unrelated vectors, the value will be 0. If two vectors have an opposite relationship, the value will be -1. ```python >>> import numpy as np >>> def cosine_similarity(word1, word2): >>> return np.dot(model[word1], model[word2]) / (np.linalg.norm(model[word1]) * np.linalg.norm(model[word2])) >>> cosine_similarity("man", "boy") 0.061653383 >>> cosine_similarity("man", "ceo") 0.11989131 >>> cosine_similarity("woman", "ceo") -0.08834904 ``` ## Training data Pre-trained word vectors for 157 languages were trained on [Common Crawl](http://commoncrawl.org/) and [Wikipedia](https://www.wikipedia.org/) using fastText. These models were trained using CBOW with position-weights, in dimension 300, with character n-grams of length 5, a window of size 5 and 10 negatives. We also distribute three new word analogy datasets, for French, Hindi and Polish. ## Training procedure ### Tokenization We used the [Stanford word segmenter](https://nlp.stanford.edu/software/segmenter.html) for Chinese, [Mecab](http://taku910.github.io/mecab/) for Japanese and [UETsegmenter](https://github.com/phongnt570/UETsegmenter) for Vietnamese. For languages using the Latin, Cyrillic, Hebrew or Greek scripts, we used the tokenizer from the [Europarl](https://www.statmt.org/europarl/) preprocessing tools. For the remaining languages, we used the ICU tokenizer. More information about the training of these models can be found in the article [Learning Word Vectors for 157 Languages](https://arxiv.org/abs/1802.06893). ### License The word vectors are distributed under the [*Creative Commons Attribution-Share-Alike License 3.0*](https://creativecommons.org/licenses/by-sa/3.0/). ### Evaluation datasets The analogy evaluation datasets described in the paper are available here: [French](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-fr.txt), [Hindi](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-hi.txt), [Polish](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-pl.txt). ### BibTeX entry and citation info Please cite [1] if using this code for learning word representations or [2] if using for text classification. [1] P. Bojanowski\*, E. Grave\*, A. Joulin, T. Mikolov, [*Enriching Word Vectors with Subword Information*](https://arxiv.org/abs/1607.04606) ```markup @article{bojanowski2016enriching, title={Enriching Word Vectors with Subword Information}, author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.04606}, year={2016} } ``` [2] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, [*Bag of Tricks for Efficient Text Classification*](https://arxiv.org/abs/1607.01759) ```markup @article{joulin2016bag, title={Bag of Tricks for Efficient Text Classification}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.01759}, year={2016} } ``` [3] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov, [*FastText.zip: Compressing text classification models*](https://arxiv.org/abs/1612.03651) ```markup @article{joulin2016fasttext, title={FastText.zip: Compressing text classification models}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{'e}gou, H{'e}rve and Mikolov, Tomas}, journal={arXiv preprint arXiv:1612.03651}, year={2016} } ``` If you use these word vectors, please cite the following paper: [4] E. Grave\*, P. Bojanowski\*, P. Gupta, A. Joulin, T. Mikolov, [*Learning Word Vectors for 157 Languages*](https://arxiv.org/abs/1802.06893) ```markup @inproceedings{grave2018learning, title={Learning Word Vectors for 157 Languages}, author={Grave, Edouard and Bojanowski, Piotr and Gupta, Prakhar and Joulin, Armand and Mikolov, Tomas}, booktitle={Proceedings of the International Conference on Language Resources and Evaluation (LREC 2018)}, year={2018} } ``` (\* These authors contributed equally.)
null
Non_BioNLP
# fastText (Belarusian) fastText is an open-source, free, lightweight library that allows users to learn text representations and text classifiers. It works on standard, generic hardware. Models can later be reduced in size to even fit on mobile devices. It was introduced in [this paper](https://arxiv.org/abs/1607.04606). The official website can be found [here](https://fasttext.cc/). ## Model description fastText is a library for efficient learning of word representations and sentence classification. fastText is designed to be simple to use for developers, domain experts, and students. It's dedicated to text classification and learning word representations, and was designed to allow for quick model iteration and refinement without specialized hardware. fastText models can be trained on more than a billion words on any multicore CPU in less than a few minutes. It includes pre-trained models learned on Wikipedia and in over 157 different languages. fastText can be used as a command line, linked to a C++ application, or used as a library for use cases from experimentation and prototyping to production. ## Intended uses & limitations You can use pre-trained word vectors for text classification or language identification. See the [tutorials](https://fasttext.cc/docs/en/supervised-tutorial.html) and [resources](https://fasttext.cc/docs/en/english-vectors.html) on its official website to look for tasks that interest you. ### How to use Here is how to load and use a pre-trained vectors ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-be-vectors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.words ['the', 'of', 'and', 'to', 'in', 'a', 'that', 'is', ...] >>> len(model.words) 145940 >>> model['bread'] array([ 4.89417791e-01, 1.60882145e-01, -2.25947708e-01, -2.94273376e-01, -1.04577184e-01, 1.17962055e-01, 1.34821936e-01, -2.41778508e-01, ...]) ``` Here is how to use this model to query nearest neighbors of an English word vector: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-en-nearest-neighbors", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.get_nearest_neighbors("bread", k=5) [(0.5641006231307983, 'butter'), (0.48875734210014343, 'loaf'), (0.4491206705570221, 'eat'), (0.42444291710853577, 'food'), (0.4229326844215393, 'cheese')] ``` Here is how to use this model to detect the language of a given text: ```python >>> import fasttext >>> from huggingface_hub import hf_hub_download >>> model_path = hf_hub_download(repo_id="facebook/fasttext-language-identification", filename="model.bin") >>> model = fasttext.load_model(model_path) >>> model.predict("Hello, world!") (('__label__eng_Latn',), array([0.81148803])) >>> model.predict("Hello, world!", k=5) (('__label__eng_Latn', '__label__vie_Latn', '__label__nld_Latn', '__label__pol_Latn', '__label__deu_Latn'), array([0.61224753, 0.21323682, 0.09696738, 0.01359863, 0.01319415])) ``` ### Limitations and bias Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions. Cosine similarity can be used to measure the similarity between two different word vectors. If two two vectors are identical, the cosine similarity will be 1. For two completely unrelated vectors, the value will be 0. If two vectors have an opposite relationship, the value will be -1. ```python >>> import numpy as np >>> def cosine_similarity(word1, word2): >>> return np.dot(model[word1], model[word2]) / (np.linalg.norm(model[word1]) * np.linalg.norm(model[word2])) >>> cosine_similarity("man", "boy") 0.061653383 >>> cosine_similarity("man", "ceo") 0.11989131 >>> cosine_similarity("woman", "ceo") -0.08834904 ``` ## Training data Pre-trained word vectors for 157 languages were trained on [Common Crawl](http://commoncrawl.org/) and [Wikipedia](https://www.wikipedia.org/) using fastText. These models were trained using CBOW with position-weights, in dimension 300, with character n-grams of length 5, a window of size 5 and 10 negatives. We also distribute three new word analogy datasets, for French, Hindi and Polish. ## Training procedure ### Tokenization We used the [Stanford word segmenter](https://nlp.stanford.edu/software/segmenter.html) for Chinese, [Mecab](http://taku910.github.io/mecab/) for Japanese and [UETsegmenter](https://github.com/phongnt570/UETsegmenter) for Vietnamese. For languages using the Latin, Cyrillic, Hebrew or Greek scripts, we used the tokenizer from the [Europarl](https://www.statmt.org/europarl/) preprocessing tools. For the remaining languages, we used the ICU tokenizer. More information about the training of these models can be found in the article [Learning Word Vectors for 157 Languages](https://arxiv.org/abs/1802.06893). ### License The word vectors are distributed under the [*Creative Commons Attribution-Share-Alike License 3.0*](https://creativecommons.org/licenses/by-sa/3.0/). ### Evaluation datasets The analogy evaluation datasets described in the paper are available here: [French](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-fr.txt), [Hindi](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-hi.txt), [Polish](https://dl.fbaipublicfiles.com/fasttext/word-analogies/questions-words-pl.txt). ### BibTeX entry and citation info Please cite [1] if using this code for learning word representations or [2] if using for text classification. [1] P. Bojanowski\*, E. Grave\*, A. Joulin, T. Mikolov, [*Enriching Word Vectors with Subword Information*](https://arxiv.org/abs/1607.04606) ```markup @article{bojanowski2016enriching, title={Enriching Word Vectors with Subword Information}, author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.04606}, year={2016} } ``` [2] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, [*Bag of Tricks for Efficient Text Classification*](https://arxiv.org/abs/1607.01759) ```markup @article{joulin2016bag, title={Bag of Tricks for Efficient Text Classification}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas}, journal={arXiv preprint arXiv:1607.01759}, year={2016} } ``` [3] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov, [*FastText.zip: Compressing text classification models*](https://arxiv.org/abs/1612.03651) ```markup @article{joulin2016fasttext, title={FastText.zip: Compressing text classification models}, author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{'e}gou, H{'e}rve and Mikolov, Tomas}, journal={arXiv preprint arXiv:1612.03651}, year={2016} } ``` If you use these word vectors, please cite the following paper: [4] E. Grave\*, P. Bojanowski\*, P. Gupta, A. Joulin, T. Mikolov, [*Learning Word Vectors for 157 Languages*](https://arxiv.org/abs/1802.06893) ```markup @inproceedings{grave2018learning, title={Learning Word Vectors for 157 Languages}, author={Grave, Edouard and Bojanowski, Piotr and Gupta, Prakhar and Joulin, Armand and Mikolov, Tomas}, booktitle={Proceedings of the International Conference on Language Resources and Evaluation (LREC 2018)}, year={2018} } ``` (\* These authors contributed equally.)
{"language": "be", "library_name": "fasttext", "license": "cc-by-sa-3.0", "tags": ["feature-extraction"], "widget": [{"text": "apple", "example_title": "apple"}]}
task
[ "TEXT_CLASSIFICATION" ]
46,492
Danni/distilbert-base-uncased-finetuned-cola
Danni
text-classification
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "dataset:glue", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-04-06T15:04:28Z
2022-04-13T07:28:04+00:00
116
0
--- datasets: - glue license: apache-2.0 metrics: - matthews_correlation tags: - generated_from_trainer model-index: - name: distilbert-base-uncased-finetuned-cola results: - task: type: text-classification name: Text Classification dataset: name: glue type: glue args: cola metrics: - type: matthews_correlation value: 0.44113488112476795 name: Matthews Correlation --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-cola This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the glue dataset. It achieves the following results on the evaluation set: - Loss: 0.4994 - Matthews Correlation: 0.4411 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 1 ### Training results | Training Loss | Epoch | Step | Validation Loss | Matthews Correlation | |:-------------:|:-----:|:----:|:---------------:|:--------------------:| | 0.5282 | 1.0 | 535 | 0.4994 | 0.4411 | ### Framework versions - Transformers 4.18.0 - Pytorch 1.11.0 - Datasets 2.0.0 - Tokenizers 0.11.6
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert-base-uncased-finetuned-cola This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the glue dataset. It achieves the following results on the evaluation set: - Loss: 0.4994 - Matthews Correlation: 0.4411 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 1 ### Training results | Training Loss | Epoch | Step | Validation Loss | Matthews Correlation | |:-------------:|:-----:|:----:|:---------------:|:--------------------:| | 0.5282 | 1.0 | 535 | 0.4994 | 0.4411 | ### Framework versions - Transformers 4.18.0 - Pytorch 1.11.0 - Datasets 2.0.0 - Tokenizers 0.11.6
{"datasets": ["glue"], "license": "apache-2.0", "metrics": ["matthews_correlation"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert-base-uncased-finetuned-cola", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "glue", "type": "glue", "args": "cola"}, "metrics": [{"type": "matthews_correlation", "value": 0.44113488112476795, "name": "Matthews Correlation"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,493
gaudi/opus-mt-es-bi-ctranslate2
gaudi
translation
[ "transformers", "marian", "ctranslate2", "translation", "license:apache-2.0", "endpoints_compatible", "region:us" ]
2024-07-22T15:43:45Z
2024-10-19T02:30:54+00:00
6
0
--- license: apache-2.0 tags: - ctranslate2 - translation --- # Repository General Information ## Inspired by and derived from the work of [Helsinki-NLP](https://huggingface.co/Helsinki-NLP), [CTranslate2](https://github.com/OpenNMT/CTranslate2), and [michaelfeil](https://huggingface.co/michaelfeil)! - Link to Original Model ([Helsinki-NLP](https://huggingface.co/Helsinki-NLP)): [Model Link](https://huggingface.co/Helsinki-NLP/opus-mt-es-bi) - This respository was based on the work of [CTranslate2](https://github.com/OpenNMT/CTranslate2). - This repository was based on the work of [michaelfeil](https://huggingface.co/michaelfeil). # What is CTranslate2? [CTranslate2](https://opennmt.net/CTranslate2/) is a C++ and Python library for efficient inference with Transformer models. CTranslate2 implements a custom runtime that applies many performance optimization techniques such as weights quantization, layers fusion, batch reordering, etc., to accelerate and reduce the memory usage of Transformer models on CPU and GPU. CTranslate2 is one of the most performant ways of hosting translation models at scale. Current supported models include: - Encoder-decoder models: Transformer base/big, M2M-100, NLLB, BART, mBART, Pegasus, T5, Whisper - Decoder-only models: GPT-2, GPT-J, GPT-NeoX, OPT, BLOOM, MPT, Llama, Mistral, Gemma, CodeGen, GPTBigCode, Falcon - Encoder-only models: BERT, DistilBERT, XLM-RoBERTa The project is production-oriented and comes with backward compatibility guarantees, but it also includes experimental features related to model compression and inference acceleration. # CTranslate2 Benchmarks Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. Tested against `newstest2014` (En -> De) dataset. The benchmark reports the number of target tokens generated per second (higher is better). The results are aggregated over multiple runs. See the benchmark scripts for more details and reproduce these numbers. Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. ## CPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 147.3 | 2332MB | 27.90 | | Marian 1.11.0 (int16) | 330.2 | 5901MB | 27.65 | | Marian 1.11.0 (int8) | 355.8 | 4763MB | 27.27 | | CTranslate2 3.6.0 (int16) | 596.1 | 660MB | 27.53 | | CTranslate2 3.6.0 (int8) | 696.1 | 516MB | 27.65 | ## GPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max GPU Memory Usage | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 1022.9 | 4097MB | 2109MB | 27.90 | | Marian 1.11.0 (float16) | 3962.4 | 3239MB | 1976MB | 27.94 | | CTranslate2 3.6.0 (float16) | 9296.7 | 909MB | 814MB | 27.9 | | CTranslate2 3.6.0 (int8 + float16) | 8362.7 | 813MB | 766MB | 27.9 | `Executed with 4 threads on a c5.2xlarge Amazon EC2 instance equipped with an Intel(R) Xeon(R) Platinum 8275CL CPU.` **Source to benchmark information can be found [here](https://github.com/OpenNMT/CTranslate2).**<br /> **Original model BLEU scores can be found [here](https://huggingface.co/Helsinki-NLP/opus-mt-es-bi).** ## Internal Benchmarks Internal testing on our end showed **inference times reduced by 6x-10x** on average compared the vanilla checkpoints using the *transformers* library. A **slight reduction on BLEU scores (~5%)** was also identified in comparison to the vanilla checkpoints with a few exceptions. This is likely due to several factors, one being the quantization applied. Further testing is needed from our end to better assess the reduction in translation quality. The command used to compile the vanilla checkpoint into a CTranslate2 model can be found below. Modifying this command can yield differing balances between inferencing performance and translation quality. # CTranslate2 Installation ```bash pip install hf-hub-ctranslate2>=1.0.0 ctranslate2>=3.13.0 ``` ### ct2-transformers-converter Command Used: ```bash ct2-transformers-converter --model Helsinki-NLP/opus-mt-es-bi --output_dir ./ctranslate2/opus-mt-es-bi-ctranslate2 --force --copy_files README.md generation_config.json tokenizer_config.json vocab.json source.spm .gitattributes target.spm --quantization float16 ``` # CTranslate2 Converted Checkpoint Information: **Compatible With:** - [ctranslate2](https://github.com/OpenNMT/CTranslate2) - [hf-hub-ctranslate2](https://github.com/michaelfeil/hf-hub-ctranslate2) **Compute Type:** - `compute_type=int8_float16` for `device="cuda"` - `compute_type=int8` for `device="cpu"` # Sample Code - ctranslate2 #### Clone the repository to the working directory or wherever you wish to store the model artifacts. #### ```bash git clone https://huggingface.co/gaudi/opus-mt-es-bi-ctranslate2 ``` #### Take the python code below and update the 'model_dir' variable to the location of the cloned repository. #### ```python from ctranslate2 import Translator import transformers model_dir = "./opus-mt-es-bi-ctranslate2" # Path to model directory. translator = Translator( model_path=model_dir, device="cuda", # cpu, cuda, or auto. inter_threads=1, # Maximum number of parallel translations. intra_threads=4, # Number of OpenMP threads per translator. compute_type="int8_float16", # int8 for cpu or int8_float16 for cuda. ) tokenizer = transformers.AutoTokenizer.from_pretrained(model_dir) source = tokenizer.convert_ids_to_tokens(tokenizer.encode("XXXXXX, XXX XX XXXXXX.")) results = translator.translate_batch([source]) target = results[0].hypotheses[0] print(tokenizer.decode(tokenizer.convert_tokens_to_ids(target))) ``` # Sample Code - hf-hub-ctranslate2 **Derived From [michaelfeil](https://huggingface.co/michaelfeil):** ```python from hf_hub_ctranslate2 import TranslatorCT2fromHfHub, GeneratorCT2fromHfHub from transformers import AutoTokenizer model_name = "gaudi/opus-mt-es-bi-ctranslate2" model = TranslatorCT2fromHfHub( model_name_or_path=model_name, device="cuda", compute_type="int8_float16", tokenizer=AutoTokenizer.from_pretrained(model_name) ) outputs = model.generate( text=["XXX XX XXX XXXXXXX XXXX?", "XX XX XXXX XX XXX!"], ) print(outputs) ``` # License and other remarks: License conditions are intended to be idential to [original huggingface repository](https://huggingface.co/Helsinki-NLP/opus-mt-es-bi) by Helsinki-NLP.
null
Non_BioNLP
# Repository General Information ## Inspired by and derived from the work of [Helsinki-NLP](https://huggingface.co/Helsinki-NLP), [CTranslate2](https://github.com/OpenNMT/CTranslate2), and [michaelfeil](https://huggingface.co/michaelfeil)! - Link to Original Model ([Helsinki-NLP](https://huggingface.co/Helsinki-NLP)): [Model Link](https://huggingface.co/Helsinki-NLP/opus-mt-es-bi) - This respository was based on the work of [CTranslate2](https://github.com/OpenNMT/CTranslate2). - This repository was based on the work of [michaelfeil](https://huggingface.co/michaelfeil). # What is CTranslate2? [CTranslate2](https://opennmt.net/CTranslate2/) is a C++ and Python library for efficient inference with Transformer models. CTranslate2 implements a custom runtime that applies many performance optimization techniques such as weights quantization, layers fusion, batch reordering, etc., to accelerate and reduce the memory usage of Transformer models on CPU and GPU. CTranslate2 is one of the most performant ways of hosting translation models at scale. Current supported models include: - Encoder-decoder models: Transformer base/big, M2M-100, NLLB, BART, mBART, Pegasus, T5, Whisper - Decoder-only models: GPT-2, GPT-J, GPT-NeoX, OPT, BLOOM, MPT, Llama, Mistral, Gemma, CodeGen, GPTBigCode, Falcon - Encoder-only models: BERT, DistilBERT, XLM-RoBERTa The project is production-oriented and comes with backward compatibility guarantees, but it also includes experimental features related to model compression and inference acceleration. # CTranslate2 Benchmarks Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. Tested against `newstest2014` (En -> De) dataset. The benchmark reports the number of target tokens generated per second (higher is better). The results are aggregated over multiple runs. See the benchmark scripts for more details and reproduce these numbers. Please note that the results presented below are only valid for the configuration used during this benchmark: absolute and relative performance may change with different settings. ## CPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 147.3 | 2332MB | 27.90 | | Marian 1.11.0 (int16) | 330.2 | 5901MB | 27.65 | | Marian 1.11.0 (int8) | 355.8 | 4763MB | 27.27 | | CTranslate2 3.6.0 (int16) | 596.1 | 660MB | 27.53 | | CTranslate2 3.6.0 (int8) | 696.1 | 516MB | 27.65 | ## GPU Benchmarks for Generic Opus-MT Models | Library | Tokens per Second | Max GPU Memory Usage | Max Memory Usage | BLEU | | :----: | :----: | :----: | :----: | :----: | | Transformers 4.26.1 (with PyTorch 1.13.1) | 1022.9 | 4097MB | 2109MB | 27.90 | | Marian 1.11.0 (float16) | 3962.4 | 3239MB | 1976MB | 27.94 | | CTranslate2 3.6.0 (float16) | 9296.7 | 909MB | 814MB | 27.9 | | CTranslate2 3.6.0 (int8 + float16) | 8362.7 | 813MB | 766MB | 27.9 | `Executed with 4 threads on a c5.2xlarge Amazon EC2 instance equipped with an Intel(R) Xeon(R) Platinum 8275CL CPU.` **Source to benchmark information can be found [here](https://github.com/OpenNMT/CTranslate2).**<br /> **Original model BLEU scores can be found [here](https://huggingface.co/Helsinki-NLP/opus-mt-es-bi).** ## Internal Benchmarks Internal testing on our end showed **inference times reduced by 6x-10x** on average compared the vanilla checkpoints using the *transformers* library. A **slight reduction on BLEU scores (~5%)** was also identified in comparison to the vanilla checkpoints with a few exceptions. This is likely due to several factors, one being the quantization applied. Further testing is needed from our end to better assess the reduction in translation quality. The command used to compile the vanilla checkpoint into a CTranslate2 model can be found below. Modifying this command can yield differing balances between inferencing performance and translation quality. # CTranslate2 Installation ```bash pip install hf-hub-ctranslate2>=1.0.0 ctranslate2>=3.13.0 ``` ### ct2-transformers-converter Command Used: ```bash ct2-transformers-converter --model Helsinki-NLP/opus-mt-es-bi --output_dir ./ctranslate2/opus-mt-es-bi-ctranslate2 --force --copy_files README.md generation_config.json tokenizer_config.json vocab.json source.spm .gitattributes target.spm --quantization float16 ``` # CTranslate2 Converted Checkpoint Information: **Compatible With:** - [ctranslate2](https://github.com/OpenNMT/CTranslate2) - [hf-hub-ctranslate2](https://github.com/michaelfeil/hf-hub-ctranslate2) **Compute Type:** - `compute_type=int8_float16` for `device="cuda"` - `compute_type=int8` for `device="cpu"` # Sample Code - ctranslate2 #### Clone the repository to the working directory or wherever you wish to store the model artifacts. #### ```bash git clone https://huggingface.co/gaudi/opus-mt-es-bi-ctranslate2 ``` #### Take the python code below and update the 'model_dir' variable to the location of the cloned repository. #### ```python from ctranslate2 import Translator import transformers model_dir = "./opus-mt-es-bi-ctranslate2" # Path to model directory. translator = Translator( model_path=model_dir, device="cuda", # cpu, cuda, or auto. inter_threads=1, # Maximum number of parallel translations. intra_threads=4, # Number of OpenMP threads per translator. compute_type="int8_float16", # int8 for cpu or int8_float16 for cuda. ) tokenizer = transformers.AutoTokenizer.from_pretrained(model_dir) source = tokenizer.convert_ids_to_tokens(tokenizer.encode("XXXXXX, XXX XX XXXXXX.")) results = translator.translate_batch([source]) target = results[0].hypotheses[0] print(tokenizer.decode(tokenizer.convert_tokens_to_ids(target))) ``` # Sample Code - hf-hub-ctranslate2 **Derived From [michaelfeil](https://huggingface.co/michaelfeil):** ```python from hf_hub_ctranslate2 import TranslatorCT2fromHfHub, GeneratorCT2fromHfHub from transformers import AutoTokenizer model_name = "gaudi/opus-mt-es-bi-ctranslate2" model = TranslatorCT2fromHfHub( model_name_or_path=model_name, device="cuda", compute_type="int8_float16", tokenizer=AutoTokenizer.from_pretrained(model_name) ) outputs = model.generate( text=["XXX XX XXX XXXXXXX XXXX?", "XX XX XXXX XX XXX!"], ) print(outputs) ``` # License and other remarks: License conditions are intended to be idential to [original huggingface repository](https://huggingface.co/Helsinki-NLP/opus-mt-es-bi) by Helsinki-NLP.
{"license": "apache-2.0", "tags": ["ctranslate2", "translation"]}
task
[ "TRANSLATION" ]
46,494
mrapacz/interlinear-pl-philta-emb-auto-normalized-bh
mrapacz
text2text-generation
[ "transformers", "pytorch", "morph-t5-auto", "text2text-generation", "pl", "dataset:mrapacz/greek-interlinear-translations", "license:cc-by-sa-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2025-02-08T12:26:48Z
2025-02-21T21:30:46+00:00
12
0
--- base_model: - PhilTa datasets: - mrapacz/greek-interlinear-translations language: - pl library_name: transformers license: cc-by-sa-4.0 metrics: - bleu --- # Model Card for Ancient Greek to Polish Interlinear Translation Model This model performs interlinear translation from Ancient Greek to Polish, maintaining word-level alignment between source and target texts. You can find the source code used for training this and other models trained as part of this project in the [GitHub repository](https://github.com/mrapacz/loreslm-interlinear-translation). ## Model Details ### Model Description - **Developed By:** Maciej Rapacz, AGH University of Kraków - **Model Type:** MorphT5AutoForConditionalGeneration - **Base Model:** PhilTa - **Tokenizer:** PhilTa - **Language(s):** Ancient Greek (source) → Polish (target) - **License:** CC BY-NC-SA 4.0 - **Tag Set:** BH (Bible Hub) - **Text Preprocessing:** Normalized - **Morphological Encoding:** emb-auto ### Model Performance - **BLEU Score:** 15.37 - **SemScore:** 0.82 ### Model Sources - **Repository:** https://github.com/mrapacz/loreslm-interlinear-translation - **Paper:** https://aclanthology.org/2025.loreslm-1.11/ ## Usage Example > **Note**: This model uses a modification of T5-family models that includes dedicated embedding layers for encoding morphological information. To load these models, install the [morpht5](https://github.com/mrapacz/loreslm-interlinear-translation/blob/master/morpht5/README.md) package: > ```bash > pip install morpht5 > ``` ```python >>> from morpht5 import MorphT5AutoForConditionalGeneration, MorphT5Tokenizer >>> text = ['λεγει', 'αυτω', 'ο', 'ιησους', 'εγειρε', 'αρον', 'τον', 'κραβαττον', 'σου', 'και', 'περιπατει'] >>> tags = ['V-PIA-3S', 'PPro-DM3S', 'Art-NMS', 'N-NMS', 'V-PMA-2S', 'V-AMA-2S', 'Art-AMS', 'N-AMS', 'PPro-G2S', 'Conj', 'V-PMA-2S'] >>> tokenizer = MorphT5Tokenizer.from_pretrained("mrapacz/interlinear-pl-philta-emb-auto-normalized-bh") >>> inputs = tokenizer( text=text, morph_tags=tags, return_tensors="pt" ) >>> model = MorphT5AutoForConditionalGeneration.from_pretrained("mrapacz/interlinear-pl-philta-emb-auto-normalized-bh") >>> outputs = model.generate( **inputs, max_new_tokens=100, early_stopping=True, ) >>> decoded = tokenizer.decode(outputs[0], skip_special_tokens=True, keep_block_separator=True) >>> decoded = decoded.replace(tokenizer.target_block_separator_token, " | ") >>> decoded 'mówi | mu | - | jezus | wyszedł | wyszedł | - | szyko | twoje | i | szymi' ``` ## Citation If you use this model, please cite the following paper: ``` @inproceedings{rapacz-smywinski-pohl-2025-low, title = "Low-Resource Interlinear Translation: Morphology-Enhanced Neural Models for {A}ncient {G}reek", author = "Rapacz, Maciej and Smywi{\'n}ski-Pohl, Aleksander", editor = "Hettiarachchi, Hansi and Ranasinghe, Tharindu and Rayson, Paul and Mitkov, Ruslan and Gaber, Mohamed and Premasiri, Damith and Tan, Fiona Anting and Uyangodage, Lasitha", booktitle = "Proceedings of the First Workshop on Language Models for Low-Resource Languages", month = jan, year = "2025", address = "Abu Dhabi, United Arab Emirates", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2025.loreslm-1.11/", pages = "145--165", abstract = "Contemporary machine translation systems prioritize fluent, natural-sounding output with flexible word ordering. In contrast, interlinear translation maintains the source text`s syntactic structure by aligning target language words directly beneath their source counterparts. Despite its importance in classical scholarship, automated approaches to interlinear translation remain understudied. We evaluated neural interlinear translation from Ancient Greek to English and Polish using four transformer-based models: two Ancient Greek-specialized (GreTa and PhilTa) and two general-purpose multilingual models (mT5-base and mT5-large). Our approach introduces novel morphological embedding layers and evaluates text preprocessing and tag set selection across 144 experimental configurations using a word-aligned parallel corpus of the Greek New Testament. Results show that morphological features through dedicated embedding layers significantly enhance translation quality, improving BLEU scores by 35{\%} (44.67 {\textrightarrow} 60.40) for English and 38{\%} (42.92 {\textrightarrow} 59.33) for Polish compared to baseline models. PhilTa achieves state-of-the-art performance for English, while mT5-large does so for Polish. Notably, PhilTa maintains stable performance using only 10{\%} of training data. Our findings challenge the assumption that modern neural architectures cannot benefit from explicit morphological annotations. While preprocessing strategies and tag set selection show minimal impact, the substantial gains from morphological embeddings demonstrate their value in low-resource scenarios." } ```
null
Non_BioNLP
# Model Card for Ancient Greek to Polish Interlinear Translation Model This model performs interlinear translation from Ancient Greek to Polish, maintaining word-level alignment between source and target texts. You can find the source code used for training this and other models trained as part of this project in the [GitHub repository](https://github.com/mrapacz/loreslm-interlinear-translation). ## Model Details ### Model Description - **Developed By:** Maciej Rapacz, AGH University of Kraków - **Model Type:** MorphT5AutoForConditionalGeneration - **Base Model:** PhilTa - **Tokenizer:** PhilTa - **Language(s):** Ancient Greek (source) → Polish (target) - **License:** CC BY-NC-SA 4.0 - **Tag Set:** BH (Bible Hub) - **Text Preprocessing:** Normalized - **Morphological Encoding:** emb-auto ### Model Performance - **BLEU Score:** 15.37 - **SemScore:** 0.82 ### Model Sources - **Repository:** https://github.com/mrapacz/loreslm-interlinear-translation - **Paper:** https://aclanthology.org/2025.loreslm-1.11/ ## Usage Example > **Note**: This model uses a modification of T5-family models that includes dedicated embedding layers for encoding morphological information. To load these models, install the [morpht5](https://github.com/mrapacz/loreslm-interlinear-translation/blob/master/morpht5/README.md) package: > ```bash > pip install morpht5 > ``` ```python >>> from morpht5 import MorphT5AutoForConditionalGeneration, MorphT5Tokenizer >>> text = ['λεγει', 'αυτω', 'ο', 'ιησους', 'εγειρε', 'αρον', 'τον', 'κραβαττον', 'σου', 'και', 'περιπατει'] >>> tags = ['V-PIA-3S', 'PPro-DM3S', 'Art-NMS', 'N-NMS', 'V-PMA-2S', 'V-AMA-2S', 'Art-AMS', 'N-AMS', 'PPro-G2S', 'Conj', 'V-PMA-2S'] >>> tokenizer = MorphT5Tokenizer.from_pretrained("mrapacz/interlinear-pl-philta-emb-auto-normalized-bh") >>> inputs = tokenizer( text=text, morph_tags=tags, return_tensors="pt" ) >>> model = MorphT5AutoForConditionalGeneration.from_pretrained("mrapacz/interlinear-pl-philta-emb-auto-normalized-bh") >>> outputs = model.generate( **inputs, max_new_tokens=100, early_stopping=True, ) >>> decoded = tokenizer.decode(outputs[0], skip_special_tokens=True, keep_block_separator=True) >>> decoded = decoded.replace(tokenizer.target_block_separator_token, " | ") >>> decoded 'mówi | mu | - | jezus | wyszedł | wyszedł | - | szyko | twoje | i | szymi' ``` ## Citation If you use this model, please cite the following paper: ``` @inproceedings{rapacz-smywinski-pohl-2025-low, title = "Low-Resource Interlinear Translation: Morphology-Enhanced Neural Models for {A}ncient {G}reek", author = "Rapacz, Maciej and Smywi{\'n}ski-Pohl, Aleksander", editor = "Hettiarachchi, Hansi and Ranasinghe, Tharindu and Rayson, Paul and Mitkov, Ruslan and Gaber, Mohamed and Premasiri, Damith and Tan, Fiona Anting and Uyangodage, Lasitha", booktitle = "Proceedings of the First Workshop on Language Models for Low-Resource Languages", month = jan, year = "2025", address = "Abu Dhabi, United Arab Emirates", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2025.loreslm-1.11/", pages = "145--165", abstract = "Contemporary machine translation systems prioritize fluent, natural-sounding output with flexible word ordering. In contrast, interlinear translation maintains the source text`s syntactic structure by aligning target language words directly beneath their source counterparts. Despite its importance in classical scholarship, automated approaches to interlinear translation remain understudied. We evaluated neural interlinear translation from Ancient Greek to English and Polish using four transformer-based models: two Ancient Greek-specialized (GreTa and PhilTa) and two general-purpose multilingual models (mT5-base and mT5-large). Our approach introduces novel morphological embedding layers and evaluates text preprocessing and tag set selection across 144 experimental configurations using a word-aligned parallel corpus of the Greek New Testament. Results show that morphological features through dedicated embedding layers significantly enhance translation quality, improving BLEU scores by 35{\%} (44.67 {\textrightarrow} 60.40) for English and 38{\%} (42.92 {\textrightarrow} 59.33) for Polish compared to baseline models. PhilTa achieves state-of-the-art performance for English, while mT5-large does so for Polish. Notably, PhilTa maintains stable performance using only 10{\%} of training data. Our findings challenge the assumption that modern neural architectures cannot benefit from explicit morphological annotations. While preprocessing strategies and tag set selection show minimal impact, the substantial gains from morphological embeddings demonstrate their value in low-resource scenarios." } ```
{"base_model": ["PhilTa"], "datasets": ["mrapacz/greek-interlinear-translations"], "language": ["pl"], "library_name": "transformers", "license": "cc-by-sa-4.0", "metrics": ["bleu"]}
task
[ "TRANSLATION" ]
46,495
hopkins/eng-fra-common
hopkins
translation
[ "transformers", "pytorch", "tensorboard", "mbart", "text2text-generation", "translation", "generated_from_trainer", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-07-06T16:14:37Z
2023-07-06T16:33:11+00:00
8
0
--- metrics: - bleu tags: - translation - generated_from_trainer model-index: - name: eng-fra-common results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # eng-fra-common This model is a fine-tuned version of [facebook/mbart-large-50-many-to-many-mmt](https://huggingface.co/facebook/mbart-large-50-many-to-many-mmt) on the None dataset. It achieves the following results on the evaluation set: - Loss: 1.1327 - Bleu: 33.1235 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 2.0.1+cu117 - Datasets 2.12.0 - Tokenizers 0.13.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # eng-fra-common This model is a fine-tuned version of [facebook/mbart-large-50-many-to-many-mmt](https://huggingface.co/facebook/mbart-large-50-many-to-many-mmt) on the None dataset. It achieves the following results on the evaluation set: - Loss: 1.1327 - Bleu: 33.1235 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 2.0.1+cu117 - Datasets 2.12.0 - Tokenizers 0.13.3
{"metrics": ["bleu"], "tags": ["translation", "generated_from_trainer"], "model-index": [{"name": "eng-fra-common", "results": []}]}
task
[ "TRANSLATION" ]
46,496
shijunju/gemma_2b_finRisk
shijunju
text-generation
[ "transformers", "safetensors", "gemma", "text-generation", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2024-11-14T02:46:46Z
2024-11-18T21:05:42+00:00
12
0
--- library_name: transformers --- # Model Card for shijunju/gemma_2b_finRisk This model is fine-tuned using the LoRA (Low-Rank Adaptation) approach, specifically designed for question answering in the domain of financial risk compliance. The Gemma-2b-en model is fine-tuned using documents from fincen.gov. It is capable of answering questions about documents published on fincen.gov, including Alerts, Advisories, and Financial Trend Analysis reports since 2020. ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> - The model is created as part of experiment to find better models, a more accurate (70%-78%) finetuned model can be found at: [shijunju/gemma_7b_finRisk_r6_4VersionQ](https://huggingface.co/shijunju/gemma_7b_finRisk_r6_4VersionQ) - **Developed by:** Shijun Ju - **Finetuned from model:** Gemma-2b-en - QLoRA rank: 6 ### Dataset Used [shijunju/fincen_all_questions_5versions](https://huggingface.co/datasets/shijunju/fincen_all_questions_5versions) ## How to Get Started with the Model Use the code below to get started with the model. (Faster if using GPU.) ```python import torch model_id = "shijunju/gemma_2b_finRisk" model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.float16, device_map="auto", token=os.environ['HF_TOKEN']) tokenizer = AutoTokenizer.from_pretrained(model_id, token=os.environ['HF_TOKEN']) # Function to generate responses def generate_response(prompt, max_length=256): inputs = tokenizer(prompt, return_tensors="pt").to(model.device) outputs = model.generate(**inputs, temperature = 0.2, max_length=max_length, num_return_sequences=1) return tokenizer.decode(outputs[0], skip_special_tokens=True) question = "Describe the increase in average monthly values of Real Estate Business Email Compromise incidents from 2020 to 2021." inference_template = """<start_of_turn>user\nQuestion: {question}\n<end_of_turn>\n\n<start_of_turn>model\n""" prompt = inference_template.format( question=question, response="" ) print(generate_response(prompt)) ``` ## Model Card Contact [email protected]
null
Non_BioNLP
# Model Card for shijunju/gemma_2b_finRisk This model is fine-tuned using the LoRA (Low-Rank Adaptation) approach, specifically designed for question answering in the domain of financial risk compliance. The Gemma-2b-en model is fine-tuned using documents from fincen.gov. It is capable of answering questions about documents published on fincen.gov, including Alerts, Advisories, and Financial Trend Analysis reports since 2020. ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> - The model is created as part of experiment to find better models, a more accurate (70%-78%) finetuned model can be found at: [shijunju/gemma_7b_finRisk_r6_4VersionQ](https://huggingface.co/shijunju/gemma_7b_finRisk_r6_4VersionQ) - **Developed by:** Shijun Ju - **Finetuned from model:** Gemma-2b-en - QLoRA rank: 6 ### Dataset Used [shijunju/fincen_all_questions_5versions](https://huggingface.co/datasets/shijunju/fincen_all_questions_5versions) ## How to Get Started with the Model Use the code below to get started with the model. (Faster if using GPU.) ```python import torch model_id = "shijunju/gemma_2b_finRisk" model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.float16, device_map="auto", token=os.environ['HF_TOKEN']) tokenizer = AutoTokenizer.from_pretrained(model_id, token=os.environ['HF_TOKEN']) # Function to generate responses def generate_response(prompt, max_length=256): inputs = tokenizer(prompt, return_tensors="pt").to(model.device) outputs = model.generate(**inputs, temperature = 0.2, max_length=max_length, num_return_sequences=1) return tokenizer.decode(outputs[0], skip_special_tokens=True) question = "Describe the increase in average monthly values of Real Estate Business Email Compromise incidents from 2020 to 2021." inference_template = """<start_of_turn>user\nQuestion: {question}\n<end_of_turn>\n\n<start_of_turn>model\n""" prompt = inference_template.format( question=question, response="" ) print(generate_response(prompt)) ``` ## Model Card Contact [email protected]
{"library_name": "transformers"}
task
[ "QUESTION_ANSWERING" ]
46,498
mqy/mt5-small-finetuned-17jan-1
mqy
summarization
[ "transformers", "pytorch", "tensorboard", "mt5", "text2text-generation", "summarization", "generated_from_trainer", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-01-17T07:40:27Z
2023-01-17T08:31:25+00:00
122
0
--- license: apache-2.0 metrics: - rouge tags: - summarization - generated_from_trainer model-index: - name: mt5-small-finetuned-17jan-1 results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # mt5-small-finetuned-17jan-1 This model is a fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 2.6637 - Rouge1: 8.3942 - Rouge2: 0.8333 - Rougel: 8.2847 - Rougelsum: 8.3183 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 10 - eval_batch_size: 10 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 ### Training results | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | |:-------------:|:-----:|:----:|:---------------:|:------:|:------:|:------:|:---------:| | 11.5311 | 1.0 | 60 | 3.3693 | 3.5755 | 0.6 | 3.6 | 3.5118 | | 4.9804 | 2.0 | 120 | 2.9852 | 5.1928 | 0.9667 | 5.205 | 5.1941 | | 4.0171 | 3.0 | 180 | 2.8622 | 5.8468 | 0.5889 | 5.9029 | 5.8766 | | 3.7179 | 4.0 | 240 | 2.7056 | 8.4114 | 0.5 | 8.5056 | 8.4553 | | 3.514 | 5.0 | 300 | 2.7171 | 9.3353 | 0.8333 | 9.2709 | 9.3029 | | 3.4154 | 6.0 | 360 | 2.7082 | 8.6179 | 0.4167 | 8.5622 | 8.5483 | | 3.3356 | 7.0 | 420 | 2.6801 | 8.3942 | 0.8333 | 8.2847 | 8.3183 | | 3.3008 | 8.0 | 480 | 2.6757 | 8.2384 | 0.4167 | 8.1169 | 8.1087 | | 3.2493 | 9.0 | 540 | 2.6646 | 8.2384 | 0.4167 | 8.1169 | 8.1087 | | 3.2307 | 10.0 | 600 | 2.6637 | 8.3942 | 0.8333 | 8.2847 | 8.3183 | ### Framework versions - Transformers 4.25.1 - Pytorch 1.13.0+cu116 - Datasets 2.8.0 - Tokenizers 0.13.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # mt5-small-finetuned-17jan-1 This model is a fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 2.6637 - Rouge1: 8.3942 - Rouge2: 0.8333 - Rougel: 8.2847 - Rougelsum: 8.3183 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 10 - eval_batch_size: 10 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 ### Training results | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | |:-------------:|:-----:|:----:|:---------------:|:------:|:------:|:------:|:---------:| | 11.5311 | 1.0 | 60 | 3.3693 | 3.5755 | 0.6 | 3.6 | 3.5118 | | 4.9804 | 2.0 | 120 | 2.9852 | 5.1928 | 0.9667 | 5.205 | 5.1941 | | 4.0171 | 3.0 | 180 | 2.8622 | 5.8468 | 0.5889 | 5.9029 | 5.8766 | | 3.7179 | 4.0 | 240 | 2.7056 | 8.4114 | 0.5 | 8.5056 | 8.4553 | | 3.514 | 5.0 | 300 | 2.7171 | 9.3353 | 0.8333 | 9.2709 | 9.3029 | | 3.4154 | 6.0 | 360 | 2.7082 | 8.6179 | 0.4167 | 8.5622 | 8.5483 | | 3.3356 | 7.0 | 420 | 2.6801 | 8.3942 | 0.8333 | 8.2847 | 8.3183 | | 3.3008 | 8.0 | 480 | 2.6757 | 8.2384 | 0.4167 | 8.1169 | 8.1087 | | 3.2493 | 9.0 | 540 | 2.6646 | 8.2384 | 0.4167 | 8.1169 | 8.1087 | | 3.2307 | 10.0 | 600 | 2.6637 | 8.3942 | 0.8333 | 8.2847 | 8.3183 | ### Framework versions - Transformers 4.25.1 - Pytorch 1.13.0+cu116 - Datasets 2.8.0 - Tokenizers 0.13.2
{"license": "apache-2.0", "metrics": ["rouge"], "tags": ["summarization", "generated_from_trainer"], "model-index": [{"name": "mt5-small-finetuned-17jan-1", "results": []}]}
task
[ "SUMMARIZATION" ]
46,499
jacobshein/danish-bert-botxo-qa-squad
jacobshein
question-answering
[ "transformers", "pytorch", "bert", "question-answering", "danish", "question answering", "squad", "machine translation", "botxo", "da", "license:cc-by-4.0", "endpoints_compatible", "region:us" ]
2022-03-02T23:29:05Z
2021-07-18T11:19:49+00:00
14
0
--- datasets: - common_crawl - wikipedia - dindebat.dk - hestenettet.dk - danish OpenSubtitles language: da license: cc-by-4.0 tags: - danish - bert - question answering - squad - machine translation - botxo widget: - context: Stine sagde hej, men Jacob sagde halløj. --- # Danish BERT (version 2, uncased) by [BotXO](https://github.com/botxo/nordic_bert) fine-tuned for Question Answering (QA) on the [machine-translated SQuAD-da dataset](https://github.com/ccasimiro88/TranslateAlignRetrieve/tree/multilingual/squads-tar/da) ```python from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("jacobshein/danish-bert-botxo-qa-squad") model = AutoModelForQuestionAnswering.from_pretrained("jacobshein/danish-bert-botxo-qa-squad") ``` #### Contact For further information on usage or fine-tuning procedure, please reach out by email through [jacobhein.com](https://jacobhein.com/#contact).
null
Non_BioNLP
# Danish BERT (version 2, uncased) by [BotXO](https://github.com/botxo/nordic_bert) fine-tuned for Question Answering (QA) on the [machine-translated SQuAD-da dataset](https://github.com/ccasimiro88/TranslateAlignRetrieve/tree/multilingual/squads-tar/da) ```python from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("jacobshein/danish-bert-botxo-qa-squad") model = AutoModelForQuestionAnswering.from_pretrained("jacobshein/danish-bert-botxo-qa-squad") ``` #### Contact For further information on usage or fine-tuning procedure, please reach out by email through [jacobhein.com](https://jacobhein.com/#contact).
{"datasets": ["common_crawl", "wikipedia", "dindebat.dk", "hestenettet.dk", "danish OpenSubtitles"], "language": "da", "license": "cc-by-4.0", "tags": ["danish", "bert", "question answering", "squad", "machine translation", "botxo"], "widget": [{"context": "Stine sagde hej, men Jacob sagde halløj."}]}
task
[ "QUESTION_ANSWERING", "TRANSLATION" ]
46,500
shrijayan/all-mpnet-base-v2-sample
shrijayan
sentence-similarity
[ "sentence-transformers", "safetensors", "bert", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:800", "loss:MultipleNegativesRankingLoss", "en", "arxiv:1908.10084", "arxiv:1705.00652", "base_model:intfloat/e5-base-v2", "base_model:finetune:intfloat/e5-base-v2", "license:apache-2.0", "model-index", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-11-13T10:25:01Z
2024-11-13T10:28:25+00:00
7
0
--- base_model: intfloat/e5-base-v2 language: - en library_name: sentence-transformers license: apache-2.0 metrics: - cosine_accuracy pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:800 - loss:MultipleNegativesRankingLoss widget: - source_sentence: For the following multiple choice question, select one correct answer. Let s think step by step. Question In a postoperative patient with a urinary diversion, the nurse should monitor the urine volume every hour. Below how many ml h of urine may indicate that the patient is dehydrated or has some type of internal obstruction or loss ? Options A. 200 ml h. B. 100 ml h. C. 80 ml h. D. 50 ml h. E. 30 ml h. sentences: - Our approach shows that gene expression can be explained by a modest number of co localized transcription factors, however, information on cell type specific binding is crucial for understanding combinatorial gene regulation. - We have developed a rapid, simple, sensitive and specific method to quantify β antithrombin activity using 1μL of plasma. β antithrombin significantly increases in patients with ischemic cerebrovascular disease during the acute event, probably by its release from the vasculature. - A postoperative patient with a urinary diversion requires close monitoring of urine output to ensure that the diversion is functioning properly and that the patient is not experiencing any complications. Monitoring urine volume every hour is a crucial aspect of postoperative care in this scenario. To determine the correct answer, let s analyze each option A. 200 ml h This is a relatively high urine output, and it would not typically indicate dehydration or internal obstruction. In fact, a urine output of 200 ml h is generally considered adequate and may even be higher than the average urine output for a healthy adult. B. 100 ml h This is also a relatively high urine output and would not typically indicate dehydration or internal obstruction. A urine output of 100 ml h is still within the normal range and would not raise concerns about dehydration or obstruction. C. 80 ml h While this is a slightly lower urine output, it is still within the normal range and would not necessarily indicate dehydration or internal obstruction. D. 50 ml h This is a lower urine output, and it may start to raise concerns about dehydration or internal obstruction. However, it is still not the lowest option, and the nurse may need to consider other factors before determining the cause of the low urine output. E. 30 ml h This is the lowest urine output option, and it would likely indicate that the patient is dehydrated or has some type of internal obstruction or loss. A urine output of 30 ml h is generally considered low and would require immediate attention from the nurse to determine the cause and take corrective action. Considering the options, the correct answer is E. 30 ml h. A urine output of 30 ml h is a critical threshold that may indicate dehydration or internal obstruction, and the nurse should take immediate action to assess the patient s fluid status and the functioning of the urinary diversion. Answer E. - source_sentence: In tumor lysis syndrome all of the following are seen except sentences: - The results indicated that some polymorphic variations of drug metabolic and transporter genes may be potential biomarkers for clinical outcome of gemcitabine based therapy in patients with locally advanced pancreatic cancer. - Variations in the prevalence of depressive symptoms occurred between centres, not always related to levels of illness. There was no consistent relationship between proportions of symptoms in well persons and cases for all centres. Few symptoms were present in 60 of the older population stereotypes of old age were not upheld. - Tumor lysis syndrome Caused by destruction of large number of rapidly proliferating neoplastic cells. It frequently leads to ARF It is characterized by Hypocalcemia Hyperkalemia Lactic acidosis Hyperuricemia Hyperphosphatemia Most frequently associated with treatment of Burkitt lymphoma ALL CLL Solid tumors - source_sentence: Does prevalence of central venous occlusion in patients with chronic defibrillator lead? sentences: - Intraoperative small dose IV haloperidol is effective against post operative nausea and vomiting with no significant effect on overall QoR. It may also attenuate the analgesic effects of morphine PCA. - Intubation is generally done with the help of endotracheal tube ETT . The internal diameter of ETT used ranges between 3 and 8 mm depending on the age, sex, and size of nares of the patient. Potex north and south polar performed Rae tubes RAE right angled ETT and flexo metallic tubes are commonly used. Out of them, North Pole Rae tube is preferred in case of ankylosis patient due to the direction of the curve of ETT which favors its placement in restricted mouth opening as in case of ankylosis. - The low prevalence of subclavian vein occlusion or severe stenosis among defibrillator recipients found in this study suggests that the placement of additional transvenous leads in a patient who already has a ventricular defibrillator is feasible in a high percentage of patients 93 . - source_sentence: Is mode of presentation of B3 breast core biopsies screen detected or symptomatic a distinguishing factor in the final histopathologic result or risk of diagnosis of malignancy? sentences: - This observation may indicate a considerable difference in cardiovascular risk between genotype groups as a result of an increase in FVIIa after a fat rich diet. - Mode of patient presentation with a screen detected or symptomatic lesion was not a distinguishing factor for breast histopathologic subclassification or for the final cancer diagnosis in patients whose breast core biopsy was classified as B3. - Ans. is a i.e., Apaf 1o One of these proteins is cytochrome c, well known for its role in mitochondrial respiration. In the cytosol, cytochrome C binds to a protein called Apaf 1 apoptosis activating factor 1 , and the complex activates caspase 9. Bc1 2 and Bcl x may also directly inhibit Apaf 1 activation, and their loss from cells may permit activation of Apaf 1 . - source_sentence: Is the Danish National Hospital Register a valuable study base for epidemiologic research in febrile seizures? sentences: - Interstitial cystitis IC is a condition that causes discomfort or pain in the bladder and a need to urinate frequently and urgently. It is far more common in women than in men. The symptoms vary from person to person. Some people may have pain without urgency or frequency. Others have urgency and frequency without pain. Women s symptoms often get worse during their periods. They may also have pain with sexual intercourse. The cause of IC isn t known. There is no one test to tell if you have it. Doctors often run tests to rule out other possible causes of symptoms. There is no cure for IC, but treatments can help most people feel better. They include Distending, or inflating, the bladder Bathing the inside of the bladder with a drug solution Oral medicines Electrical nerve stimulation Physical therapy Lifestyle changes Bladder training In rare cases, surgery NIH National Institute of Diabetes and Digestive and Kidney Diseases - Ans. is c i.e., Presence of depression Good prognostic factors Acute onset late onset onset after 35 years of age Presence of precipitating stressor Good premorbid adjustment catatonic best prognosis Paranoid 2nd best sho duration 6 months Married Positive symptoms Presence of depression family history of mood disorder first episode pyknic fat physique female sex good treatment compliance good response to treatment good social suppo presence of confusion or perplexity normal brain CT Scan outpatient treatment. - The Danish National Hospital Register is a valuable tool for epidemiologic research in febrile seizures. model-index: - name: MPNet base trained on AllNLI triplets results: - task: type: triplet name: Triplet dataset: name: eval dataset type: eval-dataset metrics: - type: cosine_accuracy value: 1.0 name: Cosine Accuracy - task: type: triplet name: Triplet dataset: name: test dataset type: test-dataset metrics: - type: cosine_accuracy value: 0.97 name: Cosine Accuracy --- # MPNet base trained on AllNLI triplets This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2). It maps sentences & paragraphs to a 768-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:** [intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) <!-- at revision 1c644c92ad3ba1efdad3f1451a637716616a20e8 --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 dimensions - **Similarity Function:** Cosine Similarity <!-- - **Training Dataset:** Unknown --> - **Language:** en - **License:** apache-2.0 ### 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': 512, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("sentence_transformers_model_id") # Run inference sentences = [ 'Is the Danish National Hospital Register a valuable study base for epidemiologic research in febrile seizures?', 'The Danish National Hospital Register is a valuable tool for epidemiologic research in febrile seizures.', 'Ans. is c i.e., Presence of depression Good prognostic factors Acute onset late onset onset after 35 years of age Presence of precipitating stressor Good premorbid adjustment catatonic best prognosis Paranoid 2nd best sho duration 6 months Married Positive symptoms Presence of depression family history of mood disorder first episode pyknic fat physique female sex good treatment compliance good response to treatment good social suppo presence of confusion or perplexity normal brain CT Scan outpatient treatment.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Triplet * Datasets: `eval-dataset` and `test-dataset` * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) | Metric | eval-dataset | test-dataset | |:--------------------|:-------------|:-------------| | **cosine_accuracy** | **1.0** | **0.97** | <!-- ## 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 ### Training Dataset #### Unnamed Dataset * Size: 800 training samples * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code> * Approximate statistics based on the first 800 samples: | | sentence1 | sentence2 | label | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------| | type | string | string | float | | details | <ul><li>min: 5 tokens</li><li>mean: 22.88 tokens</li><li>max: 205 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 81.77 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> | * Samples: | sentence1 | sentence2 | label | |:------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------| | <code>Triad of biotin deficiency is</code> | <code>Dermatitis, glossitis, Alopecia 407 H 314 Basic pathology 8th Biotin deficiency clinical features Adult Mental changes depression, hallucination , paresthesia, anorexia, nausea, A scaling, seborrheic and erythematous rash may occur around the eye, nose, mouth, as well as extremities 407 H Infant hypotonia, lethargy, apathy, alopecia and a characteristic rash that includes the ears.Symptoms of biotin deficiency includes Anaemia, loss of apepite dermatitis, glossitis 150 U. Satyanarayan Symptoms of biotin deficiency Dermatitis spectacle eyed appearance due to circumocular alopecia, pallor of skin membrane, depression, Lassitude, somnolence, anemia and hypercholesterolaemia 173 Rana Shinde 6th</code> | <code>1.0</code> | | <code>Drug responsible for the below condition</code> | <code>Thalidomide given to pregnant lady can lead to hypoplasia of limbs called as Phocomelia .</code> | <code>1.0</code> | | <code>Is benefit from procarbazine , lomustine , and vincristine in oligodendroglial tumors associated with mutation of IDH?</code> | <code>IDH mutational status identified patients with oligodendroglial tumors who did and did not benefit from alkylating agent chemotherapy with RT. Although patients with codeleted tumors lived longest, patients with noncodeleted IDH mutated tumors also lived longer after CRT.</code> | <code>1.0</code> | * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters: ```json { "scale": 20.0, "similarity_fct": "cos_sim" } ``` ### Evaluation Dataset #### Unnamed Dataset * Size: 100 evaluation samples * Columns: <code>question</code>, <code>answer</code>, and <code>hard_negative</code> * Approximate statistics based on the first 100 samples: | | question | answer | hard_negative | |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-------------------| | type | string | string | NoneType | | details | <ul><li>min: 5 tokens</li><li>mean: 22.52 tokens</li><li>max: 103 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 83.51 tokens</li><li>max: 403 tokens</li></ul> | <ul><li></li></ul> | * Samples: | question | answer | hard_negative | |:-----------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------| | <code>Hutchinsons secondaries In skull are due to tumors in</code> | <code>Adrenal neuroblastomas are malig8nant neoplasms arising from sympathetic neuroblsts in Medulla of adrenal gland Neuroblastoma is a cancer that develops from immature nerve cells found in several areas of the body.Neuroblastoma most commonly arises in and around the adrenalglands, which have similar origins to nerve cells and sit atop the kidneys.</code> | <code>None</code> | | <code>Proliferative glomerular deposits in the kidney are found in</code> | <code>IgA nephropathy or Berger s disease immune complex mediated glomerulonephritis defined by the presence of diffuse mesangial IgA deposits often associated with mesangial hypercellularity. Male preponderance, peak incidence in the second and third decades of life.Clinical and laboratory findings Two most common presentations recurrent episodes of macroscopic hematuria during or immediately following an upper respiratory infection often accompanied by proteinuria or persistent asymptomatic microscopic hematuriaIgA deposited in the mesangium is typically polymeric and of the IgA1 subclass. IgM, IgG, C3, or immunoglobulin light chains may be codistributed with IgAPresence of elevated serum IgA levels in 20 50 of patients, IgA deposition in skin biopsies in 15 55 of patients, elevated levels of secretory IgA and IgA fibronectin complexesIgA nephropathy is a benign disease mostly, 5 30 of patients go into a complete remission, with others having hematuria but well preserved renal functionAbou...</code> | <code>None</code> | | <code>Does meconium aspiration induce oxidative injury in the hippocampus of newborn piglets?</code> | <code>Our data thus suggest that oxidative injury associated with pulmonary, but not systemic, hemodynamic disturbances may contribute to hippocampal damage after meconium aspiration in newborns.</code> | <code>None</code> | * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters: ```json { "scale": 20.0, "similarity_fct": "cos_sim" } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `do_predict`: True - `eval_strategy`: steps - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `num_train_epochs`: 1 - `warmup_ratio`: 0.1 - `fp16`: True - `load_best_model_at_end`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: True - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 5e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 1 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: True - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `include_for_metrics`: [] - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `use_liger_kernel`: False - `eval_use_gather_object`: False - `average_tokens_across_devices`: False - `prompts`: None - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | eval-dataset_cosine_accuracy | test-dataset_cosine_accuracy | |:-----:|:----:|:----------------------------:|:----------------------------:| | 0 | 0 | 1.0 | - | | 1.0 | 25 | - | 0.97 | ### Framework Versions - Python: 3.11.10 - Sentence Transformers: 3.3.0 - Transformers: 4.46.2 - PyTorch: 2.5.1+cu124 - Accelerate: 1.1.1 - Datasets: 3.1.0 - Tokenizers: 0.20.3 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
null
BioNLP
# MPNet base trained on AllNLI triplets This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2). It maps sentences & paragraphs to a 768-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:** [intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) <!-- at revision 1c644c92ad3ba1efdad3f1451a637716616a20e8 --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 dimensions - **Similarity Function:** Cosine Similarity <!-- - **Training Dataset:** Unknown --> - **Language:** en - **License:** apache-2.0 ### 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': 512, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("sentence_transformers_model_id") # Run inference sentences = [ 'Is the Danish National Hospital Register a valuable study base for epidemiologic research in febrile seizures?', 'The Danish National Hospital Register is a valuable tool for epidemiologic research in febrile seizures.', 'Ans. is c i.e., Presence of depression Good prognostic factors Acute onset late onset onset after 35 years of age Presence of precipitating stressor Good premorbid adjustment catatonic best prognosis Paranoid 2nd best sho duration 6 months Married Positive symptoms Presence of depression family history of mood disorder first episode pyknic fat physique female sex good treatment compliance good response to treatment good social suppo presence of confusion or perplexity normal brain CT Scan outpatient treatment.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Triplet * Datasets: `eval-dataset` and `test-dataset` * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) | Metric | eval-dataset | test-dataset | |:--------------------|:-------------|:-------------| | **cosine_accuracy** | **1.0** | **0.97** | <!-- ## 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 ### Training Dataset #### Unnamed Dataset * Size: 800 training samples * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code> * Approximate statistics based on the first 800 samples: | | sentence1 | sentence2 | label | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------| | type | string | string | float | | details | <ul><li>min: 5 tokens</li><li>mean: 22.88 tokens</li><li>max: 205 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 81.77 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> | * Samples: | sentence1 | sentence2 | label | |:------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------| | <code>Triad of biotin deficiency is</code> | <code>Dermatitis, glossitis, Alopecia 407 H 314 Basic pathology 8th Biotin deficiency clinical features Adult Mental changes depression, hallucination , paresthesia, anorexia, nausea, A scaling, seborrheic and erythematous rash may occur around the eye, nose, mouth, as well as extremities 407 H Infant hypotonia, lethargy, apathy, alopecia and a characteristic rash that includes the ears.Symptoms of biotin deficiency includes Anaemia, loss of apepite dermatitis, glossitis 150 U. Satyanarayan Symptoms of biotin deficiency Dermatitis spectacle eyed appearance due to circumocular alopecia, pallor of skin membrane, depression, Lassitude, somnolence, anemia and hypercholesterolaemia 173 Rana Shinde 6th</code> | <code>1.0</code> | | <code>Drug responsible for the below condition</code> | <code>Thalidomide given to pregnant lady can lead to hypoplasia of limbs called as Phocomelia .</code> | <code>1.0</code> | | <code>Is benefit from procarbazine , lomustine , and vincristine in oligodendroglial tumors associated with mutation of IDH?</code> | <code>IDH mutational status identified patients with oligodendroglial tumors who did and did not benefit from alkylating agent chemotherapy with RT. Although patients with codeleted tumors lived longest, patients with noncodeleted IDH mutated tumors also lived longer after CRT.</code> | <code>1.0</code> | * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters: ```json { "scale": 20.0, "similarity_fct": "cos_sim" } ``` ### Evaluation Dataset #### Unnamed Dataset * Size: 100 evaluation samples * Columns: <code>question</code>, <code>answer</code>, and <code>hard_negative</code> * Approximate statistics based on the first 100 samples: | | question | answer | hard_negative | |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-------------------| | type | string | string | NoneType | | details | <ul><li>min: 5 tokens</li><li>mean: 22.52 tokens</li><li>max: 103 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 83.51 tokens</li><li>max: 403 tokens</li></ul> | <ul><li></li></ul> | * Samples: | question | answer | hard_negative | |:-----------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------| | <code>Hutchinsons secondaries In skull are due to tumors in</code> | <code>Adrenal neuroblastomas are malig8nant neoplasms arising from sympathetic neuroblsts in Medulla of adrenal gland Neuroblastoma is a cancer that develops from immature nerve cells found in several areas of the body.Neuroblastoma most commonly arises in and around the adrenalglands, which have similar origins to nerve cells and sit atop the kidneys.</code> | <code>None</code> | | <code>Proliferative glomerular deposits in the kidney are found in</code> | <code>IgA nephropathy or Berger s disease immune complex mediated glomerulonephritis defined by the presence of diffuse mesangial IgA deposits often associated with mesangial hypercellularity. Male preponderance, peak incidence in the second and third decades of life.Clinical and laboratory findings Two most common presentations recurrent episodes of macroscopic hematuria during or immediately following an upper respiratory infection often accompanied by proteinuria or persistent asymptomatic microscopic hematuriaIgA deposited in the mesangium is typically polymeric and of the IgA1 subclass. IgM, IgG, C3, or immunoglobulin light chains may be codistributed with IgAPresence of elevated serum IgA levels in 20 50 of patients, IgA deposition in skin biopsies in 15 55 of patients, elevated levels of secretory IgA and IgA fibronectin complexesIgA nephropathy is a benign disease mostly, 5 30 of patients go into a complete remission, with others having hematuria but well preserved renal functionAbou...</code> | <code>None</code> | | <code>Does meconium aspiration induce oxidative injury in the hippocampus of newborn piglets?</code> | <code>Our data thus suggest that oxidative injury associated with pulmonary, but not systemic, hemodynamic disturbances may contribute to hippocampal damage after meconium aspiration in newborns.</code> | <code>None</code> | * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters: ```json { "scale": 20.0, "similarity_fct": "cos_sim" } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `do_predict`: True - `eval_strategy`: steps - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `num_train_epochs`: 1 - `warmup_ratio`: 0.1 - `fp16`: True - `load_best_model_at_end`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: True - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 16 - `per_device_eval_batch_size`: 16 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 5e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 1 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: True - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `include_for_metrics`: [] - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `use_liger_kernel`: False - `eval_use_gather_object`: False - `average_tokens_across_devices`: False - `prompts`: None - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs | Epoch | Step | eval-dataset_cosine_accuracy | test-dataset_cosine_accuracy | |:-----:|:----:|:----------------------------:|:----------------------------:| | 0 | 0 | 1.0 | - | | 1.0 | 25 | - | 0.97 | ### Framework Versions - Python: 3.11.10 - Sentence Transformers: 3.3.0 - Transformers: 4.46.2 - PyTorch: 2.5.1+cu124 - Accelerate: 1.1.1 - Datasets: 3.1.0 - Tokenizers: 0.20.3 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
{"base_model": "intfloat/e5-base-v2", "language": ["en"], "library_name": "sentence-transformers", "license": "apache-2.0", "metrics": ["cosine_accuracy"], "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:800", "loss:MultipleNegativesRankingLoss"], "widget": [{"source_sentence": "For the following multiple choice question, select one correct answer. Let s think step by step. Question In a postoperative patient with a urinary diversion, the nurse should monitor the urine volume every hour. Below how many ml h of urine may indicate that the patient is dehydrated or has some type of internal obstruction or loss ? Options A. 200 ml h. B. 100 ml h. C. 80 ml h. D. 50 ml h. E. 30 ml h.", "sentences": ["Our approach shows that gene expression can be explained by a modest number of co localized transcription factors, however, information on cell type specific binding is crucial for understanding combinatorial gene regulation.", "We have developed a rapid, simple, sensitive and specific method to quantify β antithrombin activity using 1μL of plasma. β antithrombin significantly increases in patients with ischemic cerebrovascular disease during the acute event, probably by its release from the vasculature.", "A postoperative patient with a urinary diversion requires close monitoring of urine output to ensure that the diversion is functioning properly and that the patient is not experiencing any complications. Monitoring urine volume every hour is a crucial aspect of postoperative care in this scenario. To determine the correct answer, let s analyze each option A. 200 ml h This is a relatively high urine output, and it would not typically indicate dehydration or internal obstruction. In fact, a urine output of 200 ml h is generally considered adequate and may even be higher than the average urine output for a healthy adult. B. 100 ml h This is also a relatively high urine output and would not typically indicate dehydration or internal obstruction. A urine output of 100 ml h is still within the normal range and would not raise concerns about dehydration or obstruction. C. 80 ml h While this is a slightly lower urine output, it is still within the normal range and would not necessarily indicate dehydration or internal obstruction. D. 50 ml h This is a lower urine output, and it may start to raise concerns about dehydration or internal obstruction. However, it is still not the lowest option, and the nurse may need to consider other factors before determining the cause of the low urine output. E. 30 ml h This is the lowest urine output option, and it would likely indicate that the patient is dehydrated or has some type of internal obstruction or loss. A urine output of 30 ml h is generally considered low and would require immediate attention from the nurse to determine the cause and take corrective action. Considering the options, the correct answer is E. 30 ml h. A urine output of 30 ml h is a critical threshold that may indicate dehydration or internal obstruction, and the nurse should take immediate action to assess the patient s fluid status and the functioning of the urinary diversion. Answer E."]}, {"source_sentence": "In tumor lysis syndrome all of the following are seen except", "sentences": ["The results indicated that some polymorphic variations of drug metabolic and transporter genes may be potential biomarkers for clinical outcome of gemcitabine based therapy in patients with locally advanced pancreatic cancer.", "Variations in the prevalence of depressive symptoms occurred between centres, not always related to levels of illness. There was no consistent relationship between proportions of symptoms in well persons and cases for all centres. Few symptoms were present in 60 of the older population stereotypes of old age were not upheld.", "Tumor lysis syndrome Caused by destruction of large number of rapidly proliferating neoplastic cells. It frequently leads to ARF It is characterized by Hypocalcemia Hyperkalemia Lactic acidosis Hyperuricemia Hyperphosphatemia Most frequently associated with treatment of Burkitt lymphoma ALL CLL Solid tumors"]}, {"source_sentence": "Does prevalence of central venous occlusion in patients with chronic defibrillator lead?", "sentences": ["Intraoperative small dose IV haloperidol is effective against post operative nausea and vomiting with no significant effect on overall QoR. It may also attenuate the analgesic effects of morphine PCA.", "Intubation is generally done with the help of endotracheal tube ETT . The internal diameter of ETT used ranges between 3 and 8 mm depending on the age, sex, and size of nares of the patient. Potex north and south polar performed Rae tubes RAE right angled ETT and flexo metallic tubes are commonly used. Out of them, North Pole Rae tube is preferred in case of ankylosis patient due to the direction of the curve of ETT which favors its placement in restricted mouth opening as in case of ankylosis.", "The low prevalence of subclavian vein occlusion or severe stenosis among defibrillator recipients found in this study suggests that the placement of additional transvenous leads in a patient who already has a ventricular defibrillator is feasible in a high percentage of patients 93 ."]}, {"source_sentence": "Is mode of presentation of B3 breast core biopsies screen detected or symptomatic a distinguishing factor in the final histopathologic result or risk of diagnosis of malignancy?", "sentences": ["This observation may indicate a considerable difference in cardiovascular risk between genotype groups as a result of an increase in FVIIa after a fat rich diet.", "Mode of patient presentation with a screen detected or symptomatic lesion was not a distinguishing factor for breast histopathologic subclassification or for the final cancer diagnosis in patients whose breast core biopsy was classified as B3.", "Ans. is a i.e., Apaf 1o One of these proteins is cytochrome c, well known for its role in mitochondrial respiration. In the cytosol, cytochrome C binds to a protein called Apaf 1 apoptosis activating factor 1 , and the complex activates caspase 9. Bc1 2 and Bcl x may also directly inhibit Apaf 1 activation, and their loss from cells may permit activation of Apaf 1 ."]}, {"source_sentence": "Is the Danish National Hospital Register a valuable study base for epidemiologic research in febrile seizures?", "sentences": ["Interstitial cystitis IC is a condition that causes discomfort or pain in the bladder and a need to urinate frequently and urgently. It is far more common in women than in men. The symptoms vary from person to person. Some people may have pain without urgency or frequency. Others have urgency and frequency without pain. Women s symptoms often get worse during their periods. They may also have pain with sexual intercourse. The cause of IC isn t known. There is no one test to tell if you have it. Doctors often run tests to rule out other possible causes of symptoms. There is no cure for IC, but treatments can help most people feel better. They include Distending, or inflating, the bladder Bathing the inside of the bladder with a drug solution Oral medicines Electrical nerve stimulation Physical therapy Lifestyle changes Bladder training In rare cases, surgery NIH National Institute of Diabetes and Digestive and Kidney Diseases", "Ans. is c i.e., Presence of depression Good prognostic factors Acute onset late onset onset after 35 years of age Presence of precipitating stressor Good premorbid adjustment catatonic best prognosis Paranoid 2nd best sho duration 6 months Married Positive symptoms Presence of depression family history of mood disorder first episode pyknic fat physique female sex good treatment compliance good response to treatment good social suppo presence of confusion or perplexity normal brain CT Scan outpatient treatment.", "The Danish National Hospital Register is a valuable tool for epidemiologic research in febrile seizures."]}], "model-index": [{"name": "MPNet base trained on AllNLI triplets", "results": [{"task": {"type": "triplet", "name": "Triplet"}, "dataset": {"name": "eval dataset", "type": "eval-dataset"}, "metrics": [{"type": "cosine_accuracy", "value": 1.0, "name": "Cosine Accuracy"}]}, {"task": {"type": "triplet", "name": "Triplet"}, "dataset": {"name": "test dataset", "type": "test-dataset"}, "metrics": [{"type": "cosine_accuracy", "value": 0.97, "name": "Cosine Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,502
gchhablani/bert-base-cased-finetuned-mrpc
gchhablani
text-classification
[ "transformers", "pytorch", "tensorboard", "bert", "text-classification", "generated_from_trainer", "fnet-bert-base-comparison", "en", "dataset:glue", "arxiv:2105.03824", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-03-02T23:29:05Z
2021-09-20T09:07:44+00:00
115
0
--- datasets: - glue language: - en license: apache-2.0 metrics: - accuracy - f1 tags: - generated_from_trainer - fnet-bert-base-comparison model-index: - name: bert-base-cased-finetuned-mrpc results: - task: type: text-classification name: Text Classification dataset: name: GLUE MRPC type: glue args: mrpc metrics: - type: accuracy value: 0.8602941176470589 name: Accuracy - type: f1 value: 0.9025641025641027 name: F1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bert-base-cased-finetuned-mrpc This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on the GLUE MRPC dataset. It achieves the following results on the evaluation set: - Loss: 0.7132 - Accuracy: 0.8603 - F1: 0.9026 - Combined Score: 0.8814 The model was fine-tuned to compare [google/fnet-base](https://huggingface.co/google/fnet-base) as introduced in [this paper](https://arxiv.org/abs/2105.03824) against [bert-base-cased](https://huggingface.co/bert-base-cased). ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure This model is trained using the [run_glue](https://github.com/huggingface/transformers/blob/master/examples/pytorch/text-classification/run_glue.py) script. The following command was used: ```bash #!/usr/bin/bash python ../run_glue.py \\n --model_name_or_path bert-base-cased \\n --task_name mrpc \\n --do_train \\n --do_eval \\n --max_seq_length 512 \\n --per_device_train_batch_size 16 \\n --learning_rate 2e-5 \\n --num_train_epochs 5 \\n --output_dir bert-base-cased-finetuned-mrpc \\n --push_to_hub \\n --hub_strategy all_checkpoints \\n --logging_strategy epoch \\n --save_strategy epoch \\n --evaluation_strategy epoch \\n``` ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5.0 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Combined Score | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:--------------:| | 0.5981 | 1.0 | 230 | 0.4580 | 0.7892 | 0.8562 | 0.8227 | | 0.3739 | 2.0 | 460 | 0.3806 | 0.8480 | 0.8942 | 0.8711 | | 0.1991 | 3.0 | 690 | 0.4879 | 0.8529 | 0.8958 | 0.8744 | | 0.1286 | 4.0 | 920 | 0.6342 | 0.8529 | 0.8986 | 0.8758 | | 0.0812 | 5.0 | 1150 | 0.7132 | 0.8603 | 0.9026 | 0.8814 | ### Framework versions - Transformers 4.11.0.dev0 - Pytorch 1.9.0 - Datasets 1.12.1 - Tokenizers 0.10.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bert-base-cased-finetuned-mrpc This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on the GLUE MRPC dataset. It achieves the following results on the evaluation set: - Loss: 0.7132 - Accuracy: 0.8603 - F1: 0.9026 - Combined Score: 0.8814 The model was fine-tuned to compare [google/fnet-base](https://huggingface.co/google/fnet-base) as introduced in [this paper](https://arxiv.org/abs/2105.03824) against [bert-base-cased](https://huggingface.co/bert-base-cased). ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure This model is trained using the [run_glue](https://github.com/huggingface/transformers/blob/master/examples/pytorch/text-classification/run_glue.py) script. The following command was used: ```bash #!/usr/bin/bash python ../run_glue.py \\n --model_name_or_path bert-base-cased \\n --task_name mrpc \\n --do_train \\n --do_eval \\n --max_seq_length 512 \\n --per_device_train_batch_size 16 \\n --learning_rate 2e-5 \\n --num_train_epochs 5 \\n --output_dir bert-base-cased-finetuned-mrpc \\n --push_to_hub \\n --hub_strategy all_checkpoints \\n --logging_strategy epoch \\n --save_strategy epoch \\n --evaluation_strategy epoch \\n``` ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 5.0 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Combined Score | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:--------------:| | 0.5981 | 1.0 | 230 | 0.4580 | 0.7892 | 0.8562 | 0.8227 | | 0.3739 | 2.0 | 460 | 0.3806 | 0.8480 | 0.8942 | 0.8711 | | 0.1991 | 3.0 | 690 | 0.4879 | 0.8529 | 0.8958 | 0.8744 | | 0.1286 | 4.0 | 920 | 0.6342 | 0.8529 | 0.8986 | 0.8758 | | 0.0812 | 5.0 | 1150 | 0.7132 | 0.8603 | 0.9026 | 0.8814 | ### Framework versions - Transformers 4.11.0.dev0 - Pytorch 1.9.0 - Datasets 1.12.1 - Tokenizers 0.10.3
{"datasets": ["glue"], "language": ["en"], "license": "apache-2.0", "metrics": ["accuracy", "f1"], "tags": ["generated_from_trainer", "fnet-bert-base-comparison"], "model-index": [{"name": "bert-base-cased-finetuned-mrpc", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "GLUE MRPC", "type": "glue", "args": "mrpc"}, "metrics": [{"type": "accuracy", "value": 0.8602941176470589, "name": "Accuracy"}, {"type": "f1", "value": 0.9025641025641027, "name": "F1"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,503
gokuls/distilbert_add_GLUE_Experiment_qnli_96
gokuls
text-classification
[ "transformers", "pytorch", "tensorboard", "distilbert", "text-classification", "generated_from_trainer", "en", "dataset:glue", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-01-26T12:33:20Z
2023-01-26T12:47:45+00:00
137
0
--- datasets: - glue language: - en license: apache-2.0 metrics: - accuracy tags: - generated_from_trainer model-index: - name: distilbert_add_GLUE_Experiment_qnli_96 results: - task: type: text-classification name: Text Classification dataset: name: GLUE QNLI type: glue config: qnli split: validation args: qnli metrics: - type: accuracy value: 0.6071755445725792 name: Accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert_add_GLUE_Experiment_qnli_96 This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the GLUE QNLI dataset. It achieves the following results on the evaluation set: - Loss: 0.6575 - Accuracy: 0.6072 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 256 - eval_batch_size: 256 - seed: 10 - distributed_type: multi-GPU - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 50 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 0.6932 | 1.0 | 410 | 0.6931 | 0.4946 | | 0.6932 | 2.0 | 820 | 0.6932 | 0.4946 | | 0.6932 | 3.0 | 1230 | 0.6931 | 0.5054 | | 0.6826 | 4.0 | 1640 | 0.6659 | 0.5967 | | 0.6539 | 5.0 | 2050 | 0.6575 | 0.6072 | | 0.6403 | 6.0 | 2460 | 0.6608 | 0.6074 | | 0.6288 | 7.0 | 2870 | 0.6702 | 0.6039 | | 0.6186 | 8.0 | 3280 | 0.6730 | 0.6022 | | 0.6094 | 9.0 | 3690 | 0.6740 | 0.6013 | | 0.5995 | 10.0 | 4100 | 0.6906 | 0.5920 | ### Framework versions - Transformers 4.26.0 - Pytorch 1.14.0a0+410ce96 - Datasets 2.8.0 - Tokenizers 0.13.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbert_add_GLUE_Experiment_qnli_96 This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the GLUE QNLI dataset. It achieves the following results on the evaluation set: - Loss: 0.6575 - Accuracy: 0.6072 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 256 - eval_batch_size: 256 - seed: 10 - distributed_type: multi-GPU - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 50 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 0.6932 | 1.0 | 410 | 0.6931 | 0.4946 | | 0.6932 | 2.0 | 820 | 0.6932 | 0.4946 | | 0.6932 | 3.0 | 1230 | 0.6931 | 0.5054 | | 0.6826 | 4.0 | 1640 | 0.6659 | 0.5967 | | 0.6539 | 5.0 | 2050 | 0.6575 | 0.6072 | | 0.6403 | 6.0 | 2460 | 0.6608 | 0.6074 | | 0.6288 | 7.0 | 2870 | 0.6702 | 0.6039 | | 0.6186 | 8.0 | 3280 | 0.6730 | 0.6022 | | 0.6094 | 9.0 | 3690 | 0.6740 | 0.6013 | | 0.5995 | 10.0 | 4100 | 0.6906 | 0.5920 | ### Framework versions - Transformers 4.26.0 - Pytorch 1.14.0a0+410ce96 - Datasets 2.8.0 - Tokenizers 0.13.2
{"datasets": ["glue"], "language": ["en"], "license": "apache-2.0", "metrics": ["accuracy"], "tags": ["generated_from_trainer"], "model-index": [{"name": "distilbert_add_GLUE_Experiment_qnli_96", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "GLUE QNLI", "type": "glue", "config": "qnli", "split": "validation", "args": "qnli"}, "metrics": [{"type": "accuracy", "value": 0.6071755445725792, "name": "Accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,504
QHWU1228/marian-finetuned-kde4-en-to-fr
QHWU1228
translation
[ "transformers", "tensorboard", "safetensors", "marian", "text2text-generation", "translation", "generated_from_trainer", "dataset:kde4", "base_model:Helsinki-NLP/opus-mt-en-fr", "base_model:finetune:Helsinki-NLP/opus-mt-en-fr", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-11-26T03:55:20Z
2024-11-27T05:09:22+00:00
5
0
--- base_model: Helsinki-NLP/opus-mt-en-fr datasets: - kde4 library_name: transformers license: apache-2.0 metrics: - bleu tags: - translation - generated_from_trainer model-index: - name: marian-finetuned-kde4-en-to-fr results: - task: type: text2text-generation name: Sequence-to-sequence Language Modeling dataset: name: kde4 type: kde4 config: en-fr split: train args: en-fr metrics: - type: bleu value: 52.90204973205105 name: Bleu --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # marian-finetuned-kde4-en-to-fr This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr) on the kde4 dataset. It achieves the following results on the evaluation set: - Loss: 0.8554 - Model Preparation Time: 0.0081 - Bleu: 52.9020 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 64 - seed: 42 - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.46.2 - Pytorch 2.5.1+cu121 - Datasets 3.1.0 - Tokenizers 0.20.3
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # marian-finetuned-kde4-en-to-fr This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr) on the kde4 dataset. It achieves the following results on the evaluation set: - Loss: 0.8554 - Model Preparation Time: 0.0081 - Bleu: 52.9020 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 32 - eval_batch_size: 64 - seed: 42 - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results ### Framework versions - Transformers 4.46.2 - Pytorch 2.5.1+cu121 - Datasets 3.1.0 - Tokenizers 0.20.3
{"base_model": "Helsinki-NLP/opus-mt-en-fr", "datasets": ["kde4"], "library_name": "transformers", "license": "apache-2.0", "metrics": ["bleu"], "tags": ["translation", "generated_from_trainer"], "model-index": [{"name": "marian-finetuned-kde4-en-to-fr", "results": [{"task": {"type": "text2text-generation", "name": "Sequence-to-sequence Language Modeling"}, "dataset": {"name": "kde4", "type": "kde4", "config": "en-fr", "split": "train", "args": "en-fr"}, "metrics": [{"type": "bleu", "value": 52.90204973205105, "name": "Bleu"}]}]}]}
task
[ "TRANSLATION" ]
46,505
mqy/mt5-small-finetuned-try2
mqy
summarization
[ "transformers", "pytorch", "tensorboard", "mt5", "text2text-generation", "summarization", "generated_from_trainer", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2023-03-08T03:42:26Z
2023-03-08T03:56:37+00:00
22
0
--- license: apache-2.0 metrics: - rouge tags: - summarization - generated_from_trainer model-index: - name: mt5-small-finetuned-try2 results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # mt5-small-finetuned-try2 This model is a fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 2.8573 - Rouge1: 7.79 - Rouge2: 2.18 - Rougel: 7.75 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 10 - eval_batch_size: 10 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 1 ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 1.13.1+cu116 - Datasets 2.10.1 - Tokenizers 0.13.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # mt5-small-finetuned-try2 This model is a fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 2.8573 - Rouge1: 7.79 - Rouge2: 2.18 - Rougel: 7.75 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0001 - train_batch_size: 10 - eval_batch_size: 10 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 1 ### Training results ### Framework versions - Transformers 4.26.1 - Pytorch 1.13.1+cu116 - Datasets 2.10.1 - Tokenizers 0.13.2
{"license": "apache-2.0", "metrics": ["rouge"], "tags": ["summarization", "generated_from_trainer"], "model-index": [{"name": "mt5-small-finetuned-try2", "results": []}]}
task
[ "SUMMARIZATION" ]
46,506
mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF
mradermacher
null
[ "transformers", "gguf", "Cantonese", "chat", "Llama3", "en", "zh", "dataset:jed351/cantonese-wikipedia", "dataset:lordjia/Cantonese_English_Translation", "base_model:lordjia/Llama-3-Cantonese-8B-Instruct", "base_model:quantized:lordjia/Llama-3-Cantonese-8B-Instruct", "license:llama3", "endpoints_compatible", "region:us", "conversational" ]
2024-07-19T02:09:10Z
2024-07-19T08:38:37+00:00
440
0
--- base_model: lordjia/Llama-3-Cantonese-8B-Instruct datasets: - jed351/cantonese-wikipedia - lordjia/Cantonese_English_Translation language: - en - zh library_name: transformers license: llama3 tags: - Cantonese - chat - Llama3 quantized_by: mradermacher --- ## About <!-- ### quantize_version: 2 --> <!-- ### output_tensor_quantised: 1 --> <!-- ### convert_type: hf --> <!-- ### vocab_type: --> <!-- ### tags: --> static quants of https://huggingface.co/lordjia/Llama-3-Cantonese-8B-Instruct <!-- provided-files --> weighted/imatrix quants seem not to be available (by me) at this time. If they do not show up a week or so after the static ones, I have probably not planned for them. Feel free to request them by opening a Community Discussion. ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q2_K.gguf) | Q2_K | 3.3 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ3_XS.gguf) | IQ3_XS | 3.6 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q3_K_S.gguf) | Q3_K_S | 3.8 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ3_S.gguf) | IQ3_S | 3.8 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ3_M.gguf) | IQ3_M | 3.9 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q3_K_M.gguf) | Q3_K_M | 4.1 | lower quality | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q3_K_L.gguf) | Q3_K_L | 4.4 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ4_XS.gguf) | IQ4_XS | 4.6 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q4_K_S.gguf) | Q4_K_S | 4.8 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q4_K_M.gguf) | Q4_K_M | 5.0 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q5_K_S.gguf) | Q5_K_S | 5.7 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q5_K_M.gguf) | Q5_K_M | 5.8 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q6_K.gguf) | Q6_K | 6.7 | very good quality | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q8_0.gguf) | Q8_0 | 8.6 | fast, best quality | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.f16.gguf) | f16 | 16.2 | 16 bpw, overkill | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. <!-- end -->
null
Non_BioNLP
## About <!-- ### quantize_version: 2 --> <!-- ### output_tensor_quantised: 1 --> <!-- ### convert_type: hf --> <!-- ### vocab_type: --> <!-- ### tags: --> static quants of https://huggingface.co/lordjia/Llama-3-Cantonese-8B-Instruct <!-- provided-files --> weighted/imatrix quants seem not to be available (by me) at this time. If they do not show up a week or so after the static ones, I have probably not planned for them. Feel free to request them by opening a Community Discussion. ## Usage If you are unsure how to use GGUF files, refer to one of [TheBloke's READMEs](https://huggingface.co/TheBloke/KafkaLM-70B-German-V0.1-GGUF) for more details, including on how to concatenate multi-part files. ## Provided Quants (sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants) | Link | Type | Size/GB | Notes | |:-----|:-----|--------:|:------| | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q2_K.gguf) | Q2_K | 3.3 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ3_XS.gguf) | IQ3_XS | 3.6 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q3_K_S.gguf) | Q3_K_S | 3.8 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ3_S.gguf) | IQ3_S | 3.8 | beats Q3_K* | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ3_M.gguf) | IQ3_M | 3.9 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q3_K_M.gguf) | Q3_K_M | 4.1 | lower quality | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q3_K_L.gguf) | Q3_K_L | 4.4 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.IQ4_XS.gguf) | IQ4_XS | 4.6 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q4_K_S.gguf) | Q4_K_S | 4.8 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q4_K_M.gguf) | Q4_K_M | 5.0 | fast, recommended | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q5_K_S.gguf) | Q5_K_S | 5.7 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q5_K_M.gguf) | Q5_K_M | 5.8 | | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q6_K.gguf) | Q6_K | 6.7 | very good quality | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.Q8_0.gguf) | Q8_0 | 8.6 | fast, best quality | | [GGUF](https://huggingface.co/mradermacher/Llama-3-Cantonese-8B-Instruct-GGUF/resolve/main/Llama-3-Cantonese-8B-Instruct.f16.gguf) | f16 | 16.2 | 16 bpw, overkill | Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better): ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png) And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9 ## FAQ / Model Request See https://huggingface.co/mradermacher/model_requests for some answers to questions you might have and/or if you want some other model quantized. ## Thanks I thank my company, [nethype GmbH](https://www.nethype.de/), for letting me use its servers and providing upgrades to my workstation to enable this work in my free time. <!-- end -->
{"base_model": "lordjia/Llama-3-Cantonese-8B-Instruct", "datasets": ["jed351/cantonese-wikipedia", "lordjia/Cantonese_English_Translation"], "language": ["en", "zh"], "library_name": "transformers", "license": "llama3", "tags": ["Cantonese", "chat", "Llama3"], "quantized_by": "mradermacher"}
task
[ "TRANSLATION" ]
46,507
sordonia/library-phi_2-kv
sordonia
null
[ "region:us" ]
2023-12-06T04:56:33Z
2023-12-21T19:28:42+00:00
0
0
--- {} --- Number of experts present in the library: 287 | Expert Name | Base Model | Trained on | Adapter Type | | --- | --- | --- | --- | | clinical_knowledge | phi-2 | sordonia/mmlu-qa-aug-10k-flat/clinical_knowledge | kv_adapter | | college_biology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_biology | kv_adapter | | jurisprudence | phi-2 | sordonia/mmlu-qa-aug-10k-flat/jurisprudence | kv_adapter | | high_school_psychology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_psychology | kv_adapter | | nutrition | phi-2 | sordonia/mmlu-qa-aug-10k-flat/nutrition | kv_adapter | | electrical_engineering | phi-2 | sordonia/mmlu-qa-aug-10k-flat/electrical_engineering | kv_adapter | | marketing | phi-2 | sordonia/mmlu-qa-aug-10k-flat/marketing | kv_adapter | | sociology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/sociology | kv_adapter | | moral_scenarios | phi-2 | sordonia/mmlu-qa-aug-10k-flat/moral_scenarios | kv_adapter | | econometrics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/econometrics | kv_adapter | | college_chemistry | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_chemistry | kv_adapter | | high_school_computer_science | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_computer_science | kv_adapter | | professional_medicine | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_medicine | kv_adapter | | philosophy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/philosophy | kv_adapter | | high_school_european_history | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_european_history | kv_adapter | | prehistory | phi-2 | sordonia/mmlu-qa-aug-10k-flat/prehistory | kv_adapter | | moral_disputes | phi-2 | sordonia/mmlu-qa-aug-10k-flat/moral_disputes | kv_adapter | | us_foreign_policy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/us_foreign_policy | kv_adapter | | college_medicine | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_medicine | kv_adapter | | professional_accounting | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_accounting | kv_adapter | | professional_law | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_law | kv_adapter | | virology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/virology | kv_adapter | | international_law | phi-2 | sordonia/mmlu-qa-aug-10k-flat/international_law | kv_adapter | | abstract_algebra | phi-2 | sordonia/mmlu-qa-aug-10k-flat/abstract_algebra | kv_adapter | | logical_fallacies | phi-2 | sordonia/mmlu-qa-aug-10k-flat/logical_fallacies | kv_adapter | | formal_logic | phi-2 | sordonia/mmlu-qa-aug-10k-flat/formal_logic | kv_adapter | | high_school_chemistry | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_chemistry | kv_adapter | | public_relations | phi-2 | sordonia/mmlu-qa-aug-10k-flat/public_relations | kv_adapter | | conceptual_physics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/conceptual_physics | kv_adapter | | professional_psychology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_psychology | kv_adapter | | human_aging | phi-2 | sordonia/mmlu-qa-aug-10k-flat/human_aging | kv_adapter | | anatomy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/anatomy | kv_adapter | | high_school_us_history | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_us_history | kv_adapter | | management | phi-2 | sordonia/mmlu-qa-aug-10k-flat/management | kv_adapter | | high_school_statistics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_statistics | kv_adapter | | high_school_biology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_biology | kv_adapter | | college_computer_science | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_computer_science | kv_adapter | | college_mathematics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_mathematics | kv_adapter | | miscellaneous | phi-2 | sordonia/mmlu-qa-aug-10k-flat/miscellaneous | kv_adapter | | world_religions | phi-2 | sordonia/mmlu-qa-aug-10k-flat/world_religions | kv_adapter | | human_sexuality | phi-2 | sordonia/mmlu-qa-aug-10k-flat/human_sexuality | kv_adapter | | high_school_world_history | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_world_history | kv_adapter | | college_physics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_physics | kv_adapter | | global_facts | phi-2 | sordonia/mmlu-qa-aug-10k-flat/global_facts | kv_adapter | | high_school_physics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_physics | kv_adapter | | high_school_mathematics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_mathematics | kv_adapter | | high_school_macroeconomics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_macroeconomics | kv_adapter | | high_school_geography | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_geography | kv_adapter | | high_school_microeconomics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_microeconomics | kv_adapter | | computer_security | phi-2 | sordonia/mmlu-qa-aug-10k-flat/computer_security | kv_adapter | | machine_learning | phi-2 | sordonia/mmlu-qa-aug-10k-flat/machine_learning | kv_adapter | | business_ethics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/business_ethics | kv_adapter | | astronomy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/astronomy | kv_adapter | | security_studies | phi-2 | sordonia/mmlu-qa-aug-10k-flat/security_studies | kv_adapter | | medical_genetics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/medical_genetics | kv_adapter | | elementary_mathematics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/elementary_mathematics | kv_adapter | | high_school_government_and_politics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_government_and_politics | kv_adapter | | dbpedia_14_pick_one_category_for_the_following_text | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_pick_one_category_for_the_following_text | kv_adapter | | cos_e_v1_11_generate_explanation_given_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_generate_explanation_given_text | kv_adapter | | glue_stsb_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_stsb_2_0_0 | kv_adapter | | niv2_text_matching | phi-2 | sordonia/adauni-v1-flat/niv2_text_matching | kv_adapter | | duorc_SelfRC_question_answering | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_question_answering | kv_adapter | | glue_mnli_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_mnli_2_0_0 | kv_adapter | | qasc_is_correct_2 | phi-2 | sordonia/adauni-v1-flat/qasc_is_correct_2 | kv_adapter | | niv2_sentence_perturbation | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_perturbation | kv_adapter | | cos_e_v1_11_question_description_option_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_description_option_text | kv_adapter | | niv2_question_generation | phi-2 | sordonia/adauni-v1-flat/niv2_question_generation | kv_adapter | | duorc_SelfRC_answer_question | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_answer_question | kv_adapter | | kilt_tasks_hotpotqa_straighforward_qa | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_straighforward_qa | kv_adapter | | niv2_entity_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_entity_relation_classification | kv_adapter | | airoboros | phi-2 | sordonia/adauni-v1-flat/airoboros | kv_adapter | | niv2_text_simplification | phi-2 | sordonia/adauni-v1-flat/niv2_text_simplification | kv_adapter | | niv2_code_to_text | phi-2 | sordonia/adauni-v1-flat/niv2_code_to_text | kv_adapter | | quarel_heres_a_story | phi-2 | sordonia/adauni-v1-flat/quarel_heres_a_story | kv_adapter | | coqa_1_0_0 | phi-2 | sordonia/adauni-v1-flat/coqa_1_0_0 | kv_adapter | | duorc_SelfRC_title_generation | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_title_generation | kv_adapter | | cot_creak_ii | phi-2 | sordonia/adauni-v1-flat/cot_creak_ii | kv_adapter | | adversarial_qa_dbidaf_based_on | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_based_on | kv_adapter | | ARB | phi-2 | sordonia/adauni-v1-flat/ARB | kv_adapter | | glue_cola_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_cola_2_0_0 | kv_adapter | | dream_answer_to_dialogue | phi-2 | sordonia/adauni-v1-flat/dream_answer_to_dialogue | kv_adapter | | niv2_paraphrasing | phi-2 | sordonia/adauni-v1-flat/niv2_paraphrasing | kv_adapter | | quail_no_prompt_text | phi-2 | sordonia/adauni-v1-flat/quail_no_prompt_text | kv_adapter | | cos_e_v1_11_rationale | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_rationale | kv_adapter | | niv2_linguistic_probing | phi-2 | sordonia/adauni-v1-flat/niv2_linguistic_probing | kv_adapter | | cos_e_v1_11_question_description_option_id | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_description_option_id | kv_adapter | | adversarial_qa_droberta_answer_the_following_q | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_answer_the_following_q | kv_adapter | | dream_generate_last_utterance | phi-2 | sordonia/adauni-v1-flat/dream_generate_last_utterance | kv_adapter | | quail_context_question_answer_description_id | phi-2 | sordonia/adauni-v1-flat/quail_context_question_answer_description_id | kv_adapter | | niv2_textual_entailment | phi-2 | sordonia/adauni-v1-flat/niv2_textual_entailment | kv_adapter | | cot_strategyqa | phi-2 | sordonia/adauni-v1-flat/cot_strategyqa | kv_adapter | | app_reviews_convert_to_star_rating | phi-2 | sordonia/adauni-v1-flat/app_reviews_convert_to_star_rating | kv_adapter | | niv2_word_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_word_relation_classification | kv_adapter | | quail_context_question_description_answer_text | phi-2 | sordonia/adauni-v1-flat/quail_context_question_description_answer_text | kv_adapter | | niv2_preposition_prediction | phi-2 | sordonia/adauni-v1-flat/niv2_preposition_prediction | kv_adapter | | niv2_spelling_error_detection | phi-2 | sordonia/adauni-v1-flat/niv2_spelling_error_detection | kv_adapter | | adversarial_qa_dbidaf_tell_what_it_is | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_tell_what_it_is | kv_adapter | | quarel_choose_between | phi-2 | sordonia/adauni-v1-flat/quarel_choose_between | kv_adapter | | quail_description_context_question_answer_text | phi-2 | sordonia/adauni-v1-flat/quail_description_context_question_answer_text | kv_adapter | | duorc_ParaphraseRC_generate_question | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_generate_question | kv_adapter | | niv2_dialogue_state_tracking | phi-2 | sordonia/adauni-v1-flat/niv2_dialogue_state_tracking | kv_adapter | | niv2_gender_classification | phi-2 | sordonia/adauni-v1-flat/niv2_gender_classification | kv_adapter | | dbpedia_14_given_a_list_of_category_what_does_the_title_belong_to | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_given_a_list_of_category_what_does_the_title_belong_to | kv_adapter | | duorc_SelfRC_generate_question_by_answer | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_generate_question_by_answer | kv_adapter | | quac_1_0_0 | phi-2 | sordonia/adauni-v1-flat/quac_1_0_0 | kv_adapter | | duorc_ParaphraseRC_movie_director | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_movie_director | kv_adapter | | cos_e_v1_11_aligned_with_common_sense | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_aligned_with_common_sense | kv_adapter | | niv2_section_classification | phi-2 | sordonia/adauni-v1-flat/niv2_section_classification | kv_adapter | | quail_no_prompt_id | phi-2 | sordonia/adauni-v1-flat/quail_no_prompt_id | kv_adapter | | duorc_ParaphraseRC_extract_answer | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_extract_answer | kv_adapter | | adversarial_qa_dbidaf_question_context_answer | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_question_context_answer | kv_adapter | | qasc_qa_with_separated_facts_3 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_3 | kv_adapter | | niv2_wrong_candidate_generation | phi-2 | sordonia/adauni-v1-flat/niv2_wrong_candidate_generation | kv_adapter | | adversarial_qa_dbidaf_generate_question | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_generate_question | kv_adapter | | niv2_title_generation | phi-2 | sordonia/adauni-v1-flat/niv2_title_generation | kv_adapter | | adversarial_qa_droberta_tell_what_it_is | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_tell_what_it_is | kv_adapter | | piqa_1_0_0 | phi-2 | sordonia/adauni-v1-flat/piqa_1_0_0 | kv_adapter | | quartz_having_read_above_passage | phi-2 | sordonia/adauni-v1-flat/quartz_having_read_above_passage | kv_adapter | | natural_questions_open_1_0_0 | phi-2 | sordonia/adauni-v1-flat/natural_questions_open_1_0_0 | kv_adapter | | duorc_SelfRC_movie_director | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_movie_director | kv_adapter | | qasc_qa_with_separated_facts_2 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_2 | kv_adapter | | niv2_fill_in_the_blank | phi-2 | sordonia/adauni-v1-flat/niv2_fill_in_the_blank | kv_adapter | | quartz_paragraph_question_plain_concat | phi-2 | sordonia/adauni-v1-flat/quartz_paragraph_question_plain_concat | kv_adapter | | niv2_sentence_expansion | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_expansion | kv_adapter | | app_reviews_convert_to_rating | phi-2 | sordonia/adauni-v1-flat/app_reviews_convert_to_rating | kv_adapter | | duorc_ParaphraseRC_generate_question_by_answer | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_generate_question_by_answer | kv_adapter | | anli_r1_0_1_0 | phi-2 | sordonia/adauni-v1-flat/anli_r1_0_1_0 | kv_adapter | | cos_e_v1_11_question_option_description_id | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_option_description_id | kv_adapter | | niv2_question_rewriting | phi-2 | sordonia/adauni-v1-flat/niv2_question_rewriting | kv_adapter | | duorc_SelfRC_extract_answer | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_extract_answer | kv_adapter | | qasc_qa_with_separated_facts_4 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_4 | kv_adapter | | niv2_question_answering | phi-2 | sordonia/adauni-v1-flat/niv2_question_answering | kv_adapter | | niv2_answerability_classification | phi-2 | sordonia/adauni-v1-flat/niv2_answerability_classification | kv_adapter | | niv2_sentence_composition | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_composition | kv_adapter | | niv2_text_categorization | phi-2 | sordonia/adauni-v1-flat/niv2_text_categorization | kv_adapter | | kilt_tasks_hotpotqa_complex_question | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_complex_question | kv_adapter | | glue_wnli_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_wnli_2_0_0 | kv_adapter | | niv2_question_understanding | phi-2 | sordonia/adauni-v1-flat/niv2_question_understanding | kv_adapter | | cos_e_v1_11_i_think | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_i_think | kv_adapter | | niv2_word_analogy | phi-2 | sordonia/adauni-v1-flat/niv2_word_analogy | kv_adapter | | aeslc_1_0_0 | phi-2 | sordonia/adauni-v1-flat/aeslc_1_0_0 | kv_adapter | | niv2_translation | phi-2 | sordonia/adauni-v1-flat/niv2_translation | kv_adapter | | adversarial_qa_dbert_generate_question | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_generate_question | kv_adapter | | drop_2_0_0 | phi-2 | sordonia/adauni-v1-flat/drop_2_0_0 | kv_adapter | | definite_pronoun_resolution_1_1_0 | phi-2 | sordonia/adauni-v1-flat/definite_pronoun_resolution_1_1_0 | kv_adapter | | niv2_sentence_compression | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_compression | kv_adapter | | quail_description_context_question_text | phi-2 | sordonia/adauni-v1-flat/quail_description_context_question_text | kv_adapter | | niv2_coreference_resolution | phi-2 | sordonia/adauni-v1-flat/niv2_coreference_resolution | kv_adapter | | quarel_do_not_use | phi-2 | sordonia/adauni-v1-flat/quarel_do_not_use | kv_adapter | | adversarial_qa_dbidaf_answer_the_following_q | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_answer_the_following_q | kv_adapter | | duorc_ParaphraseRC_question_answering | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_question_answering | kv_adapter | | bool_q_1_0_0 | phi-2 | sordonia/adauni-v1-flat/bool_q_1_0_0 | kv_adapter | | ag_news_subset_1_0_0 | phi-2 | sordonia/adauni-v1-flat/ag_news_subset_1_0_0 | kv_adapter | | duorc_SelfRC_build_story_around_qa | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_build_story_around_qa | kv_adapter | | qasc_qa_with_separated_facts_1 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_1 | kv_adapter | | niv2_text_completion | phi-2 | sordonia/adauni-v1-flat/niv2_text_completion | kv_adapter | | guanaco | phi-2 | sordonia/adauni-v1-flat/guanaco | kv_adapter | | quartz_answer_question_based_on | phi-2 | sordonia/adauni-v1-flat/quartz_answer_question_based_on | kv_adapter | | lambada_1_0_0 | phi-2 | sordonia/adauni-v1-flat/lambada_1_0_0 | kv_adapter | | dream_read_the_following_conversation_and_answer_the_question | phi-2 | sordonia/adauni-v1-flat/dream_read_the_following_conversation_and_answer_the_question | kv_adapter | | quail_context_question_description_answer_id | phi-2 | sordonia/adauni-v1-flat/quail_context_question_description_answer_id | kv_adapter | | glue_mrpc_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_mrpc_2_0_0 | kv_adapter | | niv2_sentiment_analysis | phi-2 | sordonia/adauni-v1-flat/niv2_sentiment_analysis | kv_adapter | | niv2_negotiation_strategy_detection | phi-2 | sordonia/adauni-v1-flat/niv2_negotiation_strategy_detection | kv_adapter | | quail_context_description_question_answer_text | phi-2 | sordonia/adauni-v1-flat/quail_context_description_question_answer_text | kv_adapter | | niv2_cause_effect_classification | phi-2 | sordonia/adauni-v1-flat/niv2_cause_effect_classification | kv_adapter | | adversarial_qa_droberta_question_context_answer | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_question_context_answer | kv_adapter | | quartz_use_info_from_question_paragraph | phi-2 | sordonia/adauni-v1-flat/quartz_use_info_from_question_paragraph | kv_adapter | | niv2_entity_generation | phi-2 | sordonia/adauni-v1-flat/niv2_entity_generation | kv_adapter | | niv2_question_decomposition | phi-2 | sordonia/adauni-v1-flat/niv2_question_decomposition | kv_adapter | | niv2_summarization | phi-2 | sordonia/adauni-v1-flat/niv2_summarization | kv_adapter | | gem_common_gen_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_common_gen_1_1_0 | kv_adapter | | cot_esnli | phi-2 | sordonia/adauni-v1-flat/cot_esnli | kv_adapter | | cos_e_v1_11_description_question_option_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_description_question_option_text | kv_adapter | | cot_strategyqa_ii | phi-2 | sordonia/adauni-v1-flat/cot_strategyqa_ii | kv_adapter | | quarel_logic_test | phi-2 | sordonia/adauni-v1-flat/quarel_logic_test | kv_adapter | | gem_web_nlg_en_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_web_nlg_en_1_1_0 | kv_adapter | | dream_baseline | phi-2 | sordonia/adauni-v1-flat/dream_baseline | kv_adapter | | niv2_grammar_error_correction | phi-2 | sordonia/adauni-v1-flat/niv2_grammar_error_correction | kv_adapter | | niv2_overlap_extraction | phi-2 | sordonia/adauni-v1-flat/niv2_overlap_extraction | kv_adapter | | niv2_dialogue_act_recognition | phi-2 | sordonia/adauni-v1-flat/niv2_dialogue_act_recognition | kv_adapter | | niv2_stance_detection | phi-2 | sordonia/adauni-v1-flat/niv2_stance_detection | kv_adapter | | leetcode_ne | phi-2 | sordonia/adauni-v1-flat/leetcode_ne | kv_adapter | | quartz_answer_question_below | phi-2 | sordonia/adauni-v1-flat/quartz_answer_question_below | kv_adapter | | quartz_given_the_fact_answer_the_q | phi-2 | sordonia/adauni-v1-flat/quartz_given_the_fact_answer_the_q | kv_adapter | | quail_description_context_question_answer_id | phi-2 | sordonia/adauni-v1-flat/quail_description_context_question_answer_id | kv_adapter | | cos_e_v1_11_question_option_description_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_option_description_text | kv_adapter | | cot_sensemaking_ii | phi-2 | sordonia/adauni-v1-flat/cot_sensemaking_ii | kv_adapter | | niv2_speaker_identification | phi-2 | sordonia/adauni-v1-flat/niv2_speaker_identification | kv_adapter | | openbookqa_0_1_0 | phi-2 | sordonia/adauni-v1-flat/openbookqa_0_1_0 | kv_adapter | | duorc_ParaphraseRC_answer_question | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_answer_question | kv_adapter | | niv2_fact_verification | phi-2 | sordonia/adauni-v1-flat/niv2_fact_verification | kv_adapter | | anli_r2_0_1_0 | phi-2 | sordonia/adauni-v1-flat/anli_r2_0_1_0 | kv_adapter | | huggingface_xsum | phi-2 | sordonia/adauni-v1-flat/huggingface_xsum | kv_adapter | | niv2_poem_generation | phi-2 | sordonia/adauni-v1-flat/niv2_poem_generation | kv_adapter | | niv2_explanation | phi-2 | sordonia/adauni-v1-flat/niv2_explanation | kv_adapter | | niv2_speaker_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_speaker_relation_classification | kv_adapter | | qasc_is_correct_1 | phi-2 | sordonia/adauni-v1-flat/qasc_is_correct_1 | kv_adapter | | duorc_ParaphraseRC_build_story_around_qa | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_build_story_around_qa | kv_adapter | | fix_punct | phi-2 | sordonia/adauni-v1-flat/fix_punct | kv_adapter | | app_reviews_categorize_rating_using_review | phi-2 | sordonia/adauni-v1-flat/app_reviews_categorize_rating_using_review | kv_adapter | | cosmos_qa_1_0_0 | phi-2 | sordonia/adauni-v1-flat/cosmos_qa_1_0_0 | kv_adapter | | quail_context_question_answer_description_text | phi-2 | sordonia/adauni-v1-flat/quail_context_question_answer_description_text | kv_adapter | | app_reviews_generate_review | phi-2 | sordonia/adauni-v1-flat/app_reviews_generate_review | kv_adapter | | cot_esnli_ii | phi-2 | sordonia/adauni-v1-flat/cot_esnli_ii | kv_adapter | | ai2_arc_ARC_Easy_1_0_0 | phi-2 | sordonia/adauni-v1-flat/ai2_arc_ARC_Easy_1_0_0 | kv_adapter | | qasc_qa_with_combined_facts_1 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_combined_facts_1 | kv_adapter | | ai2_arc_ARC_Challenge_1_0_0 | phi-2 | sordonia/adauni-v1-flat/ai2_arc_ARC_Challenge_1_0_0 | kv_adapter | | cot_sensemaking | phi-2 | sordonia/adauni-v1-flat/cot_sensemaking | kv_adapter | | cos_e_v1_11_explain_why_human | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_explain_why_human | kv_adapter | | niv2_program_execution | phi-2 | sordonia/adauni-v1-flat/niv2_program_execution | kv_adapter | | niv2_stereotype_detection | phi-2 | sordonia/adauni-v1-flat/niv2_stereotype_detection | kv_adapter | | adversarial_qa_dbert_based_on | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_based_on | kv_adapter | | cot_gsm8k_ii | phi-2 | sordonia/adauni-v1-flat/cot_gsm8k_ii | kv_adapter | | para_crawl_enes | phi-2 | sordonia/adauni-v1-flat/para_crawl_enes | kv_adapter | | niv2_word_semantics | phi-2 | sordonia/adauni-v1-flat/niv2_word_semantics | kv_adapter | | adversarial_qa_dbert_question_context_answer | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_question_context_answer | kv_adapter | | multi_news_1_0_0 | phi-2 | sordonia/adauni-v1-flat/multi_news_1_0_0 | kv_adapter | | duorc_SelfRC_generate_question | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_generate_question | kv_adapter | | cot_gsm8k | phi-2 | sordonia/adauni-v1-flat/cot_gsm8k | kv_adapter | | gem_dart_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_dart_1_1_0 | kv_adapter | | qasc_qa_with_separated_facts_5 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_5 | kv_adapter | | niv2_language_identification | phi-2 | sordonia/adauni-v1-flat/niv2_language_identification | kv_adapter | | niv2_misc | phi-2 | sordonia/adauni-v1-flat/niv2_misc | kv_adapter | | niv2_text_quality_evaluation | phi-2 | sordonia/adauni-v1-flat/niv2_text_quality_evaluation | kv_adapter | | gem_e2e_nlg_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_e2e_nlg_1_1_0 | kv_adapter | | cot_qasc_ii | phi-2 | sordonia/adauni-v1-flat/cot_qasc_ii | kv_adapter | | duorc_SelfRC_decide_worth_it | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_decide_worth_it | kv_adapter | | MATH/PRM-800K | phi-2 | sordonia/adauni-v1-flat/MATH/PRM-800K | kv_adapter | | cos_e_v1_11_description_question_option_id | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_description_question_option_id | kv_adapter | | cot_ecqa_ii | phi-2 | sordonia/adauni-v1-flat/cot_ecqa_ii | kv_adapter | | kilt_tasks_hotpotqa_combining_facts | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_combining_facts | kv_adapter | | quartz_use_info_from_paragraph_question | phi-2 | sordonia/adauni-v1-flat/quartz_use_info_from_paragraph_question | kv_adapter | | niv2_mathematics | phi-2 | sordonia/adauni-v1-flat/niv2_mathematics | kv_adapter | | niv2_irony_detection | phi-2 | sordonia/adauni-v1-flat/niv2_irony_detection | kv_adapter | | glue_qnli_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_qnli_2_0_0 | kv_adapter | | niv2_sentence_ordering | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_ordering | kv_adapter | | quail_context_description_question_text | phi-2 | sordonia/adauni-v1-flat/quail_context_description_question_text | kv_adapter | | paws_wiki_1_1_0 | phi-2 | sordonia/adauni-v1-flat/paws_wiki_1_1_0 | kv_adapter | | dream_generate_first_utterance | phi-2 | sordonia/adauni-v1-flat/dream_generate_first_utterance | kv_adapter | | niv2_data_to_text | phi-2 | sordonia/adauni-v1-flat/niv2_data_to_text | kv_adapter | | niv2_story_composition | phi-2 | sordonia/adauni-v1-flat/niv2_story_composition | kv_adapter | | gigaword_1_2_0 | phi-2 | sordonia/adauni-v1-flat/gigaword_1_2_0 | kv_adapter | | quartz_read_passage_below_choose | phi-2 | sordonia/adauni-v1-flat/quartz_read_passage_below_choose | kv_adapter | | niv2_pos_tagging | phi-2 | sordonia/adauni-v1-flat/niv2_pos_tagging | kv_adapter | | niv2_intent_identification | phi-2 | sordonia/adauni-v1-flat/niv2_intent_identification | kv_adapter | | niv2_toxic_language_detection | phi-2 | sordonia/adauni-v1-flat/niv2_toxic_language_detection | kv_adapter | | cot_qasc | phi-2 | sordonia/adauni-v1-flat/cot_qasc | kv_adapter | | hellaswag_1_1_0 | phi-2 | sordonia/adauni-v1-flat/hellaswag_1_1_0 | kv_adapter | | adversarial_qa_droberta_generate_question | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_generate_question | kv_adapter | | kilt_tasks_hotpotqa_final_exam | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_final_exam | kv_adapter | | imdb_reviews_plain_text_1_0_0 | phi-2 | sordonia/adauni-v1-flat/imdb_reviews_plain_text_1_0_0 | kv_adapter | | adversarial_qa_dbert_tell_what_it_is | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_tell_what_it_is | kv_adapter | | niv2_commonsense_classification | phi-2 | sordonia/adauni-v1-flat/niv2_commonsense_classification | kv_adapter | | duorc_ParaphraseRC_title_generation | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_title_generation | kv_adapter | | kilt_tasks_hotpotqa_formulate | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_formulate | kv_adapter | | niv2_style_transfer | phi-2 | sordonia/adauni-v1-flat/niv2_style_transfer | kv_adapter | | niv2_dialogue_generation | phi-2 | sordonia/adauni-v1-flat/niv2_dialogue_generation | kv_adapter | | niv2_number_conversion | phi-2 | sordonia/adauni-v1-flat/niv2_number_conversion | kv_adapter | | niv2_spam_classification | phi-2 | sordonia/adauni-v1-flat/niv2_spam_classification | kv_adapter | | math_dataset_algebra__linear_1d_1_0_0 | phi-2 | sordonia/adauni-v1-flat/math_dataset_algebra__linear_1d_1_0_0 | kv_adapter | | duorc_ParaphraseRC_decide_worth_it | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_decide_worth_it | kv_adapter | | anli_r3_0_1_0 | phi-2 | sordonia/adauni-v1-flat/anli_r3_0_1_0 | kv_adapter | | dbpedia_14_given_list_what_category_does_the_paragraph_belong_to | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_given_list_what_category_does_the_paragraph_belong_to | kv_adapter | | quarel_testing_students | phi-2 | sordonia/adauni-v1-flat/quarel_testing_students | kv_adapter | | niv2_keyword_tagging | phi-2 | sordonia/adauni-v1-flat/niv2_keyword_tagging | kv_adapter | | niv2_ethics_classification | phi-2 | sordonia/adauni-v1-flat/niv2_ethics_classification | kv_adapter | | niv2_discourse_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_discourse_relation_classification | kv_adapter | | niv2_discourse_connective_identification | phi-2 | sordonia/adauni-v1-flat/niv2_discourse_connective_identification | kv_adapter | | adversarial_qa_dbert_answer_the_following_q | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_answer_the_following_q | kv_adapter | | niv2_paper_review | phi-2 | sordonia/adauni-v1-flat/niv2_paper_review | kv_adapter | | niv2_punctuation_error_detection | phi-2 | sordonia/adauni-v1-flat/niv2_punctuation_error_detection | kv_adapter | | quail_context_description_question_answer_id | phi-2 | sordonia/adauni-v1-flat/quail_context_description_question_answer_id | kv_adapter | | gem_wiki_lingua_english_en_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_wiki_lingua_english_en_1_1_0 | kv_adapter | | niv2_information_extraction | phi-2 | sordonia/adauni-v1-flat/niv2_information_extraction | kv_adapter | | niv2_answer_verification | phi-2 | sordonia/adauni-v1-flat/niv2_answer_verification | kv_adapter | | niv2_text_to_code | phi-2 | sordonia/adauni-v1-flat/niv2_text_to_code | kv_adapter | | cot_ecqa | phi-2 | sordonia/adauni-v1-flat/cot_ecqa | kv_adapter | | glue_qqp_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_qqp_2_0_0 | kv_adapter | | cot_creak | phi-2 | sordonia/adauni-v1-flat/cot_creak | kv_adapter | | dbpedia_14_given_a_choice_of_categories_ | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_given_a_choice_of_categories_ | kv_adapter | | adversarial_qa_droberta_based_on | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_based_on | kv_adapter | | niv2_named_entity_recognition | phi-2 | sordonia/adauni-v1-flat/niv2_named_entity_recognition | kv_adapter | | quail_context_question_description_text | phi-2 | sordonia/adauni-v1-flat/quail_context_question_description_text | kv_adapter | | glue_sst2_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_sst2_2_0_0 | kv_adapter | | cnn_dailymail_3_4_0 | phi-2 | sordonia/adauni-v1-flat/cnn_dailymail_3_4_0 | kv_adapter | | niv2_coherence_classification | phi-2 | sordonia/adauni-v1-flat/niv2_coherence_classification | kv_adapter | Last updated on: 2023-12-21T19:27:32.000Z
null
Non_BioNLP
Number of experts present in the library: 287 | Expert Name | Base Model | Trained on | Adapter Type | | --- | --- | --- | --- | | clinical_knowledge | phi-2 | sordonia/mmlu-qa-aug-10k-flat/clinical_knowledge | kv_adapter | | college_biology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_biology | kv_adapter | | jurisprudence | phi-2 | sordonia/mmlu-qa-aug-10k-flat/jurisprudence | kv_adapter | | high_school_psychology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_psychology | kv_adapter | | nutrition | phi-2 | sordonia/mmlu-qa-aug-10k-flat/nutrition | kv_adapter | | electrical_engineering | phi-2 | sordonia/mmlu-qa-aug-10k-flat/electrical_engineering | kv_adapter | | marketing | phi-2 | sordonia/mmlu-qa-aug-10k-flat/marketing | kv_adapter | | sociology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/sociology | kv_adapter | | moral_scenarios | phi-2 | sordonia/mmlu-qa-aug-10k-flat/moral_scenarios | kv_adapter | | econometrics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/econometrics | kv_adapter | | college_chemistry | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_chemistry | kv_adapter | | high_school_computer_science | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_computer_science | kv_adapter | | professional_medicine | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_medicine | kv_adapter | | philosophy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/philosophy | kv_adapter | | high_school_european_history | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_european_history | kv_adapter | | prehistory | phi-2 | sordonia/mmlu-qa-aug-10k-flat/prehistory | kv_adapter | | moral_disputes | phi-2 | sordonia/mmlu-qa-aug-10k-flat/moral_disputes | kv_adapter | | us_foreign_policy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/us_foreign_policy | kv_adapter | | college_medicine | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_medicine | kv_adapter | | professional_accounting | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_accounting | kv_adapter | | professional_law | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_law | kv_adapter | | virology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/virology | kv_adapter | | international_law | phi-2 | sordonia/mmlu-qa-aug-10k-flat/international_law | kv_adapter | | abstract_algebra | phi-2 | sordonia/mmlu-qa-aug-10k-flat/abstract_algebra | kv_adapter | | logical_fallacies | phi-2 | sordonia/mmlu-qa-aug-10k-flat/logical_fallacies | kv_adapter | | formal_logic | phi-2 | sordonia/mmlu-qa-aug-10k-flat/formal_logic | kv_adapter | | high_school_chemistry | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_chemistry | kv_adapter | | public_relations | phi-2 | sordonia/mmlu-qa-aug-10k-flat/public_relations | kv_adapter | | conceptual_physics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/conceptual_physics | kv_adapter | | professional_psychology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/professional_psychology | kv_adapter | | human_aging | phi-2 | sordonia/mmlu-qa-aug-10k-flat/human_aging | kv_adapter | | anatomy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/anatomy | kv_adapter | | high_school_us_history | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_us_history | kv_adapter | | management | phi-2 | sordonia/mmlu-qa-aug-10k-flat/management | kv_adapter | | high_school_statistics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_statistics | kv_adapter | | high_school_biology | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_biology | kv_adapter | | college_computer_science | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_computer_science | kv_adapter | | college_mathematics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_mathematics | kv_adapter | | miscellaneous | phi-2 | sordonia/mmlu-qa-aug-10k-flat/miscellaneous | kv_adapter | | world_religions | phi-2 | sordonia/mmlu-qa-aug-10k-flat/world_religions | kv_adapter | | human_sexuality | phi-2 | sordonia/mmlu-qa-aug-10k-flat/human_sexuality | kv_adapter | | high_school_world_history | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_world_history | kv_adapter | | college_physics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/college_physics | kv_adapter | | global_facts | phi-2 | sordonia/mmlu-qa-aug-10k-flat/global_facts | kv_adapter | | high_school_physics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_physics | kv_adapter | | high_school_mathematics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_mathematics | kv_adapter | | high_school_macroeconomics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_macroeconomics | kv_adapter | | high_school_geography | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_geography | kv_adapter | | high_school_microeconomics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_microeconomics | kv_adapter | | computer_security | phi-2 | sordonia/mmlu-qa-aug-10k-flat/computer_security | kv_adapter | | machine_learning | phi-2 | sordonia/mmlu-qa-aug-10k-flat/machine_learning | kv_adapter | | business_ethics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/business_ethics | kv_adapter | | astronomy | phi-2 | sordonia/mmlu-qa-aug-10k-flat/astronomy | kv_adapter | | security_studies | phi-2 | sordonia/mmlu-qa-aug-10k-flat/security_studies | kv_adapter | | medical_genetics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/medical_genetics | kv_adapter | | elementary_mathematics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/elementary_mathematics | kv_adapter | | high_school_government_and_politics | phi-2 | sordonia/mmlu-qa-aug-10k-flat/high_school_government_and_politics | kv_adapter | | dbpedia_14_pick_one_category_for_the_following_text | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_pick_one_category_for_the_following_text | kv_adapter | | cos_e_v1_11_generate_explanation_given_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_generate_explanation_given_text | kv_adapter | | glue_stsb_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_stsb_2_0_0 | kv_adapter | | niv2_text_matching | phi-2 | sordonia/adauni-v1-flat/niv2_text_matching | kv_adapter | | duorc_SelfRC_question_answering | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_question_answering | kv_adapter | | glue_mnli_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_mnli_2_0_0 | kv_adapter | | qasc_is_correct_2 | phi-2 | sordonia/adauni-v1-flat/qasc_is_correct_2 | kv_adapter | | niv2_sentence_perturbation | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_perturbation | kv_adapter | | cos_e_v1_11_question_description_option_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_description_option_text | kv_adapter | | niv2_question_generation | phi-2 | sordonia/adauni-v1-flat/niv2_question_generation | kv_adapter | | duorc_SelfRC_answer_question | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_answer_question | kv_adapter | | kilt_tasks_hotpotqa_straighforward_qa | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_straighforward_qa | kv_adapter | | niv2_entity_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_entity_relation_classification | kv_adapter | | airoboros | phi-2 | sordonia/adauni-v1-flat/airoboros | kv_adapter | | niv2_text_simplification | phi-2 | sordonia/adauni-v1-flat/niv2_text_simplification | kv_adapter | | niv2_code_to_text | phi-2 | sordonia/adauni-v1-flat/niv2_code_to_text | kv_adapter | | quarel_heres_a_story | phi-2 | sordonia/adauni-v1-flat/quarel_heres_a_story | kv_adapter | | coqa_1_0_0 | phi-2 | sordonia/adauni-v1-flat/coqa_1_0_0 | kv_adapter | | duorc_SelfRC_title_generation | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_title_generation | kv_adapter | | cot_creak_ii | phi-2 | sordonia/adauni-v1-flat/cot_creak_ii | kv_adapter | | adversarial_qa_dbidaf_based_on | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_based_on | kv_adapter | | ARB | phi-2 | sordonia/adauni-v1-flat/ARB | kv_adapter | | glue_cola_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_cola_2_0_0 | kv_adapter | | dream_answer_to_dialogue | phi-2 | sordonia/adauni-v1-flat/dream_answer_to_dialogue | kv_adapter | | niv2_paraphrasing | phi-2 | sordonia/adauni-v1-flat/niv2_paraphrasing | kv_adapter | | quail_no_prompt_text | phi-2 | sordonia/adauni-v1-flat/quail_no_prompt_text | kv_adapter | | cos_e_v1_11_rationale | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_rationale | kv_adapter | | niv2_linguistic_probing | phi-2 | sordonia/adauni-v1-flat/niv2_linguistic_probing | kv_adapter | | cos_e_v1_11_question_description_option_id | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_description_option_id | kv_adapter | | adversarial_qa_droberta_answer_the_following_q | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_answer_the_following_q | kv_adapter | | dream_generate_last_utterance | phi-2 | sordonia/adauni-v1-flat/dream_generate_last_utterance | kv_adapter | | quail_context_question_answer_description_id | phi-2 | sordonia/adauni-v1-flat/quail_context_question_answer_description_id | kv_adapter | | niv2_textual_entailment | phi-2 | sordonia/adauni-v1-flat/niv2_textual_entailment | kv_adapter | | cot_strategyqa | phi-2 | sordonia/adauni-v1-flat/cot_strategyqa | kv_adapter | | app_reviews_convert_to_star_rating | phi-2 | sordonia/adauni-v1-flat/app_reviews_convert_to_star_rating | kv_adapter | | niv2_word_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_word_relation_classification | kv_adapter | | quail_context_question_description_answer_text | phi-2 | sordonia/adauni-v1-flat/quail_context_question_description_answer_text | kv_adapter | | niv2_preposition_prediction | phi-2 | sordonia/adauni-v1-flat/niv2_preposition_prediction | kv_adapter | | niv2_spelling_error_detection | phi-2 | sordonia/adauni-v1-flat/niv2_spelling_error_detection | kv_adapter | | adversarial_qa_dbidaf_tell_what_it_is | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_tell_what_it_is | kv_adapter | | quarel_choose_between | phi-2 | sordonia/adauni-v1-flat/quarel_choose_between | kv_adapter | | quail_description_context_question_answer_text | phi-2 | sordonia/adauni-v1-flat/quail_description_context_question_answer_text | kv_adapter | | duorc_ParaphraseRC_generate_question | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_generate_question | kv_adapter | | niv2_dialogue_state_tracking | phi-2 | sordonia/adauni-v1-flat/niv2_dialogue_state_tracking | kv_adapter | | niv2_gender_classification | phi-2 | sordonia/adauni-v1-flat/niv2_gender_classification | kv_adapter | | dbpedia_14_given_a_list_of_category_what_does_the_title_belong_to | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_given_a_list_of_category_what_does_the_title_belong_to | kv_adapter | | duorc_SelfRC_generate_question_by_answer | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_generate_question_by_answer | kv_adapter | | quac_1_0_0 | phi-2 | sordonia/adauni-v1-flat/quac_1_0_0 | kv_adapter | | duorc_ParaphraseRC_movie_director | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_movie_director | kv_adapter | | cos_e_v1_11_aligned_with_common_sense | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_aligned_with_common_sense | kv_adapter | | niv2_section_classification | phi-2 | sordonia/adauni-v1-flat/niv2_section_classification | kv_adapter | | quail_no_prompt_id | phi-2 | sordonia/adauni-v1-flat/quail_no_prompt_id | kv_adapter | | duorc_ParaphraseRC_extract_answer | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_extract_answer | kv_adapter | | adversarial_qa_dbidaf_question_context_answer | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_question_context_answer | kv_adapter | | qasc_qa_with_separated_facts_3 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_3 | kv_adapter | | niv2_wrong_candidate_generation | phi-2 | sordonia/adauni-v1-flat/niv2_wrong_candidate_generation | kv_adapter | | adversarial_qa_dbidaf_generate_question | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_generate_question | kv_adapter | | niv2_title_generation | phi-2 | sordonia/adauni-v1-flat/niv2_title_generation | kv_adapter | | adversarial_qa_droberta_tell_what_it_is | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_tell_what_it_is | kv_adapter | | piqa_1_0_0 | phi-2 | sordonia/adauni-v1-flat/piqa_1_0_0 | kv_adapter | | quartz_having_read_above_passage | phi-2 | sordonia/adauni-v1-flat/quartz_having_read_above_passage | kv_adapter | | natural_questions_open_1_0_0 | phi-2 | sordonia/adauni-v1-flat/natural_questions_open_1_0_0 | kv_adapter | | duorc_SelfRC_movie_director | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_movie_director | kv_adapter | | qasc_qa_with_separated_facts_2 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_2 | kv_adapter | | niv2_fill_in_the_blank | phi-2 | sordonia/adauni-v1-flat/niv2_fill_in_the_blank | kv_adapter | | quartz_paragraph_question_plain_concat | phi-2 | sordonia/adauni-v1-flat/quartz_paragraph_question_plain_concat | kv_adapter | | niv2_sentence_expansion | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_expansion | kv_adapter | | app_reviews_convert_to_rating | phi-2 | sordonia/adauni-v1-flat/app_reviews_convert_to_rating | kv_adapter | | duorc_ParaphraseRC_generate_question_by_answer | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_generate_question_by_answer | kv_adapter | | anli_r1_0_1_0 | phi-2 | sordonia/adauni-v1-flat/anli_r1_0_1_0 | kv_adapter | | cos_e_v1_11_question_option_description_id | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_option_description_id | kv_adapter | | niv2_question_rewriting | phi-2 | sordonia/adauni-v1-flat/niv2_question_rewriting | kv_adapter | | duorc_SelfRC_extract_answer | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_extract_answer | kv_adapter | | qasc_qa_with_separated_facts_4 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_4 | kv_adapter | | niv2_question_answering | phi-2 | sordonia/adauni-v1-flat/niv2_question_answering | kv_adapter | | niv2_answerability_classification | phi-2 | sordonia/adauni-v1-flat/niv2_answerability_classification | kv_adapter | | niv2_sentence_composition | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_composition | kv_adapter | | niv2_text_categorization | phi-2 | sordonia/adauni-v1-flat/niv2_text_categorization | kv_adapter | | kilt_tasks_hotpotqa_complex_question | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_complex_question | kv_adapter | | glue_wnli_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_wnli_2_0_0 | kv_adapter | | niv2_question_understanding | phi-2 | sordonia/adauni-v1-flat/niv2_question_understanding | kv_adapter | | cos_e_v1_11_i_think | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_i_think | kv_adapter | | niv2_word_analogy | phi-2 | sordonia/adauni-v1-flat/niv2_word_analogy | kv_adapter | | aeslc_1_0_0 | phi-2 | sordonia/adauni-v1-flat/aeslc_1_0_0 | kv_adapter | | niv2_translation | phi-2 | sordonia/adauni-v1-flat/niv2_translation | kv_adapter | | adversarial_qa_dbert_generate_question | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_generate_question | kv_adapter | | drop_2_0_0 | phi-2 | sordonia/adauni-v1-flat/drop_2_0_0 | kv_adapter | | definite_pronoun_resolution_1_1_0 | phi-2 | sordonia/adauni-v1-flat/definite_pronoun_resolution_1_1_0 | kv_adapter | | niv2_sentence_compression | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_compression | kv_adapter | | quail_description_context_question_text | phi-2 | sordonia/adauni-v1-flat/quail_description_context_question_text | kv_adapter | | niv2_coreference_resolution | phi-2 | sordonia/adauni-v1-flat/niv2_coreference_resolution | kv_adapter | | quarel_do_not_use | phi-2 | sordonia/adauni-v1-flat/quarel_do_not_use | kv_adapter | | adversarial_qa_dbidaf_answer_the_following_q | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbidaf_answer_the_following_q | kv_adapter | | duorc_ParaphraseRC_question_answering | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_question_answering | kv_adapter | | bool_q_1_0_0 | phi-2 | sordonia/adauni-v1-flat/bool_q_1_0_0 | kv_adapter | | ag_news_subset_1_0_0 | phi-2 | sordonia/adauni-v1-flat/ag_news_subset_1_0_0 | kv_adapter | | duorc_SelfRC_build_story_around_qa | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_build_story_around_qa | kv_adapter | | qasc_qa_with_separated_facts_1 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_1 | kv_adapter | | niv2_text_completion | phi-2 | sordonia/adauni-v1-flat/niv2_text_completion | kv_adapter | | guanaco | phi-2 | sordonia/adauni-v1-flat/guanaco | kv_adapter | | quartz_answer_question_based_on | phi-2 | sordonia/adauni-v1-flat/quartz_answer_question_based_on | kv_adapter | | lambada_1_0_0 | phi-2 | sordonia/adauni-v1-flat/lambada_1_0_0 | kv_adapter | | dream_read_the_following_conversation_and_answer_the_question | phi-2 | sordonia/adauni-v1-flat/dream_read_the_following_conversation_and_answer_the_question | kv_adapter | | quail_context_question_description_answer_id | phi-2 | sordonia/adauni-v1-flat/quail_context_question_description_answer_id | kv_adapter | | glue_mrpc_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_mrpc_2_0_0 | kv_adapter | | niv2_sentiment_analysis | phi-2 | sordonia/adauni-v1-flat/niv2_sentiment_analysis | kv_adapter | | niv2_negotiation_strategy_detection | phi-2 | sordonia/adauni-v1-flat/niv2_negotiation_strategy_detection | kv_adapter | | quail_context_description_question_answer_text | phi-2 | sordonia/adauni-v1-flat/quail_context_description_question_answer_text | kv_adapter | | niv2_cause_effect_classification | phi-2 | sordonia/adauni-v1-flat/niv2_cause_effect_classification | kv_adapter | | adversarial_qa_droberta_question_context_answer | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_question_context_answer | kv_adapter | | quartz_use_info_from_question_paragraph | phi-2 | sordonia/adauni-v1-flat/quartz_use_info_from_question_paragraph | kv_adapter | | niv2_entity_generation | phi-2 | sordonia/adauni-v1-flat/niv2_entity_generation | kv_adapter | | niv2_question_decomposition | phi-2 | sordonia/adauni-v1-flat/niv2_question_decomposition | kv_adapter | | niv2_summarization | phi-2 | sordonia/adauni-v1-flat/niv2_summarization | kv_adapter | | gem_common_gen_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_common_gen_1_1_0 | kv_adapter | | cot_esnli | phi-2 | sordonia/adauni-v1-flat/cot_esnli | kv_adapter | | cos_e_v1_11_description_question_option_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_description_question_option_text | kv_adapter | | cot_strategyqa_ii | phi-2 | sordonia/adauni-v1-flat/cot_strategyqa_ii | kv_adapter | | quarel_logic_test | phi-2 | sordonia/adauni-v1-flat/quarel_logic_test | kv_adapter | | gem_web_nlg_en_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_web_nlg_en_1_1_0 | kv_adapter | | dream_baseline | phi-2 | sordonia/adauni-v1-flat/dream_baseline | kv_adapter | | niv2_grammar_error_correction | phi-2 | sordonia/adauni-v1-flat/niv2_grammar_error_correction | kv_adapter | | niv2_overlap_extraction | phi-2 | sordonia/adauni-v1-flat/niv2_overlap_extraction | kv_adapter | | niv2_dialogue_act_recognition | phi-2 | sordonia/adauni-v1-flat/niv2_dialogue_act_recognition | kv_adapter | | niv2_stance_detection | phi-2 | sordonia/adauni-v1-flat/niv2_stance_detection | kv_adapter | | leetcode_ne | phi-2 | sordonia/adauni-v1-flat/leetcode_ne | kv_adapter | | quartz_answer_question_below | phi-2 | sordonia/adauni-v1-flat/quartz_answer_question_below | kv_adapter | | quartz_given_the_fact_answer_the_q | phi-2 | sordonia/adauni-v1-flat/quartz_given_the_fact_answer_the_q | kv_adapter | | quail_description_context_question_answer_id | phi-2 | sordonia/adauni-v1-flat/quail_description_context_question_answer_id | kv_adapter | | cos_e_v1_11_question_option_description_text | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_question_option_description_text | kv_adapter | | cot_sensemaking_ii | phi-2 | sordonia/adauni-v1-flat/cot_sensemaking_ii | kv_adapter | | niv2_speaker_identification | phi-2 | sordonia/adauni-v1-flat/niv2_speaker_identification | kv_adapter | | openbookqa_0_1_0 | phi-2 | sordonia/adauni-v1-flat/openbookqa_0_1_0 | kv_adapter | | duorc_ParaphraseRC_answer_question | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_answer_question | kv_adapter | | niv2_fact_verification | phi-2 | sordonia/adauni-v1-flat/niv2_fact_verification | kv_adapter | | anli_r2_0_1_0 | phi-2 | sordonia/adauni-v1-flat/anli_r2_0_1_0 | kv_adapter | | huggingface_xsum | phi-2 | sordonia/adauni-v1-flat/huggingface_xsum | kv_adapter | | niv2_poem_generation | phi-2 | sordonia/adauni-v1-flat/niv2_poem_generation | kv_adapter | | niv2_explanation | phi-2 | sordonia/adauni-v1-flat/niv2_explanation | kv_adapter | | niv2_speaker_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_speaker_relation_classification | kv_adapter | | qasc_is_correct_1 | phi-2 | sordonia/adauni-v1-flat/qasc_is_correct_1 | kv_adapter | | duorc_ParaphraseRC_build_story_around_qa | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_build_story_around_qa | kv_adapter | | fix_punct | phi-2 | sordonia/adauni-v1-flat/fix_punct | kv_adapter | | app_reviews_categorize_rating_using_review | phi-2 | sordonia/adauni-v1-flat/app_reviews_categorize_rating_using_review | kv_adapter | | cosmos_qa_1_0_0 | phi-2 | sordonia/adauni-v1-flat/cosmos_qa_1_0_0 | kv_adapter | | quail_context_question_answer_description_text | phi-2 | sordonia/adauni-v1-flat/quail_context_question_answer_description_text | kv_adapter | | app_reviews_generate_review | phi-2 | sordonia/adauni-v1-flat/app_reviews_generate_review | kv_adapter | | cot_esnli_ii | phi-2 | sordonia/adauni-v1-flat/cot_esnli_ii | kv_adapter | | ai2_arc_ARC_Easy_1_0_0 | phi-2 | sordonia/adauni-v1-flat/ai2_arc_ARC_Easy_1_0_0 | kv_adapter | | qasc_qa_with_combined_facts_1 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_combined_facts_1 | kv_adapter | | ai2_arc_ARC_Challenge_1_0_0 | phi-2 | sordonia/adauni-v1-flat/ai2_arc_ARC_Challenge_1_0_0 | kv_adapter | | cot_sensemaking | phi-2 | sordonia/adauni-v1-flat/cot_sensemaking | kv_adapter | | cos_e_v1_11_explain_why_human | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_explain_why_human | kv_adapter | | niv2_program_execution | phi-2 | sordonia/adauni-v1-flat/niv2_program_execution | kv_adapter | | niv2_stereotype_detection | phi-2 | sordonia/adauni-v1-flat/niv2_stereotype_detection | kv_adapter | | adversarial_qa_dbert_based_on | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_based_on | kv_adapter | | cot_gsm8k_ii | phi-2 | sordonia/adauni-v1-flat/cot_gsm8k_ii | kv_adapter | | para_crawl_enes | phi-2 | sordonia/adauni-v1-flat/para_crawl_enes | kv_adapter | | niv2_word_semantics | phi-2 | sordonia/adauni-v1-flat/niv2_word_semantics | kv_adapter | | adversarial_qa_dbert_question_context_answer | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_question_context_answer | kv_adapter | | multi_news_1_0_0 | phi-2 | sordonia/adauni-v1-flat/multi_news_1_0_0 | kv_adapter | | duorc_SelfRC_generate_question | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_generate_question | kv_adapter | | cot_gsm8k | phi-2 | sordonia/adauni-v1-flat/cot_gsm8k | kv_adapter | | gem_dart_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_dart_1_1_0 | kv_adapter | | qasc_qa_with_separated_facts_5 | phi-2 | sordonia/adauni-v1-flat/qasc_qa_with_separated_facts_5 | kv_adapter | | niv2_language_identification | phi-2 | sordonia/adauni-v1-flat/niv2_language_identification | kv_adapter | | niv2_misc | phi-2 | sordonia/adauni-v1-flat/niv2_misc | kv_adapter | | niv2_text_quality_evaluation | phi-2 | sordonia/adauni-v1-flat/niv2_text_quality_evaluation | kv_adapter | | gem_e2e_nlg_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_e2e_nlg_1_1_0 | kv_adapter | | cot_qasc_ii | phi-2 | sordonia/adauni-v1-flat/cot_qasc_ii | kv_adapter | | duorc_SelfRC_decide_worth_it | phi-2 | sordonia/adauni-v1-flat/duorc_SelfRC_decide_worth_it | kv_adapter | | MATH/PRM-800K | phi-2 | sordonia/adauni-v1-flat/MATH/PRM-800K | kv_adapter | | cos_e_v1_11_description_question_option_id | phi-2 | sordonia/adauni-v1-flat/cos_e_v1_11_description_question_option_id | kv_adapter | | cot_ecqa_ii | phi-2 | sordonia/adauni-v1-flat/cot_ecqa_ii | kv_adapter | | kilt_tasks_hotpotqa_combining_facts | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_combining_facts | kv_adapter | | quartz_use_info_from_paragraph_question | phi-2 | sordonia/adauni-v1-flat/quartz_use_info_from_paragraph_question | kv_adapter | | niv2_mathematics | phi-2 | sordonia/adauni-v1-flat/niv2_mathematics | kv_adapter | | niv2_irony_detection | phi-2 | sordonia/adauni-v1-flat/niv2_irony_detection | kv_adapter | | glue_qnli_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_qnli_2_0_0 | kv_adapter | | niv2_sentence_ordering | phi-2 | sordonia/adauni-v1-flat/niv2_sentence_ordering | kv_adapter | | quail_context_description_question_text | phi-2 | sordonia/adauni-v1-flat/quail_context_description_question_text | kv_adapter | | paws_wiki_1_1_0 | phi-2 | sordonia/adauni-v1-flat/paws_wiki_1_1_0 | kv_adapter | | dream_generate_first_utterance | phi-2 | sordonia/adauni-v1-flat/dream_generate_first_utterance | kv_adapter | | niv2_data_to_text | phi-2 | sordonia/adauni-v1-flat/niv2_data_to_text | kv_adapter | | niv2_story_composition | phi-2 | sordonia/adauni-v1-flat/niv2_story_composition | kv_adapter | | gigaword_1_2_0 | phi-2 | sordonia/adauni-v1-flat/gigaword_1_2_0 | kv_adapter | | quartz_read_passage_below_choose | phi-2 | sordonia/adauni-v1-flat/quartz_read_passage_below_choose | kv_adapter | | niv2_pos_tagging | phi-2 | sordonia/adauni-v1-flat/niv2_pos_tagging | kv_adapter | | niv2_intent_identification | phi-2 | sordonia/adauni-v1-flat/niv2_intent_identification | kv_adapter | | niv2_toxic_language_detection | phi-2 | sordonia/adauni-v1-flat/niv2_toxic_language_detection | kv_adapter | | cot_qasc | phi-2 | sordonia/adauni-v1-flat/cot_qasc | kv_adapter | | hellaswag_1_1_0 | phi-2 | sordonia/adauni-v1-flat/hellaswag_1_1_0 | kv_adapter | | adversarial_qa_droberta_generate_question | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_generate_question | kv_adapter | | kilt_tasks_hotpotqa_final_exam | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_final_exam | kv_adapter | | imdb_reviews_plain_text_1_0_0 | phi-2 | sordonia/adauni-v1-flat/imdb_reviews_plain_text_1_0_0 | kv_adapter | | adversarial_qa_dbert_tell_what_it_is | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_tell_what_it_is | kv_adapter | | niv2_commonsense_classification | phi-2 | sordonia/adauni-v1-flat/niv2_commonsense_classification | kv_adapter | | duorc_ParaphraseRC_title_generation | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_title_generation | kv_adapter | | kilt_tasks_hotpotqa_formulate | phi-2 | sordonia/adauni-v1-flat/kilt_tasks_hotpotqa_formulate | kv_adapter | | niv2_style_transfer | phi-2 | sordonia/adauni-v1-flat/niv2_style_transfer | kv_adapter | | niv2_dialogue_generation | phi-2 | sordonia/adauni-v1-flat/niv2_dialogue_generation | kv_adapter | | niv2_number_conversion | phi-2 | sordonia/adauni-v1-flat/niv2_number_conversion | kv_adapter | | niv2_spam_classification | phi-2 | sordonia/adauni-v1-flat/niv2_spam_classification | kv_adapter | | math_dataset_algebra__linear_1d_1_0_0 | phi-2 | sordonia/adauni-v1-flat/math_dataset_algebra__linear_1d_1_0_0 | kv_adapter | | duorc_ParaphraseRC_decide_worth_it | phi-2 | sordonia/adauni-v1-flat/duorc_ParaphraseRC_decide_worth_it | kv_adapter | | anli_r3_0_1_0 | phi-2 | sordonia/adauni-v1-flat/anli_r3_0_1_0 | kv_adapter | | dbpedia_14_given_list_what_category_does_the_paragraph_belong_to | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_given_list_what_category_does_the_paragraph_belong_to | kv_adapter | | quarel_testing_students | phi-2 | sordonia/adauni-v1-flat/quarel_testing_students | kv_adapter | | niv2_keyword_tagging | phi-2 | sordonia/adauni-v1-flat/niv2_keyword_tagging | kv_adapter | | niv2_ethics_classification | phi-2 | sordonia/adauni-v1-flat/niv2_ethics_classification | kv_adapter | | niv2_discourse_relation_classification | phi-2 | sordonia/adauni-v1-flat/niv2_discourse_relation_classification | kv_adapter | | niv2_discourse_connective_identification | phi-2 | sordonia/adauni-v1-flat/niv2_discourse_connective_identification | kv_adapter | | adversarial_qa_dbert_answer_the_following_q | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_dbert_answer_the_following_q | kv_adapter | | niv2_paper_review | phi-2 | sordonia/adauni-v1-flat/niv2_paper_review | kv_adapter | | niv2_punctuation_error_detection | phi-2 | sordonia/adauni-v1-flat/niv2_punctuation_error_detection | kv_adapter | | quail_context_description_question_answer_id | phi-2 | sordonia/adauni-v1-flat/quail_context_description_question_answer_id | kv_adapter | | gem_wiki_lingua_english_en_1_1_0 | phi-2 | sordonia/adauni-v1-flat/gem_wiki_lingua_english_en_1_1_0 | kv_adapter | | niv2_information_extraction | phi-2 | sordonia/adauni-v1-flat/niv2_information_extraction | kv_adapter | | niv2_answer_verification | phi-2 | sordonia/adauni-v1-flat/niv2_answer_verification | kv_adapter | | niv2_text_to_code | phi-2 | sordonia/adauni-v1-flat/niv2_text_to_code | kv_adapter | | cot_ecqa | phi-2 | sordonia/adauni-v1-flat/cot_ecqa | kv_adapter | | glue_qqp_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_qqp_2_0_0 | kv_adapter | | cot_creak | phi-2 | sordonia/adauni-v1-flat/cot_creak | kv_adapter | | dbpedia_14_given_a_choice_of_categories_ | phi-2 | sordonia/adauni-v1-flat/dbpedia_14_given_a_choice_of_categories_ | kv_adapter | | adversarial_qa_droberta_based_on | phi-2 | sordonia/adauni-v1-flat/adversarial_qa_droberta_based_on | kv_adapter | | niv2_named_entity_recognition | phi-2 | sordonia/adauni-v1-flat/niv2_named_entity_recognition | kv_adapter | | quail_context_question_description_text | phi-2 | sordonia/adauni-v1-flat/quail_context_question_description_text | kv_adapter | | glue_sst2_2_0_0 | phi-2 | sordonia/adauni-v1-flat/glue_sst2_2_0_0 | kv_adapter | | cnn_dailymail_3_4_0 | phi-2 | sordonia/adauni-v1-flat/cnn_dailymail_3_4_0 | kv_adapter | | niv2_coherence_classification | phi-2 | sordonia/adauni-v1-flat/niv2_coherence_classification | kv_adapter | Last updated on: 2023-12-21T19:27:32.000Z
{}
task
[ "TRANSLATION", "SUMMARIZATION", "PARAPHRASING" ]
46,508
RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf
RichardErkhov
null
[ "gguf", "endpoints_compatible", "region:us", "conversational" ]
2024-11-04T23:46:27Z
2024-11-05T00:23:36+00:00
56
0
--- {} --- Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) SmolLM2-1.7B-Instruct - GGUF - Model creator: https://huggingface.co/HuggingFaceTB/ - Original model: https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/ | Name | Quant method | Size | | ---- | ---- | ---- | | [SmolLM2-1.7B-Instruct.Q2_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q2_K.gguf) | Q2_K | 0.63GB | | [SmolLM2-1.7B-Instruct.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K_S.gguf) | Q3_K_S | 0.72GB | | [SmolLM2-1.7B-Instruct.Q3_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K.gguf) | Q3_K | 0.8GB | | [SmolLM2-1.7B-Instruct.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K_M.gguf) | Q3_K_M | 0.8GB | | [SmolLM2-1.7B-Instruct.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K_L.gguf) | Q3_K_L | 0.87GB | | [SmolLM2-1.7B-Instruct.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.IQ4_XS.gguf) | IQ4_XS | 0.88GB | | [SmolLM2-1.7B-Instruct.Q4_0.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_0.gguf) | Q4_0 | 0.92GB | | [SmolLM2-1.7B-Instruct.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.IQ4_NL.gguf) | IQ4_NL | 0.93GB | | [SmolLM2-1.7B-Instruct.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_K_S.gguf) | Q4_K_S | 0.93GB | | [SmolLM2-1.7B-Instruct.Q4_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_K.gguf) | Q4_K | 0.98GB | | [SmolLM2-1.7B-Instruct.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_K_M.gguf) | Q4_K_M | 0.98GB | | [SmolLM2-1.7B-Instruct.Q4_1.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_1.gguf) | Q4_1 | 1.02GB | | [SmolLM2-1.7B-Instruct.Q5_0.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_0.gguf) | Q5_0 | 1.11GB | | [SmolLM2-1.7B-Instruct.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_K_S.gguf) | Q5_K_S | 1.11GB | | [SmolLM2-1.7B-Instruct.Q5_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_K.gguf) | Q5_K | 1.14GB | | [SmolLM2-1.7B-Instruct.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_K_M.gguf) | Q5_K_M | 1.14GB | | [SmolLM2-1.7B-Instruct.Q5_1.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_1.gguf) | Q5_1 | 1.2GB | | [SmolLM2-1.7B-Instruct.Q6_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q6_K.gguf) | Q6_K | 1.31GB | | [SmolLM2-1.7B-Instruct.Q8_0.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q8_0.gguf) | Q8_0 | 1.7GB | Original model description: --- library_name: transformers license: apache-2.0 language: - en --- # SmolLM2 ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/y45hIMNREW7w_XpHYB_0q.png) ## Table of Contents 1. [Model Summary](#model-summary) 2. [Evaluation](#evaluation) 3. [Examples](#examples) 4. [Limitations](#limitations) 5. [Training](#training) 6. [License](#license) 7. [Citation](#citation) ## Model Summary SmolLM2 is a family of compact language models available in three size: 135M, 360M, and 1.7B parameters. They are capable of solving a wide range of tasks while being lightweight enough to run on-device. The 1.7B variant demonstrates significant advances over its predecessor SmolLM1-1.7B, particularly in instruction following, knowledge, reasoning, and mathematics. It was trained on 11 trillion tokens using a diverse dataset combination: FineWeb-Edu, DCLM, The Stack, along with new mathematics and coding datasets that we curated and will release soon. We developed the instruct version through supervised fine-tuning (SFT) using a combination of public datasets and our own curated datasets. We then applied Direct Preference Optimization (DPO) using [UltraFeedback](https://huggingface.co/datasets/HuggingFaceH4/ultrafeedback_binarized). The instruct model additionally supports tasks such as text rewriting, summarization and function calling thanks to datasets developed by [Argilla](https://huggingface.co/argilla) such as [Synth-APIGen-v0.1](https://huggingface.co/datasets/argilla/Synth-APIGen-v0.1). ### How to use ### Transformers ```bash pip install transformers ``` ```python from transformers import AutoModelForCausalLM, AutoTokenizer checkpoint = "HuggingFaceTB/SmolLM2-1.7B-Instruct" device = "cuda" # for GPU usage or "cpu" for CPU usage tokenizer = AutoTokenizer.from_pretrained(checkpoint) # for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")` model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device) messages = [{"role": "user", "content": "What is the capital of France."}] input_text=tokenizer.apply_chat_template(messages, tokenize=False) inputs = tokenizer.encode(input_text, return_tensors="pt").to(device) outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True) print(tokenizer.decode(outputs[0])) ``` ### Chat in TRL You can also use the TRL CLI to chat with the model from the terminal: ```bash pip install trl trl chat --model_name_or_path HuggingFaceTB/SmolLM2-1.7B-Instruct --device cpu ``` ## Evaluation In this section, we report the evaluation results of SmolLM2. All evaluations are zero-shot unless stated otherwise, and we use [lighteval](https://github.com/huggingface/lighteval) to run them. ## Base Pre-Trained Model | Metric | SmolLM2-1.7B | Llama-1B | Qwen2.5-1.5B | SmolLM1-1.7B | |------------------|--------------|-------------|---------------|--------------| | HellaSwag | **68.7** | 61.2 | 66.4 | 62.9 | | ARC (Average) | **60.5** | 49.2 | 58.5 | 59.9 | | PIQA | **77.6** | 74.8 | 76.1 | 76.0 | | MMLU-Pro (MCF) | **19.4** | 11.7 | 13.7 | 10.8 | | CommonsenseQA | **43.6** | 41.2 | 34.1 | 38.0 | | TriviaQA | **36.7** | 28.1 | 20.9 | 22.5 | | Winogrande | **59.4** | 57.8 | 59.3 | 54.7 | | OpenBookQA | 42.2 | 38.4 | 40.0 | **42.4** | | GSM8K (5-shot) | 31.0 | 7.2 | **61.3** | 5.5 | ## Instruction Model | Metric | SmolLM2-1.7B-Instruct | Llama-1B-Instruct | Qwen2.5-1.5B-Instruct | SmolLM1-1.7B-Instruct | |:-----------------------------|:---------------------:|:-----------------:|:----------------------:|:----------------------:| | IFEval (Average prompt/inst) | **56.7** | 53.5 | 47.4 | 23.1 | | MT-Bench | 6.13 | 5.48 | **6.52** | 4.33 | | OpenRewrite-Eval (micro_avg RougeL) | 44.9 | 39.2 | **46.9** | NaN | | HellaSwag | **66.1** | 56.1 | 60.9 | 55.5 | | ARC (Average) | **51.7** | 41.6 | 46.2 | 43.7 | | PIQA | **74.4** | 72.3 | 73.2 | 71.6 | | MMLU-Pro (MCF) | 19.3 | 12.7 | **24.2** | 11.7 | | BBH (3-shot) | 32.2 | 27.6 | **35.3** | 25.7 | | GSM8K (5-shot) | **48.2** | 26.8 | 42.8 | 4.62 | ## Examples Below are some system and instruct prompts that work well for special tasks ### Text rewriting ```python system_prompt_rewrite = "You are an AI writing assistant. Your task is to rewrite the user's email to make it more professional and approachable while maintaining its main points and key message. Do not return any text other than the rewritten message." user_prompt_rewrite = "Rewrite the message below to make it more friendly and approachable while maintaining its main points and key message. Do not add any new information or return any text other than the rewritten message\nThe message:" messages = [{"role": "system", "content": system_prompt_rewrite}, {"role": "user", "content":f"{user_prompt_rewrite} The CI is failing after your last commit!"}] input_text=tokenizer.apply_chat_template(messages, tokenize=False) inputs = tokenizer.encode(input_text, return_tensors="pt").to(device) outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True) print(tokenizer.decode(outputs[0])) ``` ``` Hey there! I noticed that the CI isn't passing after your latest commit. Could you take a look and let me know what's going on? Thanks so much for your help! ``` ### Summarization ```python system_prompt_summarize = "Provide a concise, objective summary of the input text in up to three sentences, focusing on key actions and intentions without using second or third person pronouns." messages = [{"role": "system", "content": system_prompt_rewrite}, {"role": "user", "content": INSERT_LONG_EMAIL] input_text=tokenizer.apply_chat_template(messages, tokenize=False) inputs = tokenizer.encode(input_text, return_tensors="pt").to(device) outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True) print(tokenizer.decode(outputs[0])) ``` ### Function calling SmolLM2-1.7B-Instruct can handle function calling, it scores 27% on the [BFCL Leaderboard](https://gorilla.cs.berkeley.edu/blogs/8_berkeley_function_calling_leaderboard.html). Here's how you can leverage it: ```python import json import re from typing import Optional from jinja2 import Template import torch from transformers import AutoModelForCausalLM, AutoTokenizer from transformers.utils import get_json_schema system_prompt = Template("""You are an expert in composing functions. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out. You have access to the following tools: <tools>{{ tools }}</tools> The output MUST strictly adhere to the following format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct. If no function call is needed, please make the tool calls an empty list '[]'. <tool_call>[ {"name": "func_name1", "arguments": {"argument1": "value1", "argument2": "value2"}}, ... (more tool calls as required) ]</tool_call>""") def prepare_messages( query: str, tools: Optional[dict[str, any]] = None, history: Optional[list[dict[str, str]]] = None ) -> list[dict[str, str]]: """Prepare the system and user messages for the given query and tools. Args: query: The query to be answered. tools: The tools available to the user. Defaults to None, in which case if a list without content will be passed to the model. history: Exchange of messages, including the system_prompt from the first query. Defaults to None, the first message in a conversation. """ if tools is None: tools = [] if history: messages = history.copy() messages.append({"role": "user", "content": query}) else: messages = [ {"role": "system", "content": system_prompt.render(tools=json.dumps(tools))}, {"role": "user", "content": query} ] return messages def parse_response(text: str) -> str | dict[str, any]: """Parses a response from the model, returning either the parsed list with the tool calls parsed, or the model thought or response if couldn't generate one. Args: text: Response from the model. """ pattern = r"<tool_call>(.*?)</tool_call>" matches = re.findall(pattern, text, re.DOTALL) if matches: return json.loads(matches[0]) return text model_name_smollm = "HuggingFaceTB/SmolLM2-1.7B-Instruct" model = AutoModelForCausalLM.from_pretrained(model_name_smollm, device_map="auto", torch_dtype="auto", trust_remote_code=True) tokenizer = AutoTokenizer.from_pretrained(model_name_smollm) from datetime import datetime import random def get_current_time() -> str: """Returns the current time in 24-hour format. Returns: str: Current time in HH:MM:SS format. """ return datetime.now().strftime("%H:%M:%S") def get_random_number_between(min: int, max: int) -> int: """ Gets a random number between min and max. Args: min: The minimum number. max: The maximum number. Returns: A random number between min and max. """ return random.randint(min, max) tools = [get_json_schema(get_random_number_between), get_json_schema(get_current_time)] toolbox = {"get_random_number_between": get_random_number_between, "get_current_time": get_current_time} query = "Give me a number between 1 and 300" messages = prepare_messages(query, tools=tools) inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device) outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id) result = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True) tool_calls = parse_response(result) # [{'name': 'get_random_number_between', 'arguments': {'min': 1, 'max': 300}} # Get tool responses tool_responses = [toolbox.get(tc["name"])(*tc["arguments"].values()) for tc in tool_calls] # [63] # For the second turn, rebuild the history of messages: history = messages.copy() # Add the "parsed response" history.append({"role": "assistant", "content": result}) query = "Can you give me the hour?" history.append({"role": "user", "content": query}) inputs = tokenizer.apply_chat_template(history, add_generation_prompt=True, return_tensors="pt").to(model.device) outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id) result = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True) tool_calls = parse_response(result) tool_responses = [toolbox.get(tc["name"])(*tc["arguments"].values()) for tc in tool_calls] # ['07:57:25'] ``` More details such as parallel function calls and tools not available can be found [here](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/blob/main/instructions_function_calling.md) ## Limitations SmolLM2 models primarily understand and generate content in English. They can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content. ## Training ### Model - **Architecture:** Transformer decoder - **Pretraining tokens:** 11T - **Precision:** bfloat16 ### Hardware - **GPUs:** 256 H100 ### Software - **Training Framework:** [nanotron](https://github.com/huggingface/nanotron/tree/main) - **Alignement Handbook** [alignement-handbook](https://github.com/huggingface/alignment-handbook/) ## License [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) ## Citation ```bash @misc{allal2024SmolLM2, title={SmolLM2 - with great data, comes great performance}, author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Gabriel Martín Blázquez and Lewis Tunstall and Agustín Piqueres and Andres Marafioti and Cyril Zakka and Leandro von Werra and Thomas Wolf}, year={2024}, } ```
null
Non_BioNLP
Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) SmolLM2-1.7B-Instruct - GGUF - Model creator: https://huggingface.co/HuggingFaceTB/ - Original model: https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/ | Name | Quant method | Size | | ---- | ---- | ---- | | [SmolLM2-1.7B-Instruct.Q2_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q2_K.gguf) | Q2_K | 0.63GB | | [SmolLM2-1.7B-Instruct.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K_S.gguf) | Q3_K_S | 0.72GB | | [SmolLM2-1.7B-Instruct.Q3_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K.gguf) | Q3_K | 0.8GB | | [SmolLM2-1.7B-Instruct.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K_M.gguf) | Q3_K_M | 0.8GB | | [SmolLM2-1.7B-Instruct.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q3_K_L.gguf) | Q3_K_L | 0.87GB | | [SmolLM2-1.7B-Instruct.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.IQ4_XS.gguf) | IQ4_XS | 0.88GB | | [SmolLM2-1.7B-Instruct.Q4_0.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_0.gguf) | Q4_0 | 0.92GB | | [SmolLM2-1.7B-Instruct.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.IQ4_NL.gguf) | IQ4_NL | 0.93GB | | [SmolLM2-1.7B-Instruct.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_K_S.gguf) | Q4_K_S | 0.93GB | | [SmolLM2-1.7B-Instruct.Q4_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_K.gguf) | Q4_K | 0.98GB | | [SmolLM2-1.7B-Instruct.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_K_M.gguf) | Q4_K_M | 0.98GB | | [SmolLM2-1.7B-Instruct.Q4_1.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q4_1.gguf) | Q4_1 | 1.02GB | | [SmolLM2-1.7B-Instruct.Q5_0.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_0.gguf) | Q5_0 | 1.11GB | | [SmolLM2-1.7B-Instruct.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_K_S.gguf) | Q5_K_S | 1.11GB | | [SmolLM2-1.7B-Instruct.Q5_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_K.gguf) | Q5_K | 1.14GB | | [SmolLM2-1.7B-Instruct.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_K_M.gguf) | Q5_K_M | 1.14GB | | [SmolLM2-1.7B-Instruct.Q5_1.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q5_1.gguf) | Q5_1 | 1.2GB | | [SmolLM2-1.7B-Instruct.Q6_K.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q6_K.gguf) | Q6_K | 1.31GB | | [SmolLM2-1.7B-Instruct.Q8_0.gguf](https://huggingface.co/RichardErkhov/HuggingFaceTB_-_SmolLM2-1.7B-Instruct-gguf/blob/main/SmolLM2-1.7B-Instruct.Q8_0.gguf) | Q8_0 | 1.7GB | Original model description: --- library_name: transformers license: apache-2.0 language: - en --- # SmolLM2 ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/y45hIMNREW7w_XpHYB_0q.png) ## Table of Contents 1. [Model Summary](#model-summary) 2. [Evaluation](#evaluation) 3. [Examples](#examples) 4. [Limitations](#limitations) 5. [Training](#training) 6. [License](#license) 7. [Citation](#citation) ## Model Summary SmolLM2 is a family of compact language models available in three size: 135M, 360M, and 1.7B parameters. They are capable of solving a wide range of tasks while being lightweight enough to run on-device. The 1.7B variant demonstrates significant advances over its predecessor SmolLM1-1.7B, particularly in instruction following, knowledge, reasoning, and mathematics. It was trained on 11 trillion tokens using a diverse dataset combination: FineWeb-Edu, DCLM, The Stack, along with new mathematics and coding datasets that we curated and will release soon. We developed the instruct version through supervised fine-tuning (SFT) using a combination of public datasets and our own curated datasets. We then applied Direct Preference Optimization (DPO) using [UltraFeedback](https://huggingface.co/datasets/HuggingFaceH4/ultrafeedback_binarized). The instruct model additionally supports tasks such as text rewriting, summarization and function calling thanks to datasets developed by [Argilla](https://huggingface.co/argilla) such as [Synth-APIGen-v0.1](https://huggingface.co/datasets/argilla/Synth-APIGen-v0.1). ### How to use ### Transformers ```bash pip install transformers ``` ```python from transformers import AutoModelForCausalLM, AutoTokenizer checkpoint = "HuggingFaceTB/SmolLM2-1.7B-Instruct" device = "cuda" # for GPU usage or "cpu" for CPU usage tokenizer = AutoTokenizer.from_pretrained(checkpoint) # for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")` model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device) messages = [{"role": "user", "content": "What is the capital of France."}] input_text=tokenizer.apply_chat_template(messages, tokenize=False) inputs = tokenizer.encode(input_text, return_tensors="pt").to(device) outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True) print(tokenizer.decode(outputs[0])) ``` ### Chat in TRL You can also use the TRL CLI to chat with the model from the terminal: ```bash pip install trl trl chat --model_name_or_path HuggingFaceTB/SmolLM2-1.7B-Instruct --device cpu ``` ## Evaluation In this section, we report the evaluation results of SmolLM2. All evaluations are zero-shot unless stated otherwise, and we use [lighteval](https://github.com/huggingface/lighteval) to run them. ## Base Pre-Trained Model | Metric | SmolLM2-1.7B | Llama-1B | Qwen2.5-1.5B | SmolLM1-1.7B | |------------------|--------------|-------------|---------------|--------------| | HellaSwag | **68.7** | 61.2 | 66.4 | 62.9 | | ARC (Average) | **60.5** | 49.2 | 58.5 | 59.9 | | PIQA | **77.6** | 74.8 | 76.1 | 76.0 | | MMLU-Pro (MCF) | **19.4** | 11.7 | 13.7 | 10.8 | | CommonsenseQA | **43.6** | 41.2 | 34.1 | 38.0 | | TriviaQA | **36.7** | 28.1 | 20.9 | 22.5 | | Winogrande | **59.4** | 57.8 | 59.3 | 54.7 | | OpenBookQA | 42.2 | 38.4 | 40.0 | **42.4** | | GSM8K (5-shot) | 31.0 | 7.2 | **61.3** | 5.5 | ## Instruction Model | Metric | SmolLM2-1.7B-Instruct | Llama-1B-Instruct | Qwen2.5-1.5B-Instruct | SmolLM1-1.7B-Instruct | |:-----------------------------|:---------------------:|:-----------------:|:----------------------:|:----------------------:| | IFEval (Average prompt/inst) | **56.7** | 53.5 | 47.4 | 23.1 | | MT-Bench | 6.13 | 5.48 | **6.52** | 4.33 | | OpenRewrite-Eval (micro_avg RougeL) | 44.9 | 39.2 | **46.9** | NaN | | HellaSwag | **66.1** | 56.1 | 60.9 | 55.5 | | ARC (Average) | **51.7** | 41.6 | 46.2 | 43.7 | | PIQA | **74.4** | 72.3 | 73.2 | 71.6 | | MMLU-Pro (MCF) | 19.3 | 12.7 | **24.2** | 11.7 | | BBH (3-shot) | 32.2 | 27.6 | **35.3** | 25.7 | | GSM8K (5-shot) | **48.2** | 26.8 | 42.8 | 4.62 | ## Examples Below are some system and instruct prompts that work well for special tasks ### Text rewriting ```python system_prompt_rewrite = "You are an AI writing assistant. Your task is to rewrite the user's email to make it more professional and approachable while maintaining its main points and key message. Do not return any text other than the rewritten message." user_prompt_rewrite = "Rewrite the message below to make it more friendly and approachable while maintaining its main points and key message. Do not add any new information or return any text other than the rewritten message\nThe message:" messages = [{"role": "system", "content": system_prompt_rewrite}, {"role": "user", "content":f"{user_prompt_rewrite} The CI is failing after your last commit!"}] input_text=tokenizer.apply_chat_template(messages, tokenize=False) inputs = tokenizer.encode(input_text, return_tensors="pt").to(device) outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True) print(tokenizer.decode(outputs[0])) ``` ``` Hey there! I noticed that the CI isn't passing after your latest commit. Could you take a look and let me know what's going on? Thanks so much for your help! ``` ### Summarization ```python system_prompt_summarize = "Provide a concise, objective summary of the input text in up to three sentences, focusing on key actions and intentions without using second or third person pronouns." messages = [{"role": "system", "content": system_prompt_rewrite}, {"role": "user", "content": INSERT_LONG_EMAIL] input_text=tokenizer.apply_chat_template(messages, tokenize=False) inputs = tokenizer.encode(input_text, return_tensors="pt").to(device) outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True) print(tokenizer.decode(outputs[0])) ``` ### Function calling SmolLM2-1.7B-Instruct can handle function calling, it scores 27% on the [BFCL Leaderboard](https://gorilla.cs.berkeley.edu/blogs/8_berkeley_function_calling_leaderboard.html). Here's how you can leverage it: ```python import json import re from typing import Optional from jinja2 import Template import torch from transformers import AutoModelForCausalLM, AutoTokenizer from transformers.utils import get_json_schema system_prompt = Template("""You are an expert in composing functions. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out. You have access to the following tools: <tools>{{ tools }}</tools> The output MUST strictly adhere to the following format, and NO other text MUST be included. The example format is as follows. Please make sure the parameter type is correct. If no function call is needed, please make the tool calls an empty list '[]'. <tool_call>[ {"name": "func_name1", "arguments": {"argument1": "value1", "argument2": "value2"}}, ... (more tool calls as required) ]</tool_call>""") def prepare_messages( query: str, tools: Optional[dict[str, any]] = None, history: Optional[list[dict[str, str]]] = None ) -> list[dict[str, str]]: """Prepare the system and user messages for the given query and tools. Args: query: The query to be answered. tools: The tools available to the user. Defaults to None, in which case if a list without content will be passed to the model. history: Exchange of messages, including the system_prompt from the first query. Defaults to None, the first message in a conversation. """ if tools is None: tools = [] if history: messages = history.copy() messages.append({"role": "user", "content": query}) else: messages = [ {"role": "system", "content": system_prompt.render(tools=json.dumps(tools))}, {"role": "user", "content": query} ] return messages def parse_response(text: str) -> str | dict[str, any]: """Parses a response from the model, returning either the parsed list with the tool calls parsed, or the model thought or response if couldn't generate one. Args: text: Response from the model. """ pattern = r"<tool_call>(.*?)</tool_call>" matches = re.findall(pattern, text, re.DOTALL) if matches: return json.loads(matches[0]) return text model_name_smollm = "HuggingFaceTB/SmolLM2-1.7B-Instruct" model = AutoModelForCausalLM.from_pretrained(model_name_smollm, device_map="auto", torch_dtype="auto", trust_remote_code=True) tokenizer = AutoTokenizer.from_pretrained(model_name_smollm) from datetime import datetime import random def get_current_time() -> str: """Returns the current time in 24-hour format. Returns: str: Current time in HH:MM:SS format. """ return datetime.now().strftime("%H:%M:%S") def get_random_number_between(min: int, max: int) -> int: """ Gets a random number between min and max. Args: min: The minimum number. max: The maximum number. Returns: A random number between min and max. """ return random.randint(min, max) tools = [get_json_schema(get_random_number_between), get_json_schema(get_current_time)] toolbox = {"get_random_number_between": get_random_number_between, "get_current_time": get_current_time} query = "Give me a number between 1 and 300" messages = prepare_messages(query, tools=tools) inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device) outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id) result = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True) tool_calls = parse_response(result) # [{'name': 'get_random_number_between', 'arguments': {'min': 1, 'max': 300}} # Get tool responses tool_responses = [toolbox.get(tc["name"])(*tc["arguments"].values()) for tc in tool_calls] # [63] # For the second turn, rebuild the history of messages: history = messages.copy() # Add the "parsed response" history.append({"role": "assistant", "content": result}) query = "Can you give me the hour?" history.append({"role": "user", "content": query}) inputs = tokenizer.apply_chat_template(history, add_generation_prompt=True, return_tensors="pt").to(model.device) outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id) result = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True) tool_calls = parse_response(result) tool_responses = [toolbox.get(tc["name"])(*tc["arguments"].values()) for tc in tool_calls] # ['07:57:25'] ``` More details such as parallel function calls and tools not available can be found [here](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/blob/main/instructions_function_calling.md) ## Limitations SmolLM2 models primarily understand and generate content in English. They can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content. ## Training ### Model - **Architecture:** Transformer decoder - **Pretraining tokens:** 11T - **Precision:** bfloat16 ### Hardware - **GPUs:** 256 H100 ### Software - **Training Framework:** [nanotron](https://github.com/huggingface/nanotron/tree/main) - **Alignement Handbook** [alignement-handbook](https://github.com/huggingface/alignment-handbook/) ## License [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) ## Citation ```bash @misc{allal2024SmolLM2, title={SmolLM2 - with great data, comes great performance}, author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Gabriel Martín Blázquez and Lewis Tunstall and Agustín Piqueres and Andres Marafioti and Cyril Zakka and Leandro von Werra and Thomas Wolf}, year={2024}, } ```
{}
task
[ "SUMMARIZATION" ]
46,509
EthanHosier/finetuning-emotion-model
EthanHosier
text-classification
[ "transformers", "safetensors", "distilbert", "text-classification", "generated_from_trainer", "dataset:emotion", "base_model:distilbert/distilbert-base-uncased", "base_model:finetune:distilbert/distilbert-base-uncased", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-02-03T18:45:53Z
2024-02-03T18:54:54+00:00
4
0
--- base_model: distilbert-base-uncased datasets: - emotion license: apache-2.0 metrics: - accuracy - f1 tags: - generated_from_trainer model-index: - name: finetuning-emotion-model results: - task: type: text-classification name: Text Classification dataset: name: emotion type: emotion config: split split: validation args: split metrics: - type: accuracy value: 0.9225 name: Accuracy - type: f1 value: 0.9225110031128635 name: F1 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # finetuning-emotion-model This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.2179 - Accuracy: 0.9225 - F1: 0.9225 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:| | No log | 1.0 | 250 | 0.3188 | 0.908 | 0.9066 | | 0.551 | 2.0 | 500 | 0.2179 | 0.9225 | 0.9225 | ### Framework versions - Transformers 4.37.2 - Pytorch 2.1.2+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # finetuning-emotion-model This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. It achieves the following results on the evaluation set: - Loss: 0.2179 - Accuracy: 0.9225 - F1: 0.9225 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:| | No log | 1.0 | 250 | 0.3188 | 0.908 | 0.9066 | | 0.551 | 2.0 | 500 | 0.2179 | 0.9225 | 0.9225 | ### Framework versions - Transformers 4.37.2 - Pytorch 2.1.2+cu121 - Datasets 2.16.1 - Tokenizers 0.15.1
{"base_model": "distilbert-base-uncased", "datasets": ["emotion"], "license": "apache-2.0", "metrics": ["accuracy", "f1"], "tags": ["generated_from_trainer"], "model-index": [{"name": "finetuning-emotion-model", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "emotion", "type": "emotion", "config": "split", "split": "validation", "args": "split"}, "metrics": [{"type": "accuracy", "value": 0.9225, "name": "Accuracy"}, {"type": "f1", "value": 0.9225110031128635, "name": "F1"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,510
pinzhenchen/sft-lora-de-pythia-70m
pinzhenchen
null
[ "generation", "question answering", "instruction tuning", "de", "arxiv:2309.08958", "license:cc-by-nc-4.0", "region:us" ]
2024-03-05T23:49:36Z
2024-03-05T23:49:39+00:00
0
0
--- language: - de license: cc-by-nc-4.0 tags: - generation - question answering - instruction tuning --- ### Model Description This HF repository contains base LLMs instruction tuned (SFT) with LoRA and then used to study whether monolingual or multilingual instruction tuning is more favourable. * [GitHub](https://github.com/hplt-project/monolingual-multilingual-instruction-tuning/tree/main) * [Paper](https://arxiv.org/abs/2309.08958) #### Instruction tuning details * Base model: [EleutherAI/pythia-70m-deduped](https://huggingface.co/EleutherAI/pythia-70m-deduped) * Instruction tuning language: German * Training method: LoRA. * LoRA details: rank=8, alpha=16, target modules={key, query, value}. * Best checkpoint: best cross-entropy on a validation set, trained for 5 epochs. * Dataset: machine-translated from [yahma/alpaca-cleaned](https://huggingface.co/datasets/yahma/alpaca-cleaned). You can download our data [HERE](https://github.com/hplt-project/monolingual-multilingual-instruction-tuning/tree/main/training-data). #### Usage The model checkpoint should be loaded with the base model together using `transformers` and `peft` libraries. Please refer to our Github repository [HERE](https://github.com/hplt-project/monolingual-multilingual-instruction-tuning/tree/main/loraft) for inference and training instructions. #### Citation ``` @inproceedings{chen-etal-2024-monolingual, title="Monolingual or multilingual instruction tuning: Which makes a better {Alpaca}", author="Pinzhen Chen and Shaoxiong Ji and Nikolay Bogoychev and Andrey Kutuzov and Barry Haddow and Kenneth Heafield", year="2024", booktitle = "Findings of the Association for Computational Linguistics: EACL 2024", } ```
null
Non_BioNLP
### Model Description This HF repository contains base LLMs instruction tuned (SFT) with LoRA and then used to study whether monolingual or multilingual instruction tuning is more favourable. * [GitHub](https://github.com/hplt-project/monolingual-multilingual-instruction-tuning/tree/main) * [Paper](https://arxiv.org/abs/2309.08958) #### Instruction tuning details * Base model: [EleutherAI/pythia-70m-deduped](https://huggingface.co/EleutherAI/pythia-70m-deduped) * Instruction tuning language: German * Training method: LoRA. * LoRA details: rank=8, alpha=16, target modules={key, query, value}. * Best checkpoint: best cross-entropy on a validation set, trained for 5 epochs. * Dataset: machine-translated from [yahma/alpaca-cleaned](https://huggingface.co/datasets/yahma/alpaca-cleaned). You can download our data [HERE](https://github.com/hplt-project/monolingual-multilingual-instruction-tuning/tree/main/training-data). #### Usage The model checkpoint should be loaded with the base model together using `transformers` and `peft` libraries. Please refer to our Github repository [HERE](https://github.com/hplt-project/monolingual-multilingual-instruction-tuning/tree/main/loraft) for inference and training instructions. #### Citation ``` @inproceedings{chen-etal-2024-monolingual, title="Monolingual or multilingual instruction tuning: Which makes a better {Alpaca}", author="Pinzhen Chen and Shaoxiong Ji and Nikolay Bogoychev and Andrey Kutuzov and Barry Haddow and Kenneth Heafield", year="2024", booktitle = "Findings of the Association for Computational Linguistics: EACL 2024", } ```
{"language": ["de"], "license": "cc-by-nc-4.0", "tags": ["generation", "question answering", "instruction tuning"]}
task
[ "QUESTION_ANSWERING" ]
46,511
TransferGraph/jb2k_bert-base-multilingual-cased-language-detection-finetuned-lora-tweet_eval_emotion
TransferGraph
text-classification
[ "peft", "safetensors", "parquet", "text-classification", "dataset:tweet_eval", "base_model:jb2k/bert-base-multilingual-cased-language-detection", "base_model:adapter:jb2k/bert-base-multilingual-cased-language-detection", "model-index", "region:us" ]
2024-02-29T12:50:03Z
2024-02-29T12:50:06+00:00
1
0
--- base_model: jb2k/bert-base-multilingual-cased-language-detection datasets: - tweet_eval library_name: peft metrics: - accuracy tags: - parquet - text-classification model-index: - name: jb2k_bert-base-multilingual-cased-language-detection-finetuned-lora-tweet_eval_emotion results: - task: type: text-classification name: Text Classification dataset: name: tweet_eval type: tweet_eval config: emotion split: validation args: emotion metrics: - type: accuracy value: 0.45187165775401067 name: accuracy --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # jb2k_bert-base-multilingual-cased-language-detection-finetuned-lora-tweet_eval_emotion This model is a fine-tuned version of [jb2k/bert-base-multilingual-cased-language-detection](https://huggingface.co/jb2k/bert-base-multilingual-cased-language-detection) on the tweet_eval dataset. It achieves the following results on the evaluation set: - accuracy: 0.4519 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0004 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 4 ### Training results | accuracy | train_loss | epoch | |:--------:|:----------:|:-----:| | 0.2433 | None | 0 | | 0.4332 | 1.2647 | 0 | | 0.4439 | 1.2429 | 1 | | 0.4439 | 1.2280 | 2 | | 0.4519 | 1.2111 | 3 | ### Framework versions - PEFT 0.8.2 - Transformers 4.37.2 - Pytorch 2.2.0 - Datasets 2.16.1 - Tokenizers 0.15.2
null
Non_BioNLP
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # jb2k_bert-base-multilingual-cased-language-detection-finetuned-lora-tweet_eval_emotion This model is a fine-tuned version of [jb2k/bert-base-multilingual-cased-language-detection](https://huggingface.co/jb2k/bert-base-multilingual-cased-language-detection) on the tweet_eval dataset. It achieves the following results on the evaluation set: - accuracy: 0.4519 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0004 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 4 ### Training results | accuracy | train_loss | epoch | |:--------:|:----------:|:-----:| | 0.2433 | None | 0 | | 0.4332 | 1.2647 | 0 | | 0.4439 | 1.2429 | 1 | | 0.4439 | 1.2280 | 2 | | 0.4519 | 1.2111 | 3 | ### Framework versions - PEFT 0.8.2 - Transformers 4.37.2 - Pytorch 2.2.0 - Datasets 2.16.1 - Tokenizers 0.15.2
{"base_model": "jb2k/bert-base-multilingual-cased-language-detection", "datasets": ["tweet_eval"], "library_name": "peft", "metrics": ["accuracy"], "tags": ["parquet", "text-classification"], "model-index": [{"name": "jb2k_bert-base-multilingual-cased-language-detection-finetuned-lora-tweet_eval_emotion", "results": [{"task": {"type": "text-classification", "name": "Text Classification"}, "dataset": {"name": "tweet_eval", "type": "tweet_eval", "config": "emotion", "split": "validation", "args": "emotion"}, "metrics": [{"type": "accuracy", "value": 0.45187165775401067, "name": "accuracy"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,512
andythetechnerd03/VistralPoem5
andythetechnerd03
text-generation
[ "transformers", "pytorch", "safetensors", "mistral", "text-generation", "art", "conversational", "vi", "dataset:andythetechnerd03/Vietnamese-Poem-5words", "arxiv:2310.06825", "arxiv:2305.14314", "arxiv:1710.03740", "license:mit", "autotrain_compatible", "text-generation-inference", "endpoints_compatible", "region:us" ]
2024-02-22T06:01:03Z
2024-03-24T06:09:04+00:00
29
1
--- datasets: - andythetechnerd03/Vietnamese-Poem-5words language: - vi license: mit tags: - art --- # Vietnamese Text Summarization with Poem Summarize a piece of text with poem. Doesn't it sound fun? </br> ## Introduction Jokes aside, this is a fun project by my team at FPT University about fine-tuning a Large Language Model (LLM) at summarizing a piece of long Vietnamese text in the form of **poems**. We call the model **VistralPoem5**. </br> Here's a little example: ![image](/assets/example_data_transformed.png) ## HuggingFace 🤗 ``` python from transformers import AutoTokenizer, AutoModelForCausalLM model_name = "andythetechnerd03/VistralPoem5" tokenizer = AutoTokenizer.from_pretrained(model_name, device_map="auto") model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto") inputs = [ {"role": "system", "content": "Bạn là một nhà thơ chuyên nghiệp, nhiệm vụ của bạn là chuyển bài văn này thành 1 bài thơ 5 chữ từ khoảng 1 đến 3 khổ"}, {"role": "user", "content": "nhớ tới lời mẹ dặn\nsợ mẹ buồn con đau\nnên tự mình đứng dậy\nnhanh như có phép màu"} ] input_ids = tokenizer.apply_chat_template(inputs, return_tensors="pt").to(model.device) outputs = model.generate( input_ids=input_ids, max_new_tokens=200, do_sample=True, top_p=0.95, top_k=20, temperature=0.1, repetition_penalty=1.05, ) output_str = tokenizer.batch_decode(outputs[:, input_ids.size(1): ], skip_special_tokens=True)[0].strip() print(output_str) ``` ## Fine-tuning [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/andythetechnerd03/Vietnamese-Text-Summarization-Poem/blob/main/notebooks/fine_tune_with_axolotl.ipynb) This is not an easy task. The model we are using is a Vietnamese version of the popular [Mistral-7B](https://arxiv.org/abs/2310.06825) with 7 billion parameters. Obviously, it is very computationally expensive to fine-tune, therefore we applied various state-of-the-art optimization techniques: - [Flash Attention](https://github.com/Dao-AILab/flash-attention): helps reduce computation complexity of Attention from $O(n^2)$ to $O(n\log n)$ - [QLoRA (Quantized Low-Rank Adaptation)](https://arxiv.org/abs/2305.14314): train a smaller "adapter" which is a low-rank weight matrices, allowing for less computation. Furthermore, the base model is quantized to only `4-bit`, this is great for storing large models. - [Mixed Precision Training](https://arxiv.org/abs/1710.03740): here we combine `float32` with `bfloat16` data type for faster training. To train the LLM seamlessly as possible, we used a popular open-source fine-tuning platform called [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl). This platform helps you declare the parameters and config and train quickly without much code. ### Code for fine-tuning model To customize the configuration, you can modify the `create_file_config.py` file. After making your changes, run the script to generate a personalized configuration file. The following is an example of how to execute the model training: ``` python cd src export PYTHONPATH="$PWD" accelerate launch -m axolotl.cli.train config.yaml ``` ## Data This is not easy. Such data that takes the input as a long text (newspaper article, story) and output a poem is very hard to find. So we created our own... by using *prompt engineering*. - The collection of poems is straightforward. There are many repositories and prior works that collected a handful of Vietnamese poems, as well as publicly available samples online. We collected from [FPT Software AI Lab](https://github.com/fsoft-ailab/Poem-Generator) and [HuggingFace](https://github.com/fsoft-ailab/Poem-Generator). - From the poems we use prompt engineering to ask our base model to generate a story from such poem. The prompt is in the form </br> ``` Bạn là một nhà kể chuyện phiếm, nhiệm vụ của bạn là hãy kể 1 câu chuyện đơn giản và ngắn gọn từ một bài thơ, câu chuyện nên là 1 bài liền mạch, thực tế\n\n{insert poem here}``` - Speaking of prompt engineering, there is another prompt to generate poem from context. </br> ```Bạn là một nhà thơ chuyên nghiệp, nhiệm vụ của bạn là chuyển bài văn này thành 1 bài thơ 5 chữ từ khoảng 1 đến 3 khổ: \n {insert context here}``` - The pre-processing step is faily simple. A bit of lowercase here, punctuation removal there, plus reducing poems to 1-3 random paragraphs, and we are done. After all, we have about 72,101 samples with a ratio of 0.05 (68495 on the train set and 3606 on the test set) We published the dataset at [here](https://huggingface.co/datasets/andythetechnerd03/Vietnamese-Poem-5words) ### Custom Evaluation Data As part of the final evaluation for benchmark, we gathered around 27 Vietnamese children's stories and divided into many samples, accumulating to 118 samples. The dataset can be found [here](/data/eval_set.json) ## Model As mentioned earlier, we use [Vistral-7B-Chat](https://huggingface.co/Viet-Mistral/Vistral-7B-Chat) as the base model and we fine-tune it on our curated dataset earlier. Here's a few configurations: - The model is based on Transformer’s decoder-only architechture: - Number of Attention Heads: 32 - Hidden Size: 4096 - Vocab size: 38369 - Data type: bfloat16 - Number of Hidden Layers (Nx): 32 - Loss function: Cross-entropy - Parameter-Efficient Finetuning: QLora - 4 bit - Alpha: 16 - Rank: 32 - Target: Linear - Gradient accumulation: 4 - Learning Rate: 0.0002 - Warmup Steps: 10 - LR Scheduler: Cosine - Max Steps: 400 - Batch size: 16 - Optimizer: Adamw bnb 8bit - Sequence Len: 1096 The weights can be found [here](https://huggingface.co/andythetechnerd03/VistralPoem5) The notebook for training can be found at `notebook/Fine_tune_LLMs_with_Axolotl.ipynb` ## Benchmark We used the custom evaluation dataset to perform benchmark. Since popular metrics such as ROUGE is not applicable to poem format, we chose a simpler approach - counting the probability of 5-word poems in the result. </br> Here's the result: | Model | Number of Parameters | Hardware | Probability of 5-word(Higher is better) | Average inference time(Lower is better) | |----------------------------|----------------------|----------------------|-----------------------------------------|-----------------------------------------| | Vistral-7B-Chat (baseline) | 7B | 1x Nvidia Tesla A100 | 4.15% | 6.75s | | Google Gemini Pro* | > 100B | **Multi-TPU** | 18.3% | 3.4s | | **VistralPoem5 (Ours)** | **7B** | 1x Nvidia Tesla A100 | **61.4%** | **3.14s** | &ast; API call, meaning inference time may be affected The benchmark code can be found at `notebook/infer_poem_model.ipynb` and `notebook/probability_5word.ipynb` ## Deployment We used Gradio for fast deployment on Google Colab. It should be in `notebook/infer_poem_model.ipynb` as well. ![Screenshot 2024-03-09 185803](https://github.com/andythetechnerd03/Vietnamese-Poem-Summarization/assets/101492362/8bd94ed1-bb67-48fb-924e-17ad320e3005) Docker Image, coming soon... ## Future Work - [ ] Make a custom loss function to align rhythm and tones. - [ ] Use a better metric for evaluating poems (rhythm and content summarization) - [ ] Use RLHF to align poems with human values. - [ ] And more... ## Credits - [Phan Phuc](https://github.com/pphuc25) for doing the fine-tuning. - [Me](https://github.com/andythetechnerd03) for designing the pipeline and testing the model. - [Truong Vo](https://github.com/justinvo277) for collecting the data.
null
Non_BioNLP
# Vietnamese Text Summarization with Poem Summarize a piece of text with poem. Doesn't it sound fun? </br> ## Introduction Jokes aside, this is a fun project by my team at FPT University about fine-tuning a Large Language Model (LLM) at summarizing a piece of long Vietnamese text in the form of **poems**. We call the model **VistralPoem5**. </br> Here's a little example: ![image](/assets/example_data_transformed.png) ## HuggingFace 🤗 ``` python from transformers import AutoTokenizer, AutoModelForCausalLM model_name = "andythetechnerd03/VistralPoem5" tokenizer = AutoTokenizer.from_pretrained(model_name, device_map="auto") model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto") inputs = [ {"role": "system", "content": "Bạn là một nhà thơ chuyên nghiệp, nhiệm vụ của bạn là chuyển bài văn này thành 1 bài thơ 5 chữ từ khoảng 1 đến 3 khổ"}, {"role": "user", "content": "nhớ tới lời mẹ dặn\nsợ mẹ buồn con đau\nnên tự mình đứng dậy\nnhanh như có phép màu"} ] input_ids = tokenizer.apply_chat_template(inputs, return_tensors="pt").to(model.device) outputs = model.generate( input_ids=input_ids, max_new_tokens=200, do_sample=True, top_p=0.95, top_k=20, temperature=0.1, repetition_penalty=1.05, ) output_str = tokenizer.batch_decode(outputs[:, input_ids.size(1): ], skip_special_tokens=True)[0].strip() print(output_str) ``` ## Fine-tuning [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/andythetechnerd03/Vietnamese-Text-Summarization-Poem/blob/main/notebooks/fine_tune_with_axolotl.ipynb) This is not an easy task. The model we are using is a Vietnamese version of the popular [Mistral-7B](https://arxiv.org/abs/2310.06825) with 7 billion parameters. Obviously, it is very computationally expensive to fine-tune, therefore we applied various state-of-the-art optimization techniques: - [Flash Attention](https://github.com/Dao-AILab/flash-attention): helps reduce computation complexity of Attention from $O(n^2)$ to $O(n\log n)$ - [QLoRA (Quantized Low-Rank Adaptation)](https://arxiv.org/abs/2305.14314): train a smaller "adapter" which is a low-rank weight matrices, allowing for less computation. Furthermore, the base model is quantized to only `4-bit`, this is great for storing large models. - [Mixed Precision Training](https://arxiv.org/abs/1710.03740): here we combine `float32` with `bfloat16` data type for faster training. To train the LLM seamlessly as possible, we used a popular open-source fine-tuning platform called [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl). This platform helps you declare the parameters and config and train quickly without much code. ### Code for fine-tuning model To customize the configuration, you can modify the `create_file_config.py` file. After making your changes, run the script to generate a personalized configuration file. The following is an example of how to execute the model training: ``` python cd src export PYTHONPATH="$PWD" accelerate launch -m axolotl.cli.train config.yaml ``` ## Data This is not easy. Such data that takes the input as a long text (newspaper article, story) and output a poem is very hard to find. So we created our own... by using *prompt engineering*. - The collection of poems is straightforward. There are many repositories and prior works that collected a handful of Vietnamese poems, as well as publicly available samples online. We collected from [FPT Software AI Lab](https://github.com/fsoft-ailab/Poem-Generator) and [HuggingFace](https://github.com/fsoft-ailab/Poem-Generator). - From the poems we use prompt engineering to ask our base model to generate a story from such poem. The prompt is in the form </br> ``` Bạn là một nhà kể chuyện phiếm, nhiệm vụ của bạn là hãy kể 1 câu chuyện đơn giản và ngắn gọn từ một bài thơ, câu chuyện nên là 1 bài liền mạch, thực tế\n\n{insert poem here}``` - Speaking of prompt engineering, there is another prompt to generate poem from context. </br> ```Bạn là một nhà thơ chuyên nghiệp, nhiệm vụ của bạn là chuyển bài văn này thành 1 bài thơ 5 chữ từ khoảng 1 đến 3 khổ: \n {insert context here}``` - The pre-processing step is faily simple. A bit of lowercase here, punctuation removal there, plus reducing poems to 1-3 random paragraphs, and we are done. After all, we have about 72,101 samples with a ratio of 0.05 (68495 on the train set and 3606 on the test set) We published the dataset at [here](https://huggingface.co/datasets/andythetechnerd03/Vietnamese-Poem-5words) ### Custom Evaluation Data As part of the final evaluation for benchmark, we gathered around 27 Vietnamese children's stories and divided into many samples, accumulating to 118 samples. The dataset can be found [here](/data/eval_set.json) ## Model As mentioned earlier, we use [Vistral-7B-Chat](https://huggingface.co/Viet-Mistral/Vistral-7B-Chat) as the base model and we fine-tune it on our curated dataset earlier. Here's a few configurations: - The model is based on Transformer’s decoder-only architechture: - Number of Attention Heads: 32 - Hidden Size: 4096 - Vocab size: 38369 - Data type: bfloat16 - Number of Hidden Layers (Nx): 32 - Loss function: Cross-entropy - Parameter-Efficient Finetuning: QLora - 4 bit - Alpha: 16 - Rank: 32 - Target: Linear - Gradient accumulation: 4 - Learning Rate: 0.0002 - Warmup Steps: 10 - LR Scheduler: Cosine - Max Steps: 400 - Batch size: 16 - Optimizer: Adamw bnb 8bit - Sequence Len: 1096 The weights can be found [here](https://huggingface.co/andythetechnerd03/VistralPoem5) The notebook for training can be found at `notebook/Fine_tune_LLMs_with_Axolotl.ipynb` ## Benchmark We used the custom evaluation dataset to perform benchmark. Since popular metrics such as ROUGE is not applicable to poem format, we chose a simpler approach - counting the probability of 5-word poems in the result. </br> Here's the result: | Model | Number of Parameters | Hardware | Probability of 5-word(Higher is better) | Average inference time(Lower is better) | |----------------------------|----------------------|----------------------|-----------------------------------------|-----------------------------------------| | Vistral-7B-Chat (baseline) | 7B | 1x Nvidia Tesla A100 | 4.15% | 6.75s | | Google Gemini Pro* | > 100B | **Multi-TPU** | 18.3% | 3.4s | | **VistralPoem5 (Ours)** | **7B** | 1x Nvidia Tesla A100 | **61.4%** | **3.14s** | &ast; API call, meaning inference time may be affected The benchmark code can be found at `notebook/infer_poem_model.ipynb` and `notebook/probability_5word.ipynb` ## Deployment We used Gradio for fast deployment on Google Colab. It should be in `notebook/infer_poem_model.ipynb` as well. ![Screenshot 2024-03-09 185803](https://github.com/andythetechnerd03/Vietnamese-Poem-Summarization/assets/101492362/8bd94ed1-bb67-48fb-924e-17ad320e3005) Docker Image, coming soon... ## Future Work - [ ] Make a custom loss function to align rhythm and tones. - [ ] Use a better metric for evaluating poems (rhythm and content summarization) - [ ] Use RLHF to align poems with human values. - [ ] And more... ## Credits - [Phan Phuc](https://github.com/pphuc25) for doing the fine-tuning. - [Me](https://github.com/andythetechnerd03) for designing the pipeline and testing the model. - [Truong Vo](https://github.com/justinvo277) for collecting the data.
{"datasets": ["andythetechnerd03/Vietnamese-Poem-5words"], "language": ["vi"], "license": "mit", "tags": ["art"]}
task
[ "SUMMARIZATION" ]
46,513
superlazycoder/autotrain-dating-sentiment-classification
superlazycoder
text-classification
[ "transformers", "safetensors", "roberta", "text-classification", "autotrain", "dataset:autotrain-dating-sentiment-classification/autotrain-data", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-01-30T00:05:36Z
2024-01-30T00:05:52+00:00
6
0
--- datasets: - autotrain-dating-sentiment-classification/autotrain-data tags: - autotrain - text-classification widget: - text: I love AutoTrain --- # Model Trained Using AutoTrain - Problem type: Text Classification ## Validation Metrics loss: 0.5427681803703308 f1: 1.0 precision: 1.0 recall: 1.0 auc: 1.0 accuracy: 1.0
null
Non_BioNLP
# Model Trained Using AutoTrain - Problem type: Text Classification ## Validation Metrics loss: 0.5427681803703308 f1: 1.0 precision: 1.0 recall: 1.0 auc: 1.0 accuracy: 1.0
{"datasets": ["autotrain-dating-sentiment-classification/autotrain-data"], "tags": ["autotrain", "text-classification"], "widget": [{"text": "I love AutoTrain"}]}
task
[ "TEXT_CLASSIFICATION" ]
46,514
Lots-of-LoRAs/Mistral-7B-Instruct-v0.2-4b-r16-task913
Lots-of-LoRAs
null
[ "pytorch", "safetensors", "en", "arxiv:1910.09700", "arxiv:2407.00066", "license:mit", "region:us" ]
2024-12-30T23:34:38Z
2024-12-30T23:34:43+00:00
0
0
--- language: en library_name: pytorch license: mit --- # Model Card for Mistral-7B-Instruct-v0.2-4b-r16-task913 <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> LoRA trained on task913_bianet_translation - **Developed by:** bruel - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** LoRA - **Language(s) (NLP):** en - **License:** mit - **Finetuned from model [optional]:** mistralai/Mistral-7B-Instruct-v0.2 ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** https://github.com/bruel-gabrielsson - **Paper [optional]:** "Compress then Serve: Serving Thousands of LoRA Adapters with Little Overhead" (2024), Rickard Brüel Gabrielsson, Jiacheng Zhu, Onkar Bhardwaj, Leshem Choshen, Kristjan Greenewald, Mikhail Yurochkin and Justin Solomon - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> https://huggingface.co/datasets/Lots-of-LoRAs/task913_bianet_translation sourced from https://github.com/allenai/natural-instructions ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** @misc{brüelgabrielsson2024compressserveservingthousands, title={Compress then Serve: Serving Thousands of LoRA Adapters with Little Overhead}, author={Rickard Brüel-Gabrielsson and Jiacheng Zhu and Onkar Bhardwaj and Leshem Choshen and Kristjan Greenewald and Mikhail Yurochkin and Justin Solomon}, year={2024}, eprint={2407.00066}, archivePrefix={arXiv}, primaryClass={cs.DC}, url={https://arxiv.org/abs/2407.00066}, } **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
null
Non_BioNLP
# Model Card for Mistral-7B-Instruct-v0.2-4b-r16-task913 <!-- Provide a quick summary of what the model is/does. --> ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> LoRA trained on task913_bianet_translation - **Developed by:** bruel - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** LoRA - **Language(s) (NLP):** en - **License:** mit - **Finetuned from model [optional]:** mistralai/Mistral-7B-Instruct-v0.2 ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** https://github.com/bruel-gabrielsson - **Paper [optional]:** "Compress then Serve: Serving Thousands of LoRA Adapters with Little Overhead" (2024), Rickard Brüel Gabrielsson, Jiacheng Zhu, Onkar Bhardwaj, Leshem Choshen, Kristjan Greenewald, Mikhail Yurochkin and Justin Solomon - **Demo [optional]:** [More Information Needed] ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> [More Information Needed] ### Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ### Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ### Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> https://huggingface.co/datasets/Lots-of-LoRAs/task913_bianet_translation sourced from https://github.com/allenai/natural-instructions ### Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> #### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Testing Data, Factors & Metrics #### Testing Data <!-- This should link to a Dataset Card if possible. --> [More Information Needed] #### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> [More Information Needed] ## Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** @misc{brüelgabrielsson2024compressserveservingthousands, title={Compress then Serve: Serving Thousands of LoRA Adapters with Little Overhead}, author={Rickard Brüel-Gabrielsson and Jiacheng Zhu and Onkar Bhardwaj and Leshem Choshen and Kristjan Greenewald and Mikhail Yurochkin and Justin Solomon}, year={2024}, eprint={2407.00066}, archivePrefix={arXiv}, primaryClass={cs.DC}, url={https://arxiv.org/abs/2407.00066}, } **APA:** [More Information Needed] ## Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed]
{"language": "en", "library_name": "pytorch", "license": "mit"}
task
[ "TRANSLATION" ]
46,515
ml4pubmed/xtremedistil-l12-h384-uncased_pub_section
ml4pubmed
text-classification
[ "transformers", "pytorch", "bert", "text-classification", "document sections", "sentence classification", "document classification", "medical", "health", "biomedical", "en", "dataset:pubmed", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2022-05-04T01:32:45Z
2022-06-22T12:29:07+00:00
112
0
--- datasets: - pubmed language: - en metrics: - f1 pipeline_tag: text-classification tags: - text-classification - document sections - sentence classification - document classification - medical - health - biomedical widget: - text: many pathogenic processes and diseases are the result of an erroneous activation of the complement cascade and a number of inhibitors of complement have thus been examined for anti-inflammatory actions. example_title: background example - text: a total of 192 mi patients and 140 control persons were included. example_title: methods example - text: mi patients had 18 % higher plasma levels of map44 (iqr 11-25 %) as compared to the healthy control group (p < 0. 001.) example_title: results example - text: the finding that a brief cb group intervention delivered by real-world providers significantly reduced mdd onset relative to both brochure control and bibliotherapy is very encouraging, although effects on continuous outcome measures were small or nonsignificant and approximately half the magnitude of those found in efficacy research, potentially because the present sample reported lower initial depression. example_title: conclusions example - text: in order to understand and update the prevalence of myopia in taiwan, a nationwide survey was performed in 1995. example_title: objective example --- # xtremedistil-l12-h384-uncased_pub_section - original model file name: textclassifer_xtremedistil-l12-h384-uncased_pubmed_20k - This is a fine-tuned checkpoint of `microsoft/xtremedistil-l12-h384-uncased` for document section text classification - possible document section classes are:BACKGROUND, CONCLUSIONS, METHODS, OBJECTIVE, RESULTS, ## usage in python install transformers as needed: `pip install -U transformers` run the following, changing the example text to your use case: ``` from transformers import pipeline model_tag = "ml4pubmed/xtremedistil-l12-h384-uncased_pub_section" classifier = pipeline( 'text-classification', model=model_tag, ) prompt = """ Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. """ classifier( prompt, ) # classify the sentence ``` ## metadata ### training_parameters - date_run: Apr-24-2022_t-12 - huggingface_tag: microsoft/xtremedistil-l12-h384-uncased
null
BioNLP
# xtremedistil-l12-h384-uncased_pub_section - original model file name: textclassifer_xtremedistil-l12-h384-uncased_pubmed_20k - This is a fine-tuned checkpoint of `microsoft/xtremedistil-l12-h384-uncased` for document section text classification - possible document section classes are:BACKGROUND, CONCLUSIONS, METHODS, OBJECTIVE, RESULTS, ## usage in python install transformers as needed: `pip install -U transformers` run the following, changing the example text to your use case: ``` from transformers import pipeline model_tag = "ml4pubmed/xtremedistil-l12-h384-uncased_pub_section" classifier = pipeline( 'text-classification', model=model_tag, ) prompt = """ Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. """ classifier( prompt, ) # classify the sentence ``` ## metadata ### training_parameters - date_run: Apr-24-2022_t-12 - huggingface_tag: microsoft/xtremedistil-l12-h384-uncased
{"datasets": ["pubmed"], "language": ["en"], "metrics": ["f1"], "pipeline_tag": "text-classification", "tags": ["text-classification", "document sections", "sentence classification", "document classification", "medical", "health", "biomedical"], "widget": [{"text": "many pathogenic processes and diseases are the result of an erroneous activation of the complement cascade and a number of inhibitors of complement have thus been examined for anti-inflammatory actions.", "example_title": "background example"}, {"text": "a total of 192 mi patients and 140 control persons were included.", "example_title": "methods example"}, {"text": "mi patients had 18 % higher plasma levels of map44 (iqr 11-25 %) as compared to the healthy control group (p < 0. 001.)", "example_title": "results example"}, {"text": "the finding that a brief cb group intervention delivered by real-world providers significantly reduced mdd onset relative to both brochure control and bibliotherapy is very encouraging, although effects on continuous outcome measures were small or nonsignificant and approximately half the magnitude of those found in efficacy research, potentially because the present sample reported lower initial depression.", "example_title": "conclusions example"}, {"text": "in order to understand and update the prevalence of myopia in taiwan, a nationwide survey was performed in 1995.", "example_title": "objective example"}]}
task
[ "TEXT_CLASSIFICATION", "TRANSLATION" ]
46,516
Indramal/Text-Summarization
Indramal
text2text-generation
[ "transformers", "pytorch", "bart", "text2text-generation", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-01-12T12:41:27Z
2024-02-14T14:37:03+00:00
11
0
--- language: - en license: apache-2.0 --- > **Contact details:** [Indramal Wansekara Profile Website](https://www.indramal.com/) [my GitHub Repo for other codes](https://github.com/indramal/Text-Summarization/)
null
Non_BioNLP
> **Contact details:** [Indramal Wansekara Profile Website](https://www.indramal.com/) [my GitHub Repo for other codes](https://github.com/indramal/Text-Summarization/)
{"language": ["en"], "license": "apache-2.0"}
task
[ "SUMMARIZATION" ]
46,517
meandyou200175/vn_bi_encoder_16neg
meandyou200175
sentence-similarity
[ "sentence-transformers", "safetensors", "roberta", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:43804", "loss:MultipleNegativesRankingLoss", "arxiv:1908.10084", "arxiv:1705.00652", "base_model:bkai-foundation-models/vietnamese-bi-encoder", "base_model:finetune:bkai-foundation-models/vietnamese-bi-encoder", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
2024-10-31T08:39:59Z
2024-10-31T08:40:18+00:00
6
0
--- base_model: bkai-foundation-models/vietnamese-bi-encoder library_name: sentence-transformers metrics: - cosine_accuracy@1 - cosine_accuracy@3 - cosine_accuracy@5 - cosine_accuracy@10 - cosine_precision@1 - cosine_precision@3 - cosine_precision@5 - cosine_precision@10 - cosine_recall@1 - cosine_recall@3 - cosine_recall@5 - cosine_recall@10 - cosine_ndcg@10 - cosine_mrr@10 - cosine_map@100 - dot_accuracy@1 - dot_accuracy@3 - dot_accuracy@5 - dot_accuracy@10 - dot_precision@1 - dot_precision@3 - dot_precision@5 - dot_precision@10 - dot_recall@1 - dot_recall@3 - dot_recall@5 - dot_recall@10 - dot_ndcg@10 - dot_mrr@10 - dot_map@100 pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:43804 - loss:MultipleNegativesRankingLoss widget: - source_sentence: Nhờ bác sĩ cho biết việc lựa chọn đóng đinh nội tủy và nẹp vít để kết hợp xương đòn dựa trên cơ sở nào ạ? Ca phẫu thuật thường kéo dài trong bao lâu? Bệnh nhân nằm viện mấy ngày? sentences: - ' Chào em, là bệnh mãn tính phải điều trị suốt đời, phải kiên nhẫn và kiên trì nên đôi khi lượng đường trong cơ thể không ổn định. Lúc đi khám xét nghiệm thì ổn do bản thân biết mai đi khám nên sẽ kiêng ăn, ăn ít... còn bệnh lâu dài nên trong ngày đôi khi thèm chút này hay thích ăn chút kia, quên uống thuốc, suy nghĩ, mất ngủ cũng làm đường không ổn định. Đường trong cơ thể lúc lên lúc xuống dễ đưa đến biến chứng. Em hay thấy bệnh nhân tiểu đường tháo khớp ngón chân, ngón tay, đôi khi tháo khớp gối, khớp háng, đây là do tê liệt hệ thần kinh nên khi va chạm bệnh nhân không phát hiện. Đến khi phát hiện thì đã nhiễm trùng nặng phải tháo khớp. Theo BS mẹ em có khả năng do biến chứng tiểu đường vì mẹ em bị bệnh khá lâu nên ít nhiều ảnh hưởng thần kinh bị tê liệt gây đau. Em nên nhớ dặn mẹ đi tái khám và điều trị cho thật ổn định nhé! Thân mến!' - ' Để lựa chọn phương pháp đóng đinh nội tủy hay nẹp vít cho bệnh nhân cần dựa vào nhiều yếu tố. Trong lòng tủy xương có một cái ống, nếu lòng tủy bệnh nhân nhỏ mà đường gãy không bị gãy thành nhiều mảnh thì nên lựa chọn phương pháp đóng đinh. Phương pháp này có nhược điểm dễ bị lộ phần đinh khi đinh vừa đóng, chưa chắc vào xương. Tuy nhiên, ưu điểm là khi đóng đinh, đường mổ sẽ nhỏ, đơn giản. Đối với nẹp vít, đường mổ dài hơn nhưng phần nắn chỉnh sẽ tuyệt đối, vững chắc hơn. Nhìn chung, giữa 2 phương pháp thời gian mổ không khác biệt nhau nhiều, từ 30-45 phút sẽ hoàn thành cuộc phẫu thuật kết hợp xương. Tại bệnh viện Nhân dân 115, sau khi bệnh nhân được làm phẫu thuật có thể xuất viện rất sớm trong vòng khoảng 3-5 ngày, tùy theo đường mổ lớn hay nhỏ. Giữa việc lựa chọn phẫu thuật hay bảo tồn, đinh nội tủy hay nẹp vít phụ thuộc vào lòng tủy của bệnh nhân và thói quen, sự đánh giá của phẫu thuật viên. Cá nhân tôi thường lựa chọn phương pháp phẫu thuật nẹp vít sẽ cho kết quả nắn chỉnh tốt, chắc hơn và bệnh nhân không bị biến chứng trồi đinh về sau. Thân mến.' - Chào em, Tình trạng người mệt mỏi, khó thở, tim đập nhanh xảy ra khi không gắng sức có thể do nhiều nguyên nhân, gồm tim mạch, hô hấp, thần kinh cơ, tiêu hóa (chủ yếu là ống tiêu hóa trên), tâm lý, bệnh lý nội tiết tố… Viêm dạ dày trào ngược có thể gây các triệu chứng này do dịch acid trào ngược từ dạ dày lên thực quản kích thích thần kinh tim. Mặt khác bệnh dạ dày là bệnh có thể tái phát, điều trị hết bệnh rồi thì bệnh vẫn có thể tái lại. Do đó, nếu em đã khám tim mạch và hô hấp bình thường, để biết có phải mình mệt mỏi do bệnh dạ dày gây ra hay không thì tốt nhất là em khám chuyên khoa nội tiêu hóa và điều trị trào ngược dạ dày thực quản thử, nếu triệu chứng cải thiện nhanh chóng thì chính hắn là nguyên nhân, em nhé. - source_sentence: Tôi bị tình trạng nuốt nước miếng có cảm giác bị vướng ở cổ, không đau rát, không ho sốt, ăn uống bình thường đã 1 ngày nay. Chỉ có nuốt nước miếng là có cảm giác vướng thôi, lỗ tai bên trái thì cảm giác ngứa nhẹ. Xin hỏi là bệnh gì vậy ạ? sentences: - "Em Lan thân mến, Hiện nay, xét nghiệm được xem là một xét nghiệm\r\nthường quy,\ \ nên thai kỳ của em cũng rất cần được làm những xét nghiệm này mặc\r\ndù gia\ \ đình em không có bệnh lý bất thường. Tuy nhiên, thai kỳ của em đã qua thời gian\ \ làm xét nghiệm Double test, bây\r\ngiờ em phải chờ đến lúc thai được 16 – 18\ \ tuần tuổi, làm xét nghiệm Triple test\r\nem nhé! Chúc em và bé khỏe mạnh!" - 'Trường hợp thoái hóa cột sống thắt lưng gây đau mỏi liên tục dù đã dùng thuốc giảm đau liều cao Chào em, Thoái hóa khớp, thoái hóa cột sống là tiến trình lão hóa không thể tránh khỏi của con người, đặc biệt có thể xảy ra sớm và nhanh hơn ở người nữ sau mãn kinh, sinh nở nhiều, suy dinh dưỡng hay ăn uống thiếu chất khoáng, lao động vất vả lúc còn trẻ. Trường hợp thoái hóa cột sống thắt lưng gây đau mỏi liên tục dù đã dùng thuốc giảm đau liều cao, đặc biệt là đau lan xuống hai chân, tê yếu hai chân thì cần chụp MRI cột sống để tầm soát thoát vị đĩa đệm chèn ép tủy sống. Trường hợp của em, mới phát hiện thoái hóa cột sống thắt lưng gần đây, cũng mới uống thuốc 1 tuần và không duy trì nữa, việc đau lưng vẫn còn âm ỉ nhưng không lan xuống hai chân thì chưa đến mức cần chụp MRI cột sống thắt lưng. Nhưng mà, em cần tích cực điều trị để bệnh thoái hóa cột sống thắt lưng không tiến triển nặng hơn. Bệnh này trị khỏi hoàn toàn là không thể, vì sinh lão bệnh tử không thể cải hoàn, nhưng mà việc điều trị tích cực sẽ giúp khống chế được bệnh, giảm đau và giảm tốc độ tiến triển của bệnh. Về việc sử dụng thuốc, dù là thuốc Tây hay thuốc Đông y, em cũng cần phải thăm khám bs ck cơ xương khớp (Tây y) hay ck y học cổ truyền (Đông y) để được kê thuốc phù hợp. các thuốc thường dùng là giảm đau, giãn cơ, bổ sung vi khoáng chất (canxi, vitamin D3, magie...). Bên cạnh đó, về phương pháp giảm đau hỗ trợ không dùng thuốc, em nên chú ý: - Chú ý thay đổi tư thế trong quá trình làm việc, không giữ mãi một tư thế trong nhiều giờ liền. Ngồi làm việc đúng tư thế để tránh các bệnh cột sống. - Vận động đúng cách, khi vác vật nặng không vặn cột sống. - Thường xuyên tập thể dục rèn luyện để cột sống vững chắc, cơ thể dẻo dai, bơi cũng được mà yoga là tốt nhất. - Ăn uống khoa học, xây dựng chế độ dinh dưỡng hợp lý, tăng cường nhóm thực phẩm giàu canxi, vitamin D, omega 3… giúp nâng cao độ chắc khỏe của đĩa đệm cũng như xương khớp. - Duy trì cân nặng bình thường, tránh để tăng cân quá mức. - Tư thế ngủ: nằm ngửa trên ván cứng hay nệm bông ép chặt, tránh nệm lò xo hay nệm cao su quá mềm, có thể đệm ở vùng khoeo làm co nhẹ khớp gối và khớp háng, nên nằm đầu thấp không gối sẽ tốt cho cột sống cổ. - Có thể thực hiện điều trị vật lý và các liệu pháp phản xạ: bao gồm phương pháp nhiệt như chườm nóng (túi nước, muối rang, cám rang, lá lốt, lá ngải cứu nóng); dùng các dòng điện tại khoa vật lý trị liệu, điều trị bằng laser; châm cứu, kéo cơ để hỗ trợ giảm đau cơ cạnh sống. Trân trọng!' - Chào bạn, Nuốt vướng ở cổ thường gặp trong một số bệnh lý viêm nhiễm hầu họng như viêm họng, viêm amidan mạn, trào ngược dạ dày thực quản, hội chứng chảy mũi sau… Đây là có thể là triệu chứng đầu tiên báo hiệu một đợt bùng phát cấp tính của viêm nhiễm hô hấp trên do triệu chứng mới chỉ xuất hiện 1 ngày. Bạn nên khám bác sĩ Tai mũi họng để thăm khám trực tiếp, đánh giá và kê toa điều trị bạn nhé! Thân mến. - source_sentence: Chào bác sĩ, em bị gãy xương gót, đã đóng đinh đến nay được gần 5 tuần. Vậy 6 tuần em tháo đinh được chưa ạ? sentences: - ' Chào em, gồm 2 trị số, trị số lớn nhất gọi là huyết áp tâm thu, bình thường < 140 và > 90 mmHg; trị số thấp nhất gọi là huyết áp tâm trương, bình thường < 90 và > 60 mmHg. Huyết áp có thể tăng khi căng thẳng, do lo lắng, do hội chứng áo choàng trắng (khi vào bv, khi gặp bác sĩ thì huyết áp cao), bệnh lý viêm nhiễm, do cafe, khi khó thở... nhìn chung là các stress đối với cơ thể. Như vậy, huyết áp ghi nhận ở những lúc cơ thể đang lo lắng, bồn chồn, có bệnh thì sẽ không phản ánh chính xác được huyết áp dao động bình thường của người bệnh. Do vậy em nên khám chuyên khoa tim mạch, bác sĩ sẽ thăm khám và làm xét nghiệm kiểm tra xem em có các dấu chứng của tăng huyết áp hay không (như dày thành tim, tiểu đạm, đo huyết áp 24 giờ...) để xác định em có tăng huyết áp hay không và điều trị thích hợp. Những triệu chứng hoa mắt, chóng mặt, đau đầu, đau 1 bên mắt, tiểu nhiều có thể là do bệnh tăng huyết áp gây ra (ảnh hưởng lên mạch máu não, lên thận...) hoặc là 1 bệnh lý khác như thiếu máu, rối loạn tiền đình, viêm nhiễm hệ thống, viêm mũi xoang, bệnh lý mạch máu não... (và tăng huyết áp chỉ là phản ứng của cơ thể khi có stress). Để tìm ra bệnh và giải quyết nỗi lo về bệnh, em nên đến bệnh viện để kiểm tra sức khỏe em nhé. Thân mến! ' - ' Chào em, Thời điểm 6 tuần là quá sớm để rút đinh cố định xương gót (trừ trường hợp khung cố định xương bên ngoài). Tháo đinh vít kim loại chỉ bắt buộc thực hiện sớm trong những trường hợp bất thường như gãy vít, nhiễm trùng, khớp giả... gây ra các triệu chứng bất thường với bệnh nhân mà thôi. Em nên tái khám tại chuyên khoa Chấn thương Chỉnh hình để bác sĩ kiểm tra lại việc lành xương của em tốt chưa và dặn em lịch trình rút đinh phù hợp, em nhé. Thân mến.' - K dạ dày không điều trị tiên lượng sống khá ngắn Chào em, K dạ dày là ung thư dạ dày. Bệnh ung thư dạ dày là bệnh lý ác tính và có chỉ định phẫu thuật cắt khối u – cắt dạ dày khi còn có thể cắt được. Nếu đã phát hiện ung thư dạ dày mà không điều trị phẫu thuật thì thời gian sống của bệnh nhân trung bình là 6 tháng đến 1 năm tùy loại ung thư dạ dày, khi ung thư tiến triển di căn có thể gây nhiều đau đớn hơn. Hiện tại chị em đang bị suy nhược cơ thể nhiều, không ăn uống được, đau nhiều do ung thư dạ dày là có chỉ định vào bệnh viện nằm điều trị luôn rồi, chứ không thể nào lấy thuốc mà không tới phòng khám được đâu. Vô bệnh viện chị em sẽ được truyền dịch, chích thuốc, nâng thể trạng lên rồi mới tính đến chuyện điều trị khối ung thư kia. Em đưa chị em đến bệnh viện càng sớm càng tốt, tốt nhất là bệnh viện Ung bướu, em nhé. - source_sentence: "Thưa bác sĩ,\r\n\r\nEm bị đục thủy tinh thể do chấn thương và\ \ vừa mổ mắt về và em cũng bị cận thị. Thời gian khoảng 1 tuần em thấy mắt mình\ \ nhìn chỉ rõ hơn được 1 phần nào. Nhìn xa thì vẫn thấy nhưng vẫn mờ mờ. Bác sĩ\ \ cho em lời khuyên nên làm cách nào và mắt em có thể sáng lại như bình thường\ \ được không ạ?\r\n\r\nEm xin chân thành cảm ơn! (Minh Tiến - Bình Định)" sentences: - Bạn Minh Tiến thân mến, Hiện nay phẫu thuật đục thủy tinh thể đã được y học nói chung và ngành Nhãn khoa Việt Nam thực hiện hoàn chỉnh đến mức tuyệt vời. Phẫu thuật này được xem như một cuộc cách mạng rất đáng tự hào của ngành nhãn khoa. Hàng ngày có thể tới hàng ngàn ca phẫu thuật đem lại ánh sáng cho người mù lòa đục thể thủy tinh tại Việt Nam. Nói như vậy để giúp cho bạn hiểu rõ phẫu thuật này các bác sĩ Việt Nam thực hiện rất thường xuyên và rất tốt. Tuy nhiên, với mắt đục thủy tinh thể do chấn thương của bạn là ca phẫu thuật tương đối không đơn giản. Thêm vào đó ngoài đục thủy tinh thể do chấn thương, mắt bạn cũng có thể kèm theo tổn thương ở các bộ phận khác của mắt mà trước mổ bác sĩ khó có thể chẩn đoán được. Với hai lý do nêu trên, nên đôi khi mắt mổ khó có thể tốt theo ý muốn của cả bệnh nhân lẫn thầy thuốc. Bạn cần có thời gian theo dõi và điều trị tiếp sau mổ. Sau thời gian ổn định khoảng 1 tháng, bạn cần đo thử kính xem có cải thiện thị lực thêm không? Chúc bạn may mắn! - Chào em, Bình thường các hạch trong cơ thể không sưng to lên đến mức có thể sờ chạm hay nhận biết được. Vì thế, hạch sưng lên, hay thường gọi là nổi hạch, là một triệu chứng bất thường của cơ thể. Cho nên, em lo lắng là đúng khi phát hiện hạch ở vùng cổ. Hạch bạch huyết đóng vai trò quan trọng đối với hoạt động của hệ miễn dịch. Chúng chứa các tế bào miễn dịch như lympho bào, đại thực bào... có chức năng miễn dịch chống lại các yếu tố lạ như vi khuẩn, virus, kí sinh trùng... xâm nhập vào cơ thể. Trong quá trình đó các hạch có thể bị viêm và sưng lên. Một số trường hợp hạch sưng có thể là hạch ung thư hoặc di căn. Đặc điểm của hạch viêm là nhỏ, số lượng ít, bờ tròn đều, không phát triển theo thời gian, không xâm lấn da xung quanh. Thông thường đối với hạch viêm thì nguồn viêm có thể tấn công tại hạch, cũng có khi là hạch viêm phản ứng với ổ viêm nhiễm cạnh đó, điều trị hết viêm thì hạch sẽ lặn dần, có thể lặn chậm hơn vài tuần đến vài tháng, có một số loại hạch cũng là hạch viêm nhưng mà chỉ giảm kích thước rồi cứ "lì" vậy luôn - không lặn hẳn nhưng không còn sưng như trước và vẫn giữ hình ảnh của hạch viêm, cũng có loại hạch viêm sau lại chuyển sang xơ chai hóa như sẹo cũ và không lặn. Như vậy, em có 1 hạch vùng cổ đã được xác định là hạch viêm thông qua sinh thiết hạch cách đây 10 năm. Trong vòng 10 năm nay, hạch cổ đó không có triệu chứng bất thường. Gần đây, hạch cổ đó có biểu hiện viêm trở lại, mặc dù em uống thuốc (tự mua) thì hạch hết sưng đau, nhưng em cũng cần khám lại bên chuyên khoa ung bướu để kiểm tra tổng quát lại 1 lần, tìm nguyên nhân gây kích thích hạch viêm này tái hoạt động, xem là nguyên nhân lành tính hay tiềm ẩn nguyên nhân khác (vì lần kiểm tra trước đã cách đây 10 năm rồi), em nhé. - ' Chào em, Trường hợp em mô tả là những bất thường của hệ hô hấp có thể là bệnh lý tai mũi họng hay hô hấp dưới như viêm phổi, viêm phế quản, em cần đến các cơ sở y tế chuyên sâu tai mũi họng hay hô hấp để khám thêm. Những biểu hiện đó hoàn toàn không có cơ sở nghĩ . Thân mến!' - source_sentence: Bác sĩ cho em hỏi, em bị rạn nứt xương gót chân bên phải. Em bị hơn 1 tháng nay rồi. Em bỏ thuốc lá. Em muốn hỏi bác sĩ thông thường bó bột hơn hay thuốc lá hơn? Như của em khoảng bao lâu thì khỏi? Và giờ em vẫn chưa đi được bác sĩ ạ. Em cảm ơn. sentences: - 'Câu hỏi của em rất chân thành. Tự ý thức quyết tâm cai nghiệm là điều đáng quý. Nếu em tiếp tục sử dụng thì tình trạng sẽ tồi tệ hơn rất nhiều. Ba yếu tố quan trọng nhất và tiến hành đồng thời để cai nghiện thành công, đó là: 1. Ý chí 2. Sự hiểu biết thấu đáo 3. Môi trường thân thiện. Các Trung tâm cai nghiện sẽ giúp em phần 2 và phần 3, từ đó sẽ củng cố phần 1 của em. Trường hợp ở nhà mà em tự cai, thực hành mỗi ngày với 3 điều kiện trên, em sẽ thành công như nhiều bạn khác. Không nên nôn nóng, sốt ruột. Trước tiên em phải thuộc lòng và thực hành những quy tắc này thành thói quen và áp dụng suốt đời. Nhiều trường hợp cai được vài năm vẫn tái nghiện. Do đó, nên tránh xa những "nguồn" khiến em tái nghiện, tránh xa bạn bè nghiện ngập em nhé. Chúc em quyết tâm và đem lại niềm vui cho bố mẹ.' - Chào em, Thứ nhất, bắt buộc phải có phim Xquang để biết em có thực sự nứt xương gót hay bị gãy phức tạp hơn, vì nhiều trường hợp tưởng chỉ nứt xương thôi nhưng thật ra là vỡ phức tạp, phải phẫu thuật mới nhanh ổn được. Thứ hai, theo nguyên tắc điều trị nứt gãy xương là phải cố định tốt để can xương mọc ra, chỗ nứt gãy mới được nối liền. Do đó, nếu bó bột thì chân sẽ được cố định liên tục trong 4-6 tuần, còn bó lá thì phải thay thường xuyên, mỗi lần thay là 1 lần xê dịch nên xương khó lành. Tốt hơn hết em nên đến Bệnh viện Chấn thương Chỉnh hình để được kiểm tra và điều trị thích hợp, em nhé. Thân mến. - Chào bạn, Qua hình ảnh sang thương và mô tả triệu chứng, bệnh lý của bạn có khả năng là chàm hay còn gọi là viêm da dị ứng với đặc điểm là viêm và nổi mụn nhỏ, ngứa ngáy. Nguyên nhân của chàm hiện nay chưa rõ nhưng có thể do cơ địa dị ứng (người mắc hen, viêm mũi dị ứng có nguy cơ cao mắc chàm), do kích thích của hóa chất như nước rửa chén, bột giặt, cao su, kim loại, chất liệu giày dép (chàm tiếp xúc),... Thời tiết lạnh, stress, đổ mồ hôi nhiều và phấn hoa... cũng là những nguyên nhân có thể khiến da bị chàm. Chàm cũng có thể gặp ở người bị suy van tĩnh mạch, giãn tĩnh mạch chân khiến tình trạng bệnh dai dẳng, kém đáp ứng điều trị. Điều trị chàm thường phải sử dụng một số loại thuốc bôi da kéo dài, có thể để lại tác dụng phụ, do đó bạn nên khám BS Da liễu để kê toa loại thuốc phù hợp. Ngoài ra, bạn nên chú ý xem có yếu tố nào thường kích thích khởi phát chàm để tránh cho bệnh tái phát bạn nhé! Thân mến. model-index: - name: SentenceTransformer based on bkai-foundation-models/vietnamese-bi-encoder results: - task: type: information-retrieval name: Information Retrieval dataset: name: Unknown type: unknown metrics: - type: cosine_accuracy@1 value: 0.7003287070854638 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8261504747991234 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8676040905770636 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9134404674945216 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.7003287070854638 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2753834915997078 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.1735208181154127 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09134404674945214 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.7003287070854638 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8261504747991234 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8676040905770636 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9134404674945216 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.8067566615526722 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.7726399903764786 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.7764065721123147 name: Cosine Map@100 - type: dot_accuracy@1 value: 0.6818845872899927 name: Dot Accuracy@1 - type: dot_accuracy@3 value: 0.8153761869978087 name: Dot Accuracy@3 - type: dot_accuracy@5 value: 0.8621256391526662 name: Dot Accuracy@5 - type: dot_accuracy@10 value: 0.9101533966398831 name: Dot Accuracy@10 - type: dot_precision@1 value: 0.6818845872899927 name: Dot Precision@1 - type: dot_precision@3 value: 0.2717920623326029 name: Dot Precision@3 - type: dot_precision@5 value: 0.1724251278305332 name: Dot Precision@5 - type: dot_precision@10 value: 0.09101533966398831 name: Dot Precision@10 - type: dot_recall@1 value: 0.6818845872899927 name: Dot Recall@1 - type: dot_recall@3 value: 0.8153761869978087 name: Dot Recall@3 - type: dot_recall@5 value: 0.8621256391526662 name: Dot Recall@5 - type: dot_recall@10 value: 0.9101533966398831 name: Dot Recall@10 - type: dot_ndcg@10 value: 0.7954203289199318 name: Dot Ndcg@10 - type: dot_mrr@10 value: 0.758727115146035 name: Dot Mrr@10 - type: dot_map@100 value: 0.7625999642800587 name: Dot Map@100 --- # SentenceTransformer based on bkai-foundation-models/vietnamese-bi-encoder This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [bkai-foundation-models/vietnamese-bi-encoder](https://huggingface.co/bkai-foundation-models/vietnamese-bi-encoder). It maps sentences & paragraphs to a 768-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:** [bkai-foundation-models/vietnamese-bi-encoder](https://huggingface.co/bkai-foundation-models/vietnamese-bi-encoder) <!-- at revision 84f9d9ada0d1a3c37557398b9ae9fcedcdf40be0 --> - **Maximum Sequence Length:** 256 tokens - **Output Dimensionality:** 768 tokens - **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': 256, 'do_lower_case': False}) with Transformer model: RobertaModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("meandyou200175/vn_bi_encoder_16neg") # Run inference sentences = [ 'Bác sĩ cho em hỏi, em bị rạn nứt xương gót chân bên phải. Em bị hơn 1 tháng nay rồi. Em bỏ thuốc lá. Em muốn hỏi bác sĩ thông thường bó bột hơn hay thuốc lá hơn? Như của em khoảng bao lâu thì khỏi? Và giờ em vẫn chưa đi được bác sĩ ạ. Em cảm ơn.', 'Chào em, Thứ nhất, bắt buộc phải có phim Xquang để biết em có thực sự nứt xương gót hay bị gãy phức tạp hơn, vì nhiều trường hợp tưởng chỉ nứt xương thôi nhưng thật ra là vỡ phức tạp, phải phẫu thuật mới nhanh ổn được. Thứ hai, theo nguyên tắc điều trị nứt gãy xương là phải cố định tốt để can xương mọc ra, chỗ nứt gãy mới được nối liền. Do đó, nếu bó bột thì chân sẽ được cố định liên tục trong 4-6 tuần, còn bó lá thì phải thay thường xuyên, mỗi lần thay là 1 lần xê dịch nên xương khó lành. Tốt hơn hết em nên đến Bệnh viện Chấn thương Chỉnh hình để được kiểm tra và điều trị thích hợp, em nhé. Thân mến.', 'Chào bạn, Qua hình ảnh sang thương và mô tả triệu chứng, bệnh lý của bạn có khả năng là chàm hay còn gọi là viêm da dị ứng với đặc điểm là viêm và nổi mụn nhỏ, ngứa ngáy. Nguyên nhân của chàm hiện nay chưa rõ nhưng có thể do cơ địa dị ứng (người mắc hen, viêm mũi dị ứng có nguy cơ cao mắc chàm), do kích thích của hóa chất như nước rửa chén, bột giặt, cao su, kim loại, chất liệu giày dép (chàm tiếp xúc),... Thời tiết lạnh, stress, đổ mồ hôi nhiều và phấn hoa... cũng là những nguyên nhân có thể khiến da bị chàm. Chàm cũng có thể gặp ở người bị suy van tĩnh mạch, giãn tĩnh mạch chân khiến tình trạng bệnh dai dẳng, kém đáp ứng điều trị. Điều trị chàm thường phải sử dụng một số loại thuốc bôi da kéo dài, có thể để lại tác dụng phụ, do đó bạn nên khám BS Da liễu để kê toa loại thuốc phù hợp. Ngoài ra, bạn nên chú ý xem có yếu tố nào thường kích thích khởi phát chàm để tránh cho bệnh tái phát bạn nhé! Thân mến.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7003 | | cosine_accuracy@3 | 0.8262 | | cosine_accuracy@5 | 0.8676 | | cosine_accuracy@10 | 0.9134 | | cosine_precision@1 | 0.7003 | | cosine_precision@3 | 0.2754 | | cosine_precision@5 | 0.1735 | | cosine_precision@10 | 0.0913 | | cosine_recall@1 | 0.7003 | | cosine_recall@3 | 0.8262 | | cosine_recall@5 | 0.8676 | | cosine_recall@10 | 0.9134 | | cosine_ndcg@10 | 0.8068 | | cosine_mrr@10 | 0.7726 | | **cosine_map@100** | **0.7764** | | dot_accuracy@1 | 0.6819 | | dot_accuracy@3 | 0.8154 | | dot_accuracy@5 | 0.8621 | | dot_accuracy@10 | 0.9102 | | dot_precision@1 | 0.6819 | | dot_precision@3 | 0.2718 | | dot_precision@5 | 0.1724 | | dot_precision@10 | 0.091 | | dot_recall@1 | 0.6819 | | dot_recall@3 | 0.8154 | | dot_recall@5 | 0.8621 | | dot_recall@10 | 0.9102 | | dot_ndcg@10 | 0.7954 | | dot_mrr@10 | 0.7587 | | dot_map@100 | 0.7626 | <!-- ## 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 ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: steps - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `learning_rate`: 2e-05 - `num_train_epochs`: 1 - `warmup_ratio`: 0.1 - `fp16`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 1 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `use_liger_kernel`: False - `eval_use_gather_object`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs <details><summary>Click to expand</summary> | Epoch | Step | Training Loss | Validation Loss | cosine_map@100 | |:------:|:-----:|:-------------:|:---------------:|:--------------:| | 0 | 0 | - | - | 0.5553 | | 0.0091 | 100 | 0.6282 | - | - | | 0.0183 | 200 | 0.4527 | - | - | | 0.0274 | 300 | 0.4177 | - | - | | 0.0365 | 400 | 0.4088 | - | - | | 0.0457 | 500 | 0.3093 | - | - | | 0.0548 | 600 | 0.3814 | - | - | | 0.0639 | 700 | 0.3428 | - | - | | 0.0731 | 800 | 0.3295 | - | - | | 0.0822 | 900 | 0.3977 | - | - | | 0.0913 | 1000 | 0.258 | 0.0514 | 0.6996 | | 0.1004 | 1100 | 0.3543 | - | - | | 0.1096 | 1200 | 0.3309 | - | - | | 0.1187 | 1300 | 0.2932 | - | - | | 0.1278 | 1400 | 0.3873 | - | - | | 0.1370 | 1500 | 0.2808 | - | - | | 0.1461 | 1600 | 0.342 | - | - | | 0.1552 | 1700 | 0.2993 | - | - | | 0.1644 | 1800 | 0.226 | - | - | | 0.1735 | 1900 | 0.3545 | - | - | | 0.1826 | 2000 | 0.2887 | 0.0462 | 0.7226 | | 0.1918 | 2100 | 0.2612 | - | - | | 0.2009 | 2200 | 0.2559 | - | - | | 0.2100 | 2300 | 0.196 | - | - | | 0.2192 | 2400 | 0.2857 | - | - | | 0.2283 | 2500 | 0.3215 | - | - | | 0.2374 | 2600 | 0.2601 | - | - | | 0.2466 | 2700 | 0.2874 | - | - | | 0.2557 | 2800 | 0.2423 | - | - | | 0.2648 | 2900 | 0.3145 | - | - | | 0.2739 | 3000 | 0.1669 | 0.0403 | 0.7133 | | 0.2831 | 3100 | 0.2507 | - | - | | 0.2922 | 3200 | 0.2867 | - | - | | 0.3013 | 3300 | 0.2458 | - | - | | 0.3105 | 3400 | 0.2592 | - | - | | 0.3196 | 3500 | 0.1802 | - | - | | 0.3287 | 3600 | 0.2213 | - | - | | 0.3379 | 3700 | 0.2349 | - | - | | 0.3470 | 3800 | 0.2111 | - | - | | 0.3561 | 3900 | 0.2135 | - | - | | 0.3653 | 4000 | 0.2523 | 0.0344 | 0.7347 | | 0.3744 | 4100 | 0.1877 | - | - | | 0.3835 | 4200 | 0.1469 | - | - | | 0.3927 | 4300 | 0.2843 | - | - | | 0.4018 | 4400 | 0.1577 | - | - | | 0.4109 | 4500 | 0.2056 | - | - | | 0.4201 | 4600 | 0.2424 | - | - | | 0.4292 | 4700 | 0.2554 | - | - | | 0.4383 | 4800 | 0.1342 | - | - | | 0.4474 | 4900 | 0.1934 | - | - | | 0.4566 | 5000 | 0.1909 | 0.0304 | 0.7436 | | 0.4657 | 5100 | 0.245 | - | - | | 0.4748 | 5200 | 0.1876 | - | - | | 0.4840 | 5300 | 0.1235 | - | - | | 0.4931 | 5400 | 0.1824 | - | - | | 0.5022 | 5500 | 0.1909 | - | - | | 0.5114 | 5600 | 0.1481 | - | - | | 0.5205 | 5700 | 0.1943 | - | - | | 0.5296 | 5800 | 0.2303 | - | - | | 0.5388 | 5900 | 0.1724 | - | - | | 0.5479 | 6000 | 0.2524 | 0.0294 | 0.7519 | | 0.5570 | 6100 | 0.196 | - | - | | 0.5662 | 6200 | 0.2202 | - | - | | 0.5753 | 6300 | 0.1482 | - | - | | 0.5844 | 6400 | 0.151 | - | - | | 0.5936 | 6500 | 0.1525 | - | - | | 0.6027 | 6600 | 0.1637 | - | - | | 0.6118 | 6700 | 0.1517 | - | - | | 0.6209 | 6800 | 0.134 | - | - | | 0.6301 | 6900 | 0.1924 | - | - | | 0.6392 | 7000 | 0.1174 | 0.0278 | 0.7584 | | 0.6483 | 7100 | 0.1888 | - | - | | 0.6575 | 7200 | 0.1309 | - | - | | 0.6666 | 7300 | 0.2 | - | - | | 0.6757 | 7400 | 0.1652 | - | - | | 0.6849 | 7500 | 0.1599 | - | - | | 0.6940 | 7600 | 0.1289 | - | - | | 0.7031 | 7700 | 0.1533 | - | - | | 0.7123 | 7800 | 0.1765 | - | - | | 0.7214 | 7900 | 0.1403 | - | - | | 0.7305 | 8000 | 0.1288 | 0.0246 | 0.7680 | | 0.7397 | 8100 | 0.1868 | - | - | | 0.7488 | 8200 | 0.1594 | - | - | | 0.7579 | 8300 | 0.2239 | - | - | | 0.7671 | 8400 | 0.175 | - | - | | 0.7762 | 8500 | 0.1437 | - | - | | 0.7853 | 8600 | 0.2118 | - | - | | 0.7944 | 8700 | 0.1631 | - | - | | 0.8036 | 8800 | 0.1228 | - | - | | 0.8127 | 8900 | 0.1362 | - | - | | 0.8218 | 9000 | 0.1135 | 0.0207 | 0.7757 | | 0.8310 | 9100 | 0.196 | - | - | | 0.8401 | 9200 | 0.1598 | - | - | | 0.8492 | 9300 | 0.1214 | - | - | | 0.8584 | 9400 | 0.1826 | - | - | | 0.8675 | 9500 | 0.1273 | - | - | | 0.8766 | 9600 | 0.1006 | - | - | | 0.8858 | 9700 | 0.157 | - | - | | 0.8949 | 9800 | 0.1374 | - | - | | 0.9040 | 9900 | 0.1285 | - | - | | 0.9132 | 10000 | 0.2549 | 0.0211 | 0.7764 | | 0.9223 | 10100 | 0.1642 | - | - | | 0.9314 | 10200 | 0.1402 | - | - | | 0.9406 | 10300 | 0.2119 | - | - | | 0.9497 | 10400 | 0.151 | - | - | | 0.9588 | 10500 | 0.0928 | - | - | | 0.9679 | 10600 | 0.1822 | - | - | | 0.9771 | 10700 | 0.085 | - | - | | 0.9862 | 10800 | 0.1557 | - | - | | 0.9953 | 10900 | 0.1201 | - | - | </details> ### Framework Versions - Python: 3.10.14 - Sentence Transformers: 3.2.1 - Transformers: 4.45.1 - PyTorch: 2.4.0 - Accelerate: 0.34.2 - Datasets: 3.0.1 - Tokenizers: 0.20.0 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
null
BioNLP
# SentenceTransformer based on bkai-foundation-models/vietnamese-bi-encoder This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [bkai-foundation-models/vietnamese-bi-encoder](https://huggingface.co/bkai-foundation-models/vietnamese-bi-encoder). It maps sentences & paragraphs to a 768-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:** [bkai-foundation-models/vietnamese-bi-encoder](https://huggingface.co/bkai-foundation-models/vietnamese-bi-encoder) <!-- at revision 84f9d9ada0d1a3c37557398b9ae9fcedcdf40be0 --> - **Maximum Sequence Length:** 256 tokens - **Output Dimensionality:** 768 tokens - **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': 256, 'do_lower_case': False}) with Transformer model: RobertaModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True}) ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("meandyou200175/vn_bi_encoder_16neg") # Run inference sentences = [ 'Bác sĩ cho em hỏi, em bị rạn nứt xương gót chân bên phải. Em bị hơn 1 tháng nay rồi. Em bỏ thuốc lá. Em muốn hỏi bác sĩ thông thường bó bột hơn hay thuốc lá hơn? Như của em khoảng bao lâu thì khỏi? Và giờ em vẫn chưa đi được bác sĩ ạ. Em cảm ơn.', 'Chào em, Thứ nhất, bắt buộc phải có phim Xquang để biết em có thực sự nứt xương gót hay bị gãy phức tạp hơn, vì nhiều trường hợp tưởng chỉ nứt xương thôi nhưng thật ra là vỡ phức tạp, phải phẫu thuật mới nhanh ổn được. Thứ hai, theo nguyên tắc điều trị nứt gãy xương là phải cố định tốt để can xương mọc ra, chỗ nứt gãy mới được nối liền. Do đó, nếu bó bột thì chân sẽ được cố định liên tục trong 4-6 tuần, còn bó lá thì phải thay thường xuyên, mỗi lần thay là 1 lần xê dịch nên xương khó lành. Tốt hơn hết em nên đến Bệnh viện Chấn thương Chỉnh hình để được kiểm tra và điều trị thích hợp, em nhé. Thân mến.', 'Chào bạn, Qua hình ảnh sang thương và mô tả triệu chứng, bệnh lý của bạn có khả năng là chàm hay còn gọi là viêm da dị ứng với đặc điểm là viêm và nổi mụn nhỏ, ngứa ngáy. Nguyên nhân của chàm hiện nay chưa rõ nhưng có thể do cơ địa dị ứng (người mắc hen, viêm mũi dị ứng có nguy cơ cao mắc chàm), do kích thích của hóa chất như nước rửa chén, bột giặt, cao su, kim loại, chất liệu giày dép (chàm tiếp xúc),... Thời tiết lạnh, stress, đổ mồ hôi nhiều và phấn hoa... cũng là những nguyên nhân có thể khiến da bị chàm. Chàm cũng có thể gặp ở người bị suy van tĩnh mạch, giãn tĩnh mạch chân khiến tình trạng bệnh dai dẳng, kém đáp ứng điều trị. Điều trị chàm thường phải sử dụng một số loại thuốc bôi da kéo dài, có thể để lại tác dụng phụ, do đó bạn nên khám BS Da liễu để kê toa loại thuốc phù hợp. Ngoài ra, bạn nên chú ý xem có yếu tố nào thường kích thích khởi phát chàm để tránh cho bệnh tái phát bạn nhé! Thân mến.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.7003 | | cosine_accuracy@3 | 0.8262 | | cosine_accuracy@5 | 0.8676 | | cosine_accuracy@10 | 0.9134 | | cosine_precision@1 | 0.7003 | | cosine_precision@3 | 0.2754 | | cosine_precision@5 | 0.1735 | | cosine_precision@10 | 0.0913 | | cosine_recall@1 | 0.7003 | | cosine_recall@3 | 0.8262 | | cosine_recall@5 | 0.8676 | | cosine_recall@10 | 0.9134 | | cosine_ndcg@10 | 0.8068 | | cosine_mrr@10 | 0.7726 | | **cosine_map@100** | **0.7764** | | dot_accuracy@1 | 0.6819 | | dot_accuracy@3 | 0.8154 | | dot_accuracy@5 | 0.8621 | | dot_accuracy@10 | 0.9102 | | dot_precision@1 | 0.6819 | | dot_precision@3 | 0.2718 | | dot_precision@5 | 0.1724 | | dot_precision@10 | 0.091 | | dot_recall@1 | 0.6819 | | dot_recall@3 | 0.8154 | | dot_recall@5 | 0.8621 | | dot_recall@10 | 0.9102 | | dot_ndcg@10 | 0.7954 | | dot_mrr@10 | 0.7587 | | dot_map@100 | 0.7626 | <!-- ## 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 ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: steps - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `learning_rate`: 2e-05 - `num_train_epochs`: 1 - `warmup_ratio`: 0.1 - `fp16`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 4 - `per_device_eval_batch_size`: 4 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 1 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `eval_on_start`: False - `use_liger_kernel`: False - `eval_use_gather_object`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs <details><summary>Click to expand</summary> | Epoch | Step | Training Loss | Validation Loss | cosine_map@100 | |:------:|:-----:|:-------------:|:---------------:|:--------------:| | 0 | 0 | - | - | 0.5553 | | 0.0091 | 100 | 0.6282 | - | - | | 0.0183 | 200 | 0.4527 | - | - | | 0.0274 | 300 | 0.4177 | - | - | | 0.0365 | 400 | 0.4088 | - | - | | 0.0457 | 500 | 0.3093 | - | - | | 0.0548 | 600 | 0.3814 | - | - | | 0.0639 | 700 | 0.3428 | - | - | | 0.0731 | 800 | 0.3295 | - | - | | 0.0822 | 900 | 0.3977 | - | - | | 0.0913 | 1000 | 0.258 | 0.0514 | 0.6996 | | 0.1004 | 1100 | 0.3543 | - | - | | 0.1096 | 1200 | 0.3309 | - | - | | 0.1187 | 1300 | 0.2932 | - | - | | 0.1278 | 1400 | 0.3873 | - | - | | 0.1370 | 1500 | 0.2808 | - | - | | 0.1461 | 1600 | 0.342 | - | - | | 0.1552 | 1700 | 0.2993 | - | - | | 0.1644 | 1800 | 0.226 | - | - | | 0.1735 | 1900 | 0.3545 | - | - | | 0.1826 | 2000 | 0.2887 | 0.0462 | 0.7226 | | 0.1918 | 2100 | 0.2612 | - | - | | 0.2009 | 2200 | 0.2559 | - | - | | 0.2100 | 2300 | 0.196 | - | - | | 0.2192 | 2400 | 0.2857 | - | - | | 0.2283 | 2500 | 0.3215 | - | - | | 0.2374 | 2600 | 0.2601 | - | - | | 0.2466 | 2700 | 0.2874 | - | - | | 0.2557 | 2800 | 0.2423 | - | - | | 0.2648 | 2900 | 0.3145 | - | - | | 0.2739 | 3000 | 0.1669 | 0.0403 | 0.7133 | | 0.2831 | 3100 | 0.2507 | - | - | | 0.2922 | 3200 | 0.2867 | - | - | | 0.3013 | 3300 | 0.2458 | - | - | | 0.3105 | 3400 | 0.2592 | - | - | | 0.3196 | 3500 | 0.1802 | - | - | | 0.3287 | 3600 | 0.2213 | - | - | | 0.3379 | 3700 | 0.2349 | - | - | | 0.3470 | 3800 | 0.2111 | - | - | | 0.3561 | 3900 | 0.2135 | - | - | | 0.3653 | 4000 | 0.2523 | 0.0344 | 0.7347 | | 0.3744 | 4100 | 0.1877 | - | - | | 0.3835 | 4200 | 0.1469 | - | - | | 0.3927 | 4300 | 0.2843 | - | - | | 0.4018 | 4400 | 0.1577 | - | - | | 0.4109 | 4500 | 0.2056 | - | - | | 0.4201 | 4600 | 0.2424 | - | - | | 0.4292 | 4700 | 0.2554 | - | - | | 0.4383 | 4800 | 0.1342 | - | - | | 0.4474 | 4900 | 0.1934 | - | - | | 0.4566 | 5000 | 0.1909 | 0.0304 | 0.7436 | | 0.4657 | 5100 | 0.245 | - | - | | 0.4748 | 5200 | 0.1876 | - | - | | 0.4840 | 5300 | 0.1235 | - | - | | 0.4931 | 5400 | 0.1824 | - | - | | 0.5022 | 5500 | 0.1909 | - | - | | 0.5114 | 5600 | 0.1481 | - | - | | 0.5205 | 5700 | 0.1943 | - | - | | 0.5296 | 5800 | 0.2303 | - | - | | 0.5388 | 5900 | 0.1724 | - | - | | 0.5479 | 6000 | 0.2524 | 0.0294 | 0.7519 | | 0.5570 | 6100 | 0.196 | - | - | | 0.5662 | 6200 | 0.2202 | - | - | | 0.5753 | 6300 | 0.1482 | - | - | | 0.5844 | 6400 | 0.151 | - | - | | 0.5936 | 6500 | 0.1525 | - | - | | 0.6027 | 6600 | 0.1637 | - | - | | 0.6118 | 6700 | 0.1517 | - | - | | 0.6209 | 6800 | 0.134 | - | - | | 0.6301 | 6900 | 0.1924 | - | - | | 0.6392 | 7000 | 0.1174 | 0.0278 | 0.7584 | | 0.6483 | 7100 | 0.1888 | - | - | | 0.6575 | 7200 | 0.1309 | - | - | | 0.6666 | 7300 | 0.2 | - | - | | 0.6757 | 7400 | 0.1652 | - | - | | 0.6849 | 7500 | 0.1599 | - | - | | 0.6940 | 7600 | 0.1289 | - | - | | 0.7031 | 7700 | 0.1533 | - | - | | 0.7123 | 7800 | 0.1765 | - | - | | 0.7214 | 7900 | 0.1403 | - | - | | 0.7305 | 8000 | 0.1288 | 0.0246 | 0.7680 | | 0.7397 | 8100 | 0.1868 | - | - | | 0.7488 | 8200 | 0.1594 | - | - | | 0.7579 | 8300 | 0.2239 | - | - | | 0.7671 | 8400 | 0.175 | - | - | | 0.7762 | 8500 | 0.1437 | - | - | | 0.7853 | 8600 | 0.2118 | - | - | | 0.7944 | 8700 | 0.1631 | - | - | | 0.8036 | 8800 | 0.1228 | - | - | | 0.8127 | 8900 | 0.1362 | - | - | | 0.8218 | 9000 | 0.1135 | 0.0207 | 0.7757 | | 0.8310 | 9100 | 0.196 | - | - | | 0.8401 | 9200 | 0.1598 | - | - | | 0.8492 | 9300 | 0.1214 | - | - | | 0.8584 | 9400 | 0.1826 | - | - | | 0.8675 | 9500 | 0.1273 | - | - | | 0.8766 | 9600 | 0.1006 | - | - | | 0.8858 | 9700 | 0.157 | - | - | | 0.8949 | 9800 | 0.1374 | - | - | | 0.9040 | 9900 | 0.1285 | - | - | | 0.9132 | 10000 | 0.2549 | 0.0211 | 0.7764 | | 0.9223 | 10100 | 0.1642 | - | - | | 0.9314 | 10200 | 0.1402 | - | - | | 0.9406 | 10300 | 0.2119 | - | - | | 0.9497 | 10400 | 0.151 | - | - | | 0.9588 | 10500 | 0.0928 | - | - | | 0.9679 | 10600 | 0.1822 | - | - | | 0.9771 | 10700 | 0.085 | - | - | | 0.9862 | 10800 | 0.1557 | - | - | | 0.9953 | 10900 | 0.1201 | - | - | </details> ### Framework Versions - Python: 3.10.14 - Sentence Transformers: 3.2.1 - Transformers: 4.45.1 - PyTorch: 2.4.0 - Accelerate: 0.34.2 - Datasets: 3.0.1 - Tokenizers: 0.20.0 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
{"base_model": "bkai-foundation-models/vietnamese-bi-encoder", "library_name": "sentence-transformers", "metrics": ["cosine_accuracy@1", "cosine_accuracy@3", "cosine_accuracy@5", "cosine_accuracy@10", "cosine_precision@1", "cosine_precision@3", "cosine_precision@5", "cosine_precision@10", "cosine_recall@1", "cosine_recall@3", "cosine_recall@5", "cosine_recall@10", "cosine_ndcg@10", "cosine_mrr@10", "cosine_map@100", "dot_accuracy@1", "dot_accuracy@3", "dot_accuracy@5", "dot_accuracy@10", "dot_precision@1", "dot_precision@3", "dot_precision@5", "dot_precision@10", "dot_recall@1", "dot_recall@3", "dot_recall@5", "dot_recall@10", "dot_ndcg@10", "dot_mrr@10", "dot_map@100"], "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:43804", "loss:MultipleNegativesRankingLoss"], "widget": [{"source_sentence": "Nhờ bác sĩ cho biết việc lựa chọn đóng đinh nội tủy và nẹp vít để kết hợp xương đòn dựa trên cơ sở nào ạ? Ca phẫu thuật thường kéo dài trong bao lâu? Bệnh nhân nằm viện mấy ngày?", "sentences": [" Chào em, là bệnh mãn tính phải điều trị suốt đời, phải kiên nhẫn và kiên trì nên đôi khi lượng đường trong cơ thể không ổn định. Lúc đi khám xét nghiệm thì ổn do bản thân biết mai đi khám nên sẽ kiêng ăn, ăn ít... còn bệnh lâu dài nên trong ngày đôi khi thèm chút này hay thích ăn chút kia, quên uống thuốc, suy nghĩ, mất ngủ cũng làm đường không ổn định. Đường trong cơ thể lúc lên lúc xuống dễ đưa đến biến chứng. Em hay thấy bệnh nhân tiểu đường tháo khớp ngón chân, ngón tay, đôi khi tháo khớp gối, khớp háng, đây là do tê liệt hệ thần kinh nên khi va chạm bệnh nhân không phát hiện. Đến khi phát hiện thì đã nhiễm trùng nặng phải tháo khớp. Theo BS mẹ em có khả năng do biến chứng tiểu đường vì mẹ em bị bệnh khá lâu nên ít nhiều ảnh hưởng thần kinh bị tê liệt gây đau. Em nên nhớ dặn mẹ đi tái khám và điều trị cho thật ổn định nhé! Thân mến!", " Để lựa chọn phương pháp đóng đinh nội tủy hay nẹp vít cho bệnh nhân cần dựa vào nhiều yếu tố. Trong lòng tủy xương có một cái ống, nếu lòng tủy bệnh nhân nhỏ mà đường gãy không bị gãy thành nhiều mảnh thì nên lựa chọn phương pháp đóng đinh. Phương pháp này có nhược điểm dễ bị lộ phần đinh khi đinh vừa đóng, chưa chắc vào xương. Tuy nhiên, ưu điểm là khi đóng đinh, đường mổ sẽ nhỏ, đơn giản. Đối với nẹp vít, đường mổ dài hơn nhưng phần nắn chỉnh sẽ tuyệt đối, vững chắc hơn. Nhìn chung, giữa 2 phương pháp thời gian mổ không khác biệt nhau nhiều, từ 30-45 phút sẽ hoàn thành cuộc phẫu thuật kết hợp xương. Tại bệnh viện Nhân dân 115, sau khi bệnh nhân được làm phẫu thuật có thể xuất viện rất sớm trong vòng khoảng 3-5 ngày, tùy theo đường mổ lớn hay nhỏ. Giữa việc lựa chọn phẫu thuật hay bảo tồn, đinh nội tủy hay nẹp vít phụ thuộc vào lòng tủy của bệnh nhân và thói quen, sự đánh giá của phẫu thuật viên. Cá nhân tôi thường lựa chọn phương pháp phẫu thuật nẹp vít sẽ cho kết quả nắn chỉnh tốt, chắc hơn và bệnh nhân không bị biến chứng trồi đinh về sau. Thân mến.", "Chào em, Tình trạng người mệt mỏi, khó thở, tim đập nhanh xảy ra khi không gắng sức có thể do nhiều nguyên nhân, gồm tim mạch, hô hấp, thần kinh cơ, tiêu hóa (chủ yếu là ống tiêu hóa trên), tâm lý, bệnh lý nội tiết tố… Viêm dạ dày trào ngược có thể gây các triệu chứng này do dịch acid trào ngược từ dạ dày lên thực quản kích thích thần kinh tim. Mặt khác bệnh dạ dày là bệnh có thể tái phát, điều trị hết bệnh rồi thì bệnh vẫn có thể tái lại. Do đó, nếu em đã khám tim mạch và hô hấp bình thường, để biết có phải mình mệt mỏi do bệnh dạ dày gây ra hay không thì tốt nhất là em khám chuyên khoa nội tiêu hóa và điều trị trào ngược dạ dày thực quản thử, nếu triệu chứng cải thiện nhanh chóng thì chính hắn là nguyên nhân, em nhé."]}, {"source_sentence": "Tôi bị tình trạng nuốt nước miếng có cảm giác bị vướng ở cổ, không đau rát, không ho sốt, ăn uống bình thường đã 1 ngày nay. Chỉ có nuốt nước miếng là có cảm giác vướng thôi, lỗ tai bên trái thì cảm giác ngứa nhẹ. Xin hỏi là bệnh gì vậy ạ?", "sentences": ["Em Lan thân mến, Hiện nay, xét nghiệm được xem là một xét nghiệm\r\nthường quy, nên thai kỳ của em cũng rất cần được làm những xét nghiệm này mặc\r\ndù gia đình em không có bệnh lý bất thường. Tuy nhiên, thai kỳ của em đã qua thời gian làm xét nghiệm Double test, bây\r\ngiờ em phải chờ đến lúc thai được 16 – 18 tuần tuổi, làm xét nghiệm Triple test\r\nem nhé! Chúc em và bé khỏe mạnh!", "Trường hợp thoái hóa cột sống thắt lưng gây đau mỏi liên tục dù đã dùng thuốc giảm đau liều cao Chào em, Thoái hóa khớp, thoái hóa cột sống là tiến trình lão hóa không thể tránh khỏi của con người, đặc biệt có thể xảy ra sớm và nhanh hơn ở người nữ sau mãn kinh, sinh nở nhiều, suy dinh dưỡng hay ăn uống thiếu chất khoáng, lao động vất vả lúc còn trẻ. Trường hợp thoái hóa cột sống thắt lưng gây đau mỏi liên tục dù đã dùng thuốc giảm đau liều cao, đặc biệt là đau lan xuống hai chân, tê yếu hai chân thì cần chụp MRI cột sống để tầm soát thoát vị đĩa đệm chèn ép tủy sống. Trường hợp của em, mới phát hiện thoái hóa cột sống thắt lưng gần đây, cũng mới uống thuốc 1 tuần và không duy trì nữa, việc đau lưng vẫn còn âm ỉ nhưng không lan xuống hai chân thì chưa đến mức cần chụp MRI cột sống thắt lưng. Nhưng mà, em cần tích cực điều trị để bệnh thoái hóa cột sống thắt lưng không tiến triển nặng hơn. Bệnh này trị khỏi hoàn toàn là không thể, vì sinh lão bệnh tử không thể cải hoàn, nhưng mà việc điều trị tích cực sẽ giúp khống chế được bệnh, giảm đau và giảm tốc độ tiến triển của bệnh. Về việc sử dụng thuốc, dù là thuốc Tây hay thuốc Đông y, em cũng cần phải thăm khám bs ck cơ xương khớp (Tây y) hay ck y học cổ truyền (Đông y) để được kê thuốc phù hợp. các thuốc thường dùng là giảm đau, giãn cơ, bổ sung vi khoáng chất (canxi, vitamin D3, magie...). Bên cạnh đó, về phương pháp giảm đau hỗ trợ không dùng thuốc, em nên chú ý: - Chú ý thay đổi tư thế trong quá trình làm việc, không giữ mãi một tư thế trong nhiều giờ liền. Ngồi làm việc đúng tư thế để tránh các bệnh cột sống. - Vận động đúng cách, khi vác vật nặng không vặn cột sống. - Thường xuyên tập thể dục rèn luyện để cột sống vững chắc, cơ thể dẻo dai, bơi cũng được mà yoga là tốt nhất. - Ăn uống khoa học, xây dựng chế độ dinh dưỡng hợp lý, tăng cường nhóm thực phẩm giàu canxi, vitamin D, omega 3… giúp nâng cao độ chắc khỏe của đĩa đệm cũng như xương khớp. - Duy trì cân nặng bình thường, tránh để tăng cân quá mức. - Tư thế ngủ: nằm ngửa trên ván cứng hay nệm bông ép chặt, tránh nệm lò xo hay nệm cao su quá mềm, có thể đệm ở vùng khoeo làm co nhẹ khớp gối và khớp háng, nên nằm đầu thấp không gối sẽ tốt cho cột sống cổ. - Có thể thực hiện điều trị vật lý và các liệu pháp phản xạ: bao gồm phương pháp nhiệt như chườm nóng (túi nước, muối rang, cám rang, lá lốt, lá ngải cứu nóng); dùng các dòng điện tại khoa vật lý trị liệu, điều trị bằng laser; châm cứu, kéo cơ để hỗ trợ giảm đau cơ cạnh sống. Trân trọng!", "Chào bạn, Nuốt vướng ở cổ thường gặp trong một số bệnh lý viêm nhiễm hầu họng như viêm họng, viêm amidan mạn, trào ngược dạ dày thực quản, hội chứng chảy mũi sau… Đây là có thể là triệu chứng đầu tiên báo hiệu một đợt bùng phát cấp tính của viêm nhiễm hô hấp trên do triệu chứng mới chỉ xuất hiện 1 ngày. Bạn nên khám bác sĩ Tai mũi họng để thăm khám trực tiếp, đánh giá và kê toa điều trị bạn nhé! Thân mến."]}, {"source_sentence": "Chào bác sĩ, em bị gãy xương gót, đã đóng đinh đến nay được gần 5 tuần. Vậy 6 tuần em tháo đinh được chưa ạ?", "sentences": [" Chào em, gồm 2 trị số, trị số lớn nhất gọi là huyết áp tâm thu, bình thường < 140 và > 90 mmHg; trị số thấp nhất gọi là huyết áp tâm trương, bình thường < 90 và > 60 mmHg. Huyết áp có thể tăng khi căng thẳng, do lo lắng, do hội chứng áo choàng trắng (khi vào bv, khi gặp bác sĩ thì huyết áp cao), bệnh lý viêm nhiễm, do cafe, khi khó thở... nhìn chung là các stress đối với cơ thể. Như vậy, huyết áp ghi nhận ở những lúc cơ thể đang lo lắng, bồn chồn, có bệnh thì sẽ không phản ánh chính xác được huyết áp dao động bình thường của người bệnh. Do vậy em nên khám chuyên khoa tim mạch, bác sĩ sẽ thăm khám và làm xét nghiệm kiểm tra xem em có các dấu chứng của tăng huyết áp hay không (như dày thành tim, tiểu đạm, đo huyết áp 24 giờ...) để xác định em có tăng huyết áp hay không và điều trị thích hợp. Những triệu chứng hoa mắt, chóng mặt, đau đầu, đau 1 bên mắt, tiểu nhiều có thể là do bệnh tăng huyết áp gây ra (ảnh hưởng lên mạch máu não, lên thận...) hoặc là 1 bệnh lý khác như thiếu máu, rối loạn tiền đình, viêm nhiễm hệ thống, viêm mũi xoang, bệnh lý mạch máu não... (và tăng huyết áp chỉ là phản ứng của cơ thể khi có stress). Để tìm ra bệnh và giải quyết nỗi lo về bệnh, em nên đến bệnh viện để kiểm tra sức khỏe em nhé. Thân mến! ", " Chào em, Thời điểm 6 tuần là quá sớm để rút đinh cố định xương gót (trừ trường hợp khung cố định xương bên ngoài). Tháo đinh vít kim loại chỉ bắt buộc thực hiện sớm trong những trường hợp bất thường như gãy vít, nhiễm trùng, khớp giả... gây ra các triệu chứng bất thường với bệnh nhân mà thôi. Em nên tái khám tại chuyên khoa Chấn thương Chỉnh hình để bác sĩ kiểm tra lại việc lành xương của em tốt chưa và dặn em lịch trình rút đinh phù hợp, em nhé. Thân mến.", "K dạ dày không điều trị tiên lượng sống khá ngắn Chào em, K dạ dày là ung thư dạ dày. Bệnh ung thư dạ dày là bệnh lý ác tính và có chỉ định phẫu thuật cắt khối u – cắt dạ dày khi còn có thể cắt được. Nếu đã phát hiện ung thư dạ dày mà không điều trị phẫu thuật thì thời gian sống của bệnh nhân trung bình là 6 tháng đến 1 năm tùy loại ung thư dạ dày, khi ung thư tiến triển di căn có thể gây nhiều đau đớn hơn. Hiện tại chị em đang bị suy nhược cơ thể nhiều, không ăn uống được, đau nhiều do ung thư dạ dày là có chỉ định vào bệnh viện nằm điều trị luôn rồi, chứ không thể nào lấy thuốc mà không tới phòng khám được đâu. Vô bệnh viện chị em sẽ được truyền dịch, chích thuốc, nâng thể trạng lên rồi mới tính đến chuyện điều trị khối ung thư kia. Em đưa chị em đến bệnh viện càng sớm càng tốt, tốt nhất là bệnh viện Ung bướu, em nhé."]}, {"source_sentence": "Thưa bác sĩ,\r\n\r\nEm bị đục thủy tinh thể do chấn thương và vừa mổ mắt về và em cũng bị cận thị. Thời gian khoảng 1 tuần em thấy mắt mình nhìn chỉ rõ hơn được 1 phần nào. Nhìn xa thì vẫn thấy nhưng vẫn mờ mờ. Bác sĩ cho em lời khuyên nên làm cách nào và mắt em có thể sáng lại như bình thường được không ạ?\r\n\r\nEm xin chân thành cảm ơn! (Minh Tiến - Bình Định)", "sentences": ["Bạn Minh Tiến thân mến, Hiện nay phẫu thuật đục thủy tinh thể đã được y học nói chung và ngành Nhãn khoa Việt Nam thực hiện hoàn chỉnh đến mức tuyệt vời. Phẫu thuật này được xem như một cuộc cách mạng rất đáng tự hào của ngành nhãn khoa. Hàng ngày có thể tới hàng ngàn ca phẫu thuật đem lại ánh sáng cho người mù lòa đục thể thủy tinh tại Việt Nam. Nói như vậy để giúp cho bạn hiểu rõ phẫu thuật này các bác sĩ Việt Nam thực hiện rất thường xuyên và rất tốt. Tuy nhiên, với mắt đục thủy tinh thể do chấn thương của bạn là ca phẫu thuật tương đối không đơn giản. Thêm vào đó ngoài đục thủy tinh thể do chấn thương, mắt bạn cũng có thể kèm theo tổn thương ở các bộ phận khác của mắt mà trước mổ bác sĩ khó có thể chẩn đoán được. Với hai lý do nêu trên, nên đôi khi mắt mổ khó có thể tốt theo ý muốn của cả bệnh nhân lẫn thầy thuốc. Bạn cần có thời gian theo dõi và điều trị tiếp sau mổ. Sau thời gian ổn định khoảng 1 tháng, bạn cần đo thử kính xem có cải thiện thị lực thêm không? Chúc bạn may mắn!", "Chào em, Bình thường các hạch trong cơ thể không sưng to lên đến mức có thể sờ chạm hay nhận biết được. Vì thế, hạch sưng lên, hay thường gọi là nổi hạch, là một triệu chứng bất thường của cơ thể. Cho nên, em lo lắng là đúng khi phát hiện hạch ở vùng cổ. Hạch bạch huyết đóng vai trò quan trọng đối với hoạt động của hệ miễn dịch. Chúng chứa các tế bào miễn dịch như lympho bào, đại thực bào... có chức năng miễn dịch chống lại các yếu tố lạ như vi khuẩn, virus, kí sinh trùng... xâm nhập vào cơ thể. Trong quá trình đó các hạch có thể bị viêm và sưng lên. Một số trường hợp hạch sưng có thể là hạch ung thư hoặc di căn. Đặc điểm của hạch viêm là nhỏ, số lượng ít, bờ tròn đều, không phát triển theo thời gian, không xâm lấn da xung quanh. Thông thường đối với hạch viêm thì nguồn viêm có thể tấn công tại hạch, cũng có khi là hạch viêm phản ứng với ổ viêm nhiễm cạnh đó, điều trị hết viêm thì hạch sẽ lặn dần, có thể lặn chậm hơn vài tuần đến vài tháng, có một số loại hạch cũng là hạch viêm nhưng mà chỉ giảm kích thước rồi cứ \"lì\" vậy luôn - không lặn hẳn nhưng không còn sưng như trước và vẫn giữ hình ảnh của hạch viêm, cũng có loại hạch viêm sau lại chuyển sang xơ chai hóa như sẹo cũ và không lặn. Như vậy, em có 1 hạch vùng cổ đã được xác định là hạch viêm thông qua sinh thiết hạch cách đây 10 năm. Trong vòng 10 năm nay, hạch cổ đó không có triệu chứng bất thường. Gần đây, hạch cổ đó có biểu hiện viêm trở lại, mặc dù em uống thuốc (tự mua) thì hạch hết sưng đau, nhưng em cũng cần khám lại bên chuyên khoa ung bướu để kiểm tra tổng quát lại 1 lần, tìm nguyên nhân gây kích thích hạch viêm này tái hoạt động, xem là nguyên nhân lành tính hay tiềm ẩn nguyên nhân khác (vì lần kiểm tra trước đã cách đây 10 năm rồi), em nhé.", " Chào em, Trường hợp em mô tả là những bất thường của hệ hô hấp có thể là bệnh lý tai mũi họng hay hô hấp dưới như viêm phổi, viêm phế quản, em cần đến các cơ sở y tế chuyên sâu tai mũi họng hay hô hấp để khám thêm. Những biểu hiện đó hoàn toàn không có cơ sở nghĩ . Thân mến!"]}, {"source_sentence": "Bác sĩ cho em hỏi, em bị rạn nứt xương gót chân bên phải. Em bị hơn 1 tháng nay rồi. Em bỏ thuốc lá. Em muốn hỏi bác sĩ thông thường bó bột hơn hay thuốc lá hơn? Như của em khoảng bao lâu thì khỏi? Và giờ em vẫn chưa đi được bác sĩ ạ. Em cảm ơn.", "sentences": ["Câu hỏi của em rất chân thành. Tự ý thức quyết tâm cai nghiệm là điều đáng quý. Nếu em tiếp tục sử dụng thì tình trạng sẽ tồi tệ hơn rất nhiều. Ba yếu tố quan trọng nhất và tiến hành đồng thời để cai nghiện thành công, đó là: 1. Ý chí 2. Sự hiểu biết thấu đáo 3. Môi trường thân thiện. Các Trung tâm cai nghiện sẽ giúp em phần 2 và phần 3, từ đó sẽ củng cố phần 1 của em. Trường hợp ở nhà mà em tự cai, thực hành mỗi ngày với 3 điều kiện trên, em sẽ thành công như nhiều bạn khác. Không nên nôn nóng, sốt ruột. Trước tiên em phải thuộc lòng và thực hành những quy tắc này thành thói quen và áp dụng suốt đời. Nhiều trường hợp cai được vài năm vẫn tái nghiện. Do đó, nên tránh xa những \"nguồn\" khiến em tái nghiện, tránh xa bạn bè nghiện ngập em nhé. Chúc em quyết tâm và đem lại niềm vui cho bố mẹ.", "Chào em, Thứ nhất, bắt buộc phải có phim Xquang để biết em có thực sự nứt xương gót hay bị gãy phức tạp hơn, vì nhiều trường hợp tưởng chỉ nứt xương thôi nhưng thật ra là vỡ phức tạp, phải phẫu thuật mới nhanh ổn được. Thứ hai, theo nguyên tắc điều trị nứt gãy xương là phải cố định tốt để can xương mọc ra, chỗ nứt gãy mới được nối liền. Do đó, nếu bó bột thì chân sẽ được cố định liên tục trong 4-6 tuần, còn bó lá thì phải thay thường xuyên, mỗi lần thay là 1 lần xê dịch nên xương khó lành. Tốt hơn hết em nên đến Bệnh viện Chấn thương Chỉnh hình để được kiểm tra và điều trị thích hợp, em nhé. Thân mến.", "Chào bạn, Qua hình ảnh sang thương và mô tả triệu chứng, bệnh lý của bạn có khả năng là chàm hay còn gọi là viêm da dị ứng với đặc điểm là viêm và nổi mụn nhỏ, ngứa ngáy. Nguyên nhân của chàm hiện nay chưa rõ nhưng có thể do cơ địa dị ứng (người mắc hen, viêm mũi dị ứng có nguy cơ cao mắc chàm), do kích thích của hóa chất như nước rửa chén, bột giặt, cao su, kim loại, chất liệu giày dép (chàm tiếp xúc),... Thời tiết lạnh, stress, đổ mồ hôi nhiều và phấn hoa... cũng là những nguyên nhân có thể khiến da bị chàm. Chàm cũng có thể gặp ở người bị suy van tĩnh mạch, giãn tĩnh mạch chân khiến tình trạng bệnh dai dẳng, kém đáp ứng điều trị. Điều trị chàm thường phải sử dụng một số loại thuốc bôi da kéo dài, có thể để lại tác dụng phụ, do đó bạn nên khám BS Da liễu để kê toa loại thuốc phù hợp. Ngoài ra, bạn nên chú ý xem có yếu tố nào thường kích thích khởi phát chàm để tránh cho bệnh tái phát bạn nhé! Thân mến."]}], "model-index": [{"name": "SentenceTransformer based on bkai-foundation-models/vietnamese-bi-encoder", "results": [{"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "Unknown", "type": "unknown"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.7003287070854638, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8261504747991234, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8676040905770636, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9134404674945216, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.7003287070854638, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2753834915997078, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.1735208181154127, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09134404674945214, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.7003287070854638, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8261504747991234, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8676040905770636, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9134404674945216, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.8067566615526722, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.7726399903764786, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.7764065721123147, "name": "Cosine Map@100"}, {"type": "dot_accuracy@1", "value": 0.6818845872899927, "name": "Dot Accuracy@1"}, {"type": "dot_accuracy@3", "value": 0.8153761869978087, "name": "Dot Accuracy@3"}, {"type": "dot_accuracy@5", "value": 0.8621256391526662, "name": "Dot Accuracy@5"}, {"type": "dot_accuracy@10", "value": 0.9101533966398831, "name": "Dot Accuracy@10"}, {"type": "dot_precision@1", "value": 0.6818845872899927, "name": "Dot Precision@1"}, {"type": "dot_precision@3", "value": 0.2717920623326029, "name": "Dot Precision@3"}, {"type": "dot_precision@5", "value": 0.1724251278305332, "name": "Dot Precision@5"}, {"type": "dot_precision@10", "value": 0.09101533966398831, "name": "Dot Precision@10"}, {"type": "dot_recall@1", "value": 0.6818845872899927, "name": "Dot Recall@1"}, {"type": "dot_recall@3", "value": 0.8153761869978087, "name": "Dot Recall@3"}, {"type": "dot_recall@5", "value": 0.8621256391526662, "name": "Dot Recall@5"}, {"type": "dot_recall@10", "value": 0.9101533966398831, "name": "Dot Recall@10"}, {"type": "dot_ndcg@10", "value": 0.7954203289199318, "name": "Dot Ndcg@10"}, {"type": "dot_mrr@10", "value": 0.758727115146035, "name": "Dot Mrr@10"}, {"type": "dot_map@100", "value": 0.7625999642800587, "name": "Dot Map@100"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,518
BookingCare/multilingual-e5-base-v3.1
BookingCare
sentence-similarity
[ "sentence-transformers", "safetensors", "xlm-roberta", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:80448", "loss:MultipleNegativesRankingLoss", "arxiv:1908.10084", "arxiv:1705.00652", "base_model:BookingCare/multilingual-e5-base-v2", "base_model:finetune:BookingCare/multilingual-e5-base-v2", "model-index", "autotrain_compatible", "text-embeddings-inference", "endpoints_compatible", "region:us" ]
2024-10-16T00:46:49Z
2024-10-16T00:47:24+00:00
9
0
--- base_model: BookingCare/multilingual-e5-base-v2 library_name: sentence-transformers metrics: - cosine_accuracy@1 - cosine_accuracy@3 - cosine_accuracy@5 - cosine_accuracy@10 - cosine_precision@1 - cosine_precision@3 - cosine_precision@5 - cosine_precision@10 - cosine_recall@1 - cosine_recall@3 - cosine_recall@5 - cosine_recall@10 - cosine_ndcg@10 - cosine_mrr@10 - cosine_map@100 - dot_accuracy@1 - dot_accuracy@3 - dot_accuracy@5 - dot_accuracy@10 - dot_precision@1 - dot_precision@3 - dot_precision@5 - dot_precision@10 - dot_recall@1 - dot_recall@3 - dot_recall@5 - dot_recall@10 - dot_ndcg@10 - dot_mrr@10 - dot_map@100 pipeline_tag: sentence-similarity tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:80448 - loss:MultipleNegativesRankingLoss widget: - source_sentence: Chấn thương phần mềm nghiêm trọng sentences: - ' Theo Đông y, bạc thau có tính mát, vị đắng, hơi cay và chua. Cây có tác dụng điều kinh, lợi tiểu, thanh nhiệt, cầm máu, thư cân hoạt lạc, tiêu đờm, nhuận phế, chỉ khái. Vậy Trong dân gian Việt Nam, thường được dùng để làm thuốc chữa kinh nguyệt không đều rong kinh , bí tiểu tiện, rát buốt, tiểu ít, màu nước tiểu đục. Ngoài ra, dùng trong điều trị lở ngứa, mụn nhọt, sát khuẩn, giải độc, viêm phế quản và sốt rét cũng rất hiệu quả. Người ta thường dùng tươi, giã nát ra đắp lên những nơi bị gãy xương hoặc đắp lên mụn nhọt cho hút mủ lên da non. Bên cạnh đó, người ta hay dùng bạc thau phơi khô để chữa ho đặc biệt là cho trẻ em. cây bạc thau chữa bệnh gì? bạc thau kinh nguyệt không đều , rong kinh bạc thau viêm phế quản gãy xương Ở Quảng Tây (Trung Quốc), bạc sau được dùng bằng cách lấy toàn cây để trị ho, nhức mỏi chân tay, viêm thận thuỷ thũng hay dùng ngoài trị độc do giang mai.' - '1.1. Định nghĩa Các bác sĩ cho biết những chấn thương phần mềm được gọi là nghiêm trọng khi: Vết thương phần mềm làm lộ gân, xương khớp, thần kinh và/hoặc mạch máu; Vết thương mất đoạn gân hoặc xương. 1.2. Hậu quả Tình trạng này nếu không được điều trị đúng cách sẽ có nguy cơ dẫn đến di chứng: Nhiễm trùng; – gân ,mạch máu, thần kinh,cơ... Hoại tử xương Biến dạng, co rút cơ quan vận động; Cứng khớp; Làm mất chức năng vận động của chi thể, ảnh hưởng lớn đến cuộc sống của người bệnh. 1.3. Điều trị Các biện pháp phù hợp thường được áp dụng đối với dạng chấn thương này là: Khâu da che phủ thì đầu (vết thương đơn giản không bị căng kéo); Ghép da tự thân; Xoay vạt da tại chỗ; có cuống mạch liền Chuyển vạt da rời có cuống mạnh rời (nối vi phẫu mạch máu). Chuyển vạt da Theo khuyến cáo của bác sĩ, quyết định khâu da thì đầu hay để hở hoặc chuyển vạt cơ che phủ các chấn thương là rất quan trọng. Điều này phụ thuộc rất nhiều vào trình độ chuyên môn của phẫu thuật viên.Đánh giá vết thương và xử lý vết thương theo thang tạo hình từ thấp tới cao tương ứng với độ phức tạp của vết thương.' - ' (CPP – Cerebral Perfusion Pressure) có mối liên quan mật thiết với . Áp lực tưới máu não được định nghĩa là hiệu số giữa áp lực động mạch trung bình (Mean Arterial Pressure - MAP) và áp lực nội sọ (ICP). Điều đó có nghĩa là: CPP = MAP - ICP. Áp lực động mạch trung bình là áp lực trung bình ở động mạch cảnh. MAP = (áp lực thì tâm thu + 2 áp lực thì tâm trương)/3. ở người bình thường là trên 50mmHg. Áp lực tưới máu não nên duy trì ở mức 70 - 80mmHg và áp lực nội sọ ở mức dưới 15mmHg. Áp lực tưới máu não áp lực nội sọ Áp lực tưới máu não Tình trạng tăng dẫn đến quá trình giảm áp lực tưới máu não và lưu lượng máu não, là nguyên nhân chính gây tử vong đối với các bệnh nhân bị chấn thương sọ não. Bởi vậy, việc duy trì áp lực tưới máu não ở một giá trị thích hợp trong thời gian nhanh nhất chính là một trong những yếu tố then chốt của hoạt động chăm sóc đặc biệt cho người bệnh, tránh hoại tử não ở bệnh nhân bị tăng , đặc biệt với người bị thường gặp trong tai nạn giao thông. áp lực nội sọ áp lực nội sọ chấn thương sọ não Theo dõi mức và cho phép đánh giá chính xác những thay đổi áp lực và lưu lượng máu trong não, phục vụ tốt nhất cho quá trình chẩn đoán và điều trị ở các bệnh nhân bị chấn thương sọ não nặng , hôn mê,... áp lực nội sọ áp lực tưới máu não chấn thương sọ não nặng Video đề xuất: Khám sức khỏe định kỳ tại Vinmec: Bảo vệ bạn trước khi quá muộn! XEM THÊM: Chức năng của dịch não tủy Chức năng của dịch não tủy Điều trị ở bệnh nhân tụ máu não do chấn thương sọ não Điều trị ở bệnh nhân tụ máu não do chấn thương sọ não Chấn thương sọ não: Nhận biết và điều trị thế nào? Chấn thương sọ não: Nhận biết và điều trị thế nào? Thần kinh Điều chỉnh áp lực tưới máu não Chấn thương sọ não Điều chỉnh áp lực trong sọ Áp lực tưới máu não Dịch não tủy' - source_sentence: Định nghĩa về tình trạng hiếm muộn sentences: - ' Những người sau điều trị ung thư có thể gặp các vấn đề về sức khỏe răng miệng, tùy thuộc vào các phương pháp điều trị mà họ nhận được: Hóa trị có thể ảnh hưởng đến men răng và làm tăng nguy cơ mắc các vấn đề răng miệng lâu dài. Liệu pháp xạ trị liều cao đến vùng đầu và cổ có thể làm thay đổi sự phát triển của răng. Nó cũng có thể gây ra bệnh nướu răng và sản xuất nước bọt thấp hơn, gây khô miệng. Thuốc steroid có thể làm tăng nguy cơ mắc các vấn đề về mắt như bong tróc mắt ảnh hưởng đến thị lực (đục thủy tinh thể). Để theo dõi các vấn đề này trong tương lai, người bệnh nên sắp xếp các cuộc hẹn thường xuyên với nha sĩ và bác sĩ nhãn khoa.' - ' Vắc xin phòng cúm : Khá nhiều cha mẹ băn khoăn liệu trẻ có cần vắc xin phòng cúm hay không, thì câu trả lời là có. Biến chứng của cúm ở trẻ dưới 5 tuổi thường nghiêm trọng, do đó để bảo vệ sức khỏe cho trẻ, cha mẹ nên đưa đi tiêm phòng cúm. Lịch tiêm cụ thể cha mẹ cần tham vấn với bác sĩ. Cha mẹ cần lưu ý virus cúm mỗi năm lại biến đổi, do đó trẻ cần được tiêm phòng hàng năm. Vắc xin phòng cúm Ngoài chế độ dinh dưỡng, trẻ 8 tháng cần 5mg kẽm nguyên tố/ngày để trẻ ăn ngon, đạt chiều cao và cân nặng đúng chuẩn và vượt chuẩn. Kẽm đóng vai trò tác động đến hầu hết các quá trình sinh học diễn ra trong cơ thể, đặc biệt là quá trình phân giải tổng hợp axit nucleic, protein... Các cơ quan trong cơ thể khi thiếu kẽm có thể dẫn đến một số bệnh lý như rối loạn thần kinh, dễ sinh cáu gắt,... Vì vậy cha mẹ cần tìm hiểu về Vai trò của kẽm và hướng dẫn bổ sung kẽm hợp lý cho bé . Vai trò của kẽm và hướng dẫn bổ sung kẽm hợp lý cho bé Ngoài kẽm, cha mẹ cũng cần bổ sung cho trẻ các vitamin và khoáng chất quan trọng khác như lysine, crom, vitamin nhóm B,... giúp con ăn ngon, có hệ miễn dịch tốt, tăng cường đề kháng để ít ốm vặt. Hãy thường xuyên truy cập website Vinmec.com và cập nhật những thông tin hữu ích để chăm sóc cho bé và cả gia đình nhé. Vinmec.com Bài viết tham khảo nguồn: mayoclinic.org và whattoexpect.com Thực Phẩm bảo vệ sức khỏe LAMINKID I: Sản phẩm có công dụng bổ sung vi khoáng và vitamin cho cơ thể. Hỗ trợ tiêu hóa, tăng cường hấp thu thức ăn, giúp trẻ ăn ngon. Hỗ trợ nâng cao đề kháng cho trẻ, hỗ trợ giảm nguy cơ mắc bệnh do sức đề kháng kém như viêm đường hô hấp trên, cảm cúm. Đối tượng sử dụng: - Trẻ biếng ăn, kém hấp thu thức ăn, trẻ gầy yếu, suy dinh dưỡng, chậm phát triển. - Trẻ có sức đề kháng kém, đang ốm hoặc vừa ốm dậy, trẻ hay mắc các bệnh viêm đường hô hấp trên, cảm cúm. Chịu trách nhiệm về chất lượng sản phẩm: Công ty Cổ phần dược phẩm Elepharma Số 9, phố Trương Công Giai, tổ 17, Phường Dịch Vọng, Quận Cầu Giấy, Thành phố Hà Nội, Việt Nam (ĐT) 1800 6091; (E) [email protected] https://i.vinmec.com/laminkid Xem thêm thông tin về sản phẩm tại: https://i.vinmec.com/dangkytuvandinhduong Đăng ký tư vấn dinh dưỡng cho bé tại: nhi khoa Trẻ 8 tháng tuổi Vận động của trẻ LaminKid Trẻ mọc răng Dinh dưỡng của trẻ Nhận thức của trẻ Giấc ngủ của trẻ' - ' Hiếm muộn hiện đang là một gánh nặng của ngành y tế Việt Nam, ảnh hưởng đến khoảng 15-20% các cặp vợ chồng ở độ tuổi sinh sản. Theo tổ chức Y tế thế giới (WHO) quy định: hiếm muộn là bệnh lý của cơ quan sinh sản, một cặp vợ chồng được gọi là hiếm muộn khi không có khả năng có thai sau một năm chung sống trở lên, giao hợp đều đặn và không sử dụng nào. Với các cặp vợ chồng có người vợ trên 35 tuổi thì thời gian quy định là 6 tháng. Vì vậy, khi người vợ trên 35 tuổi, sau 6 tháng mong con nhưng vẫn không thể có thai được nên được khám và điều trị sớm. Tuy nhiên đối với những trường hợp, nguyên nhân hiếm muộn tương đối rõ ràng thì việc tính thời gian không còn được đặt ra. Hiếm muộn biện pháp tránh thai' - source_sentence: Chơi trò chơi đố chữ sentences: - ' Việc dạy trẻ nói sẽ trở nên hấp dẫn hơn nhiều khi nó được thực hiện thông qua một trò chơi. Trẻ ở lứa tuổi mới biết đi sẽ thích một trò chơi có tên "Đây là gì?" Khi đưa trẻ đến một môi trường mới - quán cà phê, sân bay hoặc chợ - hãy chỉ vào một thứ gì đó và hỏi trẻ, "Đây là gì?" Thách thức trẻ tìm ra tên chính xác. Để giúp trẻ không nản lòng, hãy bắt đầu với một vài đồ vật - một con mèo, một cái bánh quy – mà bố mẹ chắc chắn rằng trẻ đã biết. Sau đó, thỉnh thoảng lại lén nói một từ mới. Nếu trẻ không biết, hãy thì thầm câu trả lời và để trẻ hét lên. Sau đó, giới thiệu cho trẻ biết đồ vật đó là gì và nó hoạt động như thế nào. Ví dụ "Đó là một chiếc ô. Chúng ta sử dụng ô để khi trời mưa để không bị ướt." dạy trẻ nói Những đứa trẻ ở độ tuổi lớn hơn sẽ đánh giá cao một trò chơi phức tạp hơn một chút có tên "Điều gì xảy ra tiếp theo?" Bắt đầu kể cho trẻ nghe một câu chuyện, và ngay khi cốt truyện bắt đầu đi lên cao trào, hãy yêu cầu trẻ kể cho bố mẹ nghe kết thúc của nó. Nếu trẻ không đủ vốn từ để tự mình trình bày cụ thể, bố mẹ có thể giúp con bằng cách đặt một số câu hỏi gợi ý như "Con có nghĩ con chó sói bỏ chạy không?" Một khi bố mẹ đã gợi ý một hướng cốt truyện, bố mẹ có thể hỏi trẻ để biết thêm suy nghĩ của chúng một cách chi tiết hơn như "Con nghĩ chú chó đã đi đâu?" hoặc "Ai đã đi cùng trẻ?"' - ' 3.1 Tầm soát cho đối tượng hội chứng Lynch, có 02 nhóm Người có thân nhân thế hệ một (cha mẹ, anh em) đã bị ung thư đại-trực tràng trước tuổi 45. Các đối tượng này dễ bị ung thư gấp 10 lần người thường, Người có hơn 2 người thân thế hệ một bị bất kỳ ung thư nào. Các đối tượng này dễ bị ung thư gấp 6 lần người thường. Vì hay xảy ra từ tuổi 50 vì thế nên tầm soát ở độ tuổi này chúng ta có thể giảm tỷ lệ 50% ung thư và kéo dài thời gian sống hơn 12 tháng. Test nên dùng cho các đối tượng này là nội soi đại tràng. Nếu trong gia đình có người rất trẻ, dưới 40 tuổi bị ung thư, nên tầm soát những người trong gia đình sớm hơn 10 năm và nên thực hiện kiểm tra nội soi đại tràng mỗi 5 năm. ung thư đại - trực tràng 3.1.1 Ung thư đại tràng không do polyp (Hereditary non-polyposis colon cancer: HNPCC) Loại ung thư này (hình 9) hay xảy ra trong gia đình và gây bệnh ở người trẻ, trước tuổi 45. Ngoài nội soi đại tràng cho những người thân trong gia đình mỗi 5 năm tính từ tuổi người mắc bệnh, cần thử DNA để so sánh với DNA của người thân đã bị ung thư trước đó. Các đối tượng trong gia đình này cần nội soi đại tràng, nội soi dạ dày, chụp nhũ ảnh, siêu âm vùng chậu và thử tế bào tử cung vì ngoài họ có thể bị ung thư dạ dày, ung thư vú, tử cung và buồng trứng. ung thư đại tràng Đa polyp trong gia đình (Familial Adenomatous Polyposis: FAP) Loại bệnh này ít gặp hơn loại không do polyp nhưng sẽ diễn tiến thành ung thư đại tràng khi trên 50 tuổi, vì thế cần tầm soát tất cả người thân của bệnh nhân đã mắc bệnh này bắt đầu từ 10 tuổi, nội soi đại tràng chậu hông hoặc nội soi toàn bộ đại tràng. Nếu có bệnh FAP (hình 10), nên cân nhắc quyết định cắt toàn bộ đại tràng để phòng ngừa polyp hóa ác. ung thư đại tràng Theo dõi sau cắt polyp ác tính: Những polyp đại trực tràng lớn hơn 1cm, không cuống, nghịch sản có nguy cơ hóa ác cao. Sau cắt polyp qua nội soi, cần theo dõi và nội soi kiểm tra định kỳ như sau: Mỗi 01 tháng trong 03 tháng đầu, trong năm thứ nhất. Mỗi 03 tháng trong 06 tháng kế tiếp, trong năm thứ nhất. Mỗi 06 tháng trong năm thứ hai. Mỗi năm, từ năm thứ 03 đến năm thứ 05. Những tổn thương polyp ác tính, lịch nội soi kiểm tra tương tự như lịch theo dõi những ung thư đại trực tràng đã được phẫu thuật như: Xét nghiệm máu tìm chỉ điểm ung thư (CEA) 06 tháng sau mổ, trong 05 năm. Nội soi đại tràng kiểm tra 06 tháng sau mổ, trong năm thứ nhất. Nội soi đại tràng kiểm tra 01 năm sau mổ, trong năm thứ hai. Nội soi đại tràng kiểm tra 03 năm sau mổ, trong năm thứ ba về sau. Theo dõi các bệnh viêm đại tràng Các bệnh viêm đại tràng gồm viêm loét đại tràng (hình 11) và bệnh Crohn gây phản ứng viêm trên hơn một nửa đại tràng và khiến bệnh nhân dễ bị ung thư gấp 10 lần người bình thường. viêm đại tràng viêm loét đại tràng Crohn Các tác giả khuyến cáo nếu viêm đại tràng trên 8 năm thì hàng năm nên nội soi đại tràng. Mục tiêu chính là phát hiện tổn thương tiền ung thư. Nếu có dị sản nặng do ít nhất 2 chuyên gia giải phẫu bệnh xác nhận thì nên cắt toàn bộ đại tràng để ngừa ung thư.' - 'Nếu ngã theo cơ thế chống tay hay sưng nề nhiều vùng cổ bàn tay nghi ngờ gãy xương thuyền cần đến các cơ sở y tế chuyên khoa để chẩn đoán kịp thời. được chẩn đoán bằng hỏi bệnh sử, khám thực thể, chụp Xquang cổ bàn tay. Trong một vài trường hợp thì phim Xquang chụp ngay sau chấn thương có vẻ bình thường và việc chẩn đoán có thể bị chậm sau 2-3 tuần chỗ gãy mới rõ trên Xquang. Cả chụp CT và MRI có thể có giá trị để đánh giá những điểm khác nhau của gãy xương thuyền. Chẩn đoán và điều trị sớm là quan trọng để có kết quả tối ưu. Gãy xương thuyền Những triệu chứng của gãy xương thuyền là: đau, sưng, ấn đau vùng cổ tay, không có biến dạng rõ ràng vì thế mà gãy xương thuyền có thể nhầm lẫn với bong gân cổ tay nên bác sĩ phải hỏi bệnh sử tỉ mỉ về cơ chế gãy chấn thương và cần phải khám lâm sàng thích hợp.' - source_sentence: Thiếu vi chất dinh dưỡng ảnh hưởng đến trẻ như thế nào? sentences: - '3.1 Thiếu vitamin A có vai trò quan trọng đối với trẻ nhỏ, giúp trẻ phát triển bình thường, tăng cường khả năng miễn dịch và bảo vệ giác mạc, da, niêm mạc. Đặc biệt, vitamin A còn có tác dụng phòng ngừa các bệnh nhiễm trùng như tiêu chảy, đường hô hấp, khô giác mạc và mù lòa. Nếu thiếu vitamin A trẻ sẽ dễ gặp các bệnh về mắt và tăng nguy cơ nhiễm trùng. Vitamin A thiếu vitamin A 3.2 Thiếu canxi và vitamin D Thiếu vitamin D là nguyên nhân chính gây ra bệnh còi xương ở trẻ em , bởi vì thiếu vitamin D làm giảm hấp thụ canxi ở ruột, cơ thể sẽ huy động lượng canxi ở trong xương đi vào máu gây ra rối loạn quá trình khoáng hóa xương. Trẻ sẽ có những biểu hiện như quấy khóc, nôn trớ, ra mồ hôi trộm, rụng tóc, đầu to, thóp rộng, răng mọc chậm, chậm biết đi, biến dạng xương, lồng ngực dô,... Từ đó, làm giảm chiều cao của trẻ. Thiếu vitamin D ảnh hưởng đến hệ miễn dịch, sức đề kháng của trẻ. Trẻ dễ mắc các bệnh lý như viêm đường hô hấp trên, hay tái phát. Thiếu vitamin D bệnh còi xương ở trẻ em 3.3 Thiếu sắt Sắt là một trong những thành phần của huyết sắc tố, tham gia vào quá trình vận chuyển oxy và hô hấp tế bào. Thiếu sắt dẫn tới thiếu máu và các bệnh viêm đường hô hấp, các bệnh nhiễm khuẩn ở trẻ. Thiếu sắt làm cho trẻ bị thiếu các dưỡng chất ảnh hưởng đến tăng trưởng và phát triển của cơ thể. Sắt 3.4 Thiếu iot Khi cơ thể trẻ thiếu i-ốt, tuyến giáp phát triển lớn và gây bệnh bướu cổ . Bên cạnh đó, trẻ thiếu i-ốt còn làm tăng nguy cơ chậm phát triển trí tuệ, chậm lớn, thiểu năng và đần độn. bệnh bướu cổ 3.5 Thiếu kẽm Kẽm là một trong những vi chất có vai trò quan trọng trong quá trình tăng trưởng và miễn dịch. Trẻ bị thiếu kẽm sẽ chậm lớn và giảm sức đề kháng, suy dinh dưỡng và chậm phát triển chiều cao. biếng ăn , Tóm lại, vi chất dinh dưỡng là những chất chỉ chiếm một lượng nhỏ trong cơ thể nhưng đóng vai trò rất quan trọng trong tăng trưởng, duy trì và nâng cao sức khỏe, phát triển trí tuệ,... Thiếu vi chất là tình trạng thường gặp ở trẻ nhỏ ảnh hưởng đến sự phát triển của trẻ. Do vậy, khi trẻ có những biểu hiện thiếu vi chất dinh dưỡng thì cha mẹ hãy đưa trẻ đến ngay cơ sở y tế để được kiểm tra. Ngoài ra cha mẹ cũng nên cho trẻ khám định kỳ nhằm phát hiện sớm tình trạng thiếu vi chất ở trẻ. Thiếu vi chất dinh dưỡng LaminKid Suy dinh dưỡng Vi chất dinh dưỡng Chậm phát triển chiều cao Chậm phát triển trí tuệ' - ' Bất kỳ ai bị tiểu đường đều có nguy cơ cao mắc hôn mê do tiểu đường, tuy nhiên những yếu tố dưới đây được xem là các nguy cơ hàng đầu dẫn đến tình trạng này, bao gồm: Nếu bạn đang sử dụng máy bơm insulin, bạn cần phải kiểm tra thường xuyên lượng đường trong máu của mình. Việc cung cấp insulin có thể dừng lại nếu máy bơm bị lỗi hoặc ống thông bị xoắn hay rơi ra khỏi vị trí. Khi bị thiếu hụt insulin có thể dẫn đến tình trạng nhiễm toan ceton do tiểu đường. Vấn đề về cung cấp insulin: Khi cơ thể bị ốm hoặc gặp phải chấn thương sẽ khiến cho lượng đường trong máu của bạn có xu hướng tăng cao đột ngột. Điều này có thể gây ra nhiễm toan ceton do tiểu đường nếu bạn bị bệnh tiểu đường loại 1 và không tăng liều insulin để bù đắp cho lượng bị thiếu hụt. Một số tình trạng sức khoẻ khác, chẳng hạn như bệnh thận hoặc suy tim sung huyết , cũng có thể làm tăng nguy cơ mắc hội chứng tăng áp lực thẩm thấu bệnh tiểu đường (hyperosmolar). Bệnh tật, chấn thương hoặc phẫu thuật: suy tim sung huyết Nếu bạn không theo dõi thường xuyên lượng đường trong máu hoặc dùng thuốc không theo chỉ dẫn của bác sĩ, bạn sẽ có nguy cơ cao mắc các biến chứng tiểu đường lâu dài, thậm chí là hôn mê do tiểu đường. Bệnh tiểu đường không được kiểm soát tốt: Đôi khi những người mắc bệnh tiểu đường cũng có thể gặp phải chứng rối loạn ăn uống chọn không sử dụng insulin theo chỉ dẫn với mong muốn có thể giảm cân. Đây là một hành động khá nguy hiểm, đe dọa đến tính mạng và làm tăng nguy cơ hôn mê do tiểu đường. Cố ý bỏ bữa hoặc không dùng insulin: rối loạn ăn uống Rượu là một trong những yếu tố có thể tác động khó lượng đến lượng đường trong máu của bạn. Tác dụng an thần của rượu có thể khiến bạn khó nhận biết được khi nào mình đang gặp phải các triệu chứng của hạ đường huyết. Điều này cũng sẽ làm tăng nguy cơ hôn mê do tiểu đường. Uống nhiều rượu: Một số loại thuốc bị cấm sử dụng, chẳng hạn như cocaine hoặc thuốc lắc, có thể làm tăng nguy cơ lượng đường trong máu cao ở mức nghiêm trọng và các tình trạng khác liên quan đến hôn mê do tiểu đường. Sử dụng các loại thuốc bất hợp pháp: cocaine' - ' Việc lạm dụng hoặc sử dụng không đúng các sản phẩm giải độc gan có thể để lại một số tác dụng không mong muốn, khiến cho tình trạng bệnh lý ở gan nặng hơn cũng như gây ra các tác dụng phụ toàn thân, nặng hơn có thể dẫn đến suy gan , đe dọa tính mạng. Do đó, không nên tự ý sử dụng các loại thuốc hoặc thực phẩm chức năng giải độc gan nếu không có hướng dẫn, chỉ định của bác sĩ. suy gan Một số bệnh nhân mắc các bệnh lý gan mật tự ý dùng các thuốc giải độc gan đơn thuần với hy vọng điều trị được bệnh. Đây là quan điểm sai lầm bởi vì gan bị nhiễm độc là do nhiều nguyên nhân khác nhau. Điều quan trọng là phải tìm được nguyên nhân mới hy vọng điều trị bệnh hiệu quả. Thực tế là các thuốc giải độc gan chỉ hỗ trợ điều trị tổn thương gan chứ không tác dụng trực tiếp đến nguyên nhân bệnh. Do đó, các sản phẩm giải độc gan không thể thay thế điều trị y khoa. Phương pháp dân gian giải độc gan được truyền miệng từ xa xưa không phải đều phù hợp với tất cả bệnh nhân. Tác dụng và hiệu quả còn tùy thuộc vào cơ địa từng người, bệnh cảnh cụ thể, cũng như liều lượng, cách dùng, cách bảo quản,... Việc sử dụng tùy tiện các loại cây thuốc nam không những không mang lại hiệu quả điều trị mà còn có thể ảnh hưởng đến sức khỏe người bệnh. Một số người bệnh nghiện rượu bia tỏ ra chủ quan khi dùng thuốc giải độc gan vì cho rằng mỗi khi đã sử dụng thuốc giải độc gan thì có thể uống bao nhiêu bia, rượu cũng được. Điều này hoàn toàn sai lầm vì thuốc giải độc gan không thể hỗ trợ điều trị khi nguyên nhân không được giải quyết. nghiện rượu' - source_sentence: Có cách nào để cải thiện môi trường làm việc độc hại không? sentences: - ' Chấn thương đầu, cổ, tủy sống rất nguy hiểm vì có thể gây mất vận động (liệt), hôn mê và tử vong. Chấn thương tủy sống là nguyên nhân tổn thương thần kinh và gây ra khó thở . hôn mê Chấn thương tủy sống khó thở Người bệnh bị chấn thương đầu, cổ, tủy sống cần được vận chuyển hết sức thận trọng. Bởi bất cứ vận động nào không phù hợp cũng có thể làm chấn thương nặng thêm như liệt tay hoặc chân. Nếu người bệnh không tỉnh, cần thực hiện hỗ trợ sự sống cơ bản.' - ' Quá trình mang thai bị tê tay chân là hiện tượng phổ biến thường gặp. Nếu ở mức độ nhẹ thì bệnh chỉ gây ảnh hưởng đến sinh hoạt hằng ngày. Nhưng nếu như tình trạng tê tay chân diễn ra liên tục và kèm theo các chứng chóng mặt , khó nhấc tay chân, co cơ,... cần nghĩ đến dấu hiệu của một bệnh lý khác. chóng mặt Lúc này, bạn cần tới các cơ sở y tế uy tín gần nhất để được thăm khám chuyên sâu và có hướng điều trị phù hợp.' - ' Tương tự như chất độc trong không khí, có thể gây hại cho sức khỏe tinh thần và thể chất của người lao động. Nếu bạn tiếp tục làm việc quá lâu, nó có thể dẫn đến mức độ căng thẳng cao, lòng tự trọng bị tụt giảm và bệnh lý trầm cảm. môi trường làm việc độc hại Nếu sự vấn đề đến từ lãnh đạo hoặc tư duy của công ty, bạn sẽ không thể làm được gì nhiều để cải thiện, tuy nhiên nếu vấn đề chỉ đến từ 1 hoặc 2 người, bạn có thể thảo luận với người quản lý đáng tin cậy hoặc nói chuyện với bộ phận nhân sự (HR). Sau đó, công ty có thể thuê trợ giúp từ bên ngoài như thông qua chương trình hỗ trợ nhân viên (EAP) để giúp giải quyết vấn đề. Nếu không có sự lựa chọn nào ngoài việc ở lại lúc này, hãy thử đặt mình vào một vỏ bọc nhỏ, cố gắng tránh mọi thị phi và giữ an tĩnh cho riêng mình. Tập trung vào các mục tiêu bên ngoài công việc và bắt đầu lập kế hoạch để thoát ra ngoài.' model-index: - name: SentenceTransformer based on BookingCare/multilingual-e5-base-v2 results: - task: type: information-retrieval name: Information Retrieval dataset: name: healthcare dev type: healthcare-dev metrics: - type: cosine_accuracy@1 value: 0.8482587064676617 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.9266169154228856 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.9465174129353234 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.9639303482587065 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.8482587064676617 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.3088723051409619 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.18930348258706467 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.09639303482587065 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.8482587064676617 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.9266169154228856 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.9465174129353234 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.9639303482587065 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.9103935171059057 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.8927939666745639 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.8943003609860257 name: Cosine Map@100 - type: dot_accuracy@1 value: 0.8482587064676617 name: Dot Accuracy@1 - type: dot_accuracy@3 value: 0.9266169154228856 name: Dot Accuracy@3 - type: dot_accuracy@5 value: 0.9465174129353234 name: Dot Accuracy@5 - type: dot_accuracy@10 value: 0.9639303482587065 name: Dot Accuracy@10 - type: dot_precision@1 value: 0.8482587064676617 name: Dot Precision@1 - type: dot_precision@3 value: 0.3088723051409619 name: Dot Precision@3 - type: dot_precision@5 value: 0.18930348258706467 name: Dot Precision@5 - type: dot_precision@10 value: 0.09639303482587065 name: Dot Precision@10 - type: dot_recall@1 value: 0.8482587064676617 name: Dot Recall@1 - type: dot_recall@3 value: 0.9266169154228856 name: Dot Recall@3 - type: dot_recall@5 value: 0.9465174129353234 name: Dot Recall@5 - type: dot_recall@10 value: 0.9639303482587065 name: Dot Recall@10 - type: dot_ndcg@10 value: 0.9103935171059057 name: Dot Ndcg@10 - type: dot_mrr@10 value: 0.8927939666745639 name: Dot Mrr@10 - type: dot_map@100 value: 0.8943003609860257 name: Dot Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: healthcare test type: healthcare-test metrics: - type: cosine_accuracy@1 value: 0.6713868285007867 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.8208586199145875 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.8650258485052821 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.8996403686221622 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.6713868285007867 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.2736195399715291 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.17300516970105642 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.08996403686221624 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.6713868285007867 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.8208586199145875 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.8650258485052821 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.8996403686221622 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.7891859267149058 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.7533213277818758 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.7563423273488229 name: Cosine Map@100 - type: dot_accuracy@1 value: 0.6713868285007867 name: Dot Accuracy@1 - type: dot_accuracy@3 value: 0.8208586199145875 name: Dot Accuracy@3 - type: dot_accuracy@5 value: 0.8650258485052821 name: Dot Accuracy@5 - type: dot_accuracy@10 value: 0.8996403686221622 name: Dot Accuracy@10 - type: dot_precision@1 value: 0.6713868285007867 name: Dot Precision@1 - type: dot_precision@3 value: 0.2736195399715291 name: Dot Precision@3 - type: dot_precision@5 value: 0.17300516970105642 name: Dot Precision@5 - type: dot_precision@10 value: 0.08996403686221624 name: Dot Precision@10 - type: dot_recall@1 value: 0.6713868285007867 name: Dot Recall@1 - type: dot_recall@3 value: 0.8208586199145875 name: Dot Recall@3 - type: dot_recall@5 value: 0.8650258485052821 name: Dot Recall@5 - type: dot_recall@10 value: 0.8996403686221622 name: Dot Recall@10 - type: dot_ndcg@10 value: 0.7891859267149058 name: Dot Ndcg@10 - type: dot_mrr@10 value: 0.7533213277818758 name: Dot Mrr@10 - type: dot_map@100 value: 0.7563423273488229 name: Dot Map@100 --- # SentenceTransformer based on BookingCare/multilingual-e5-base-v2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BookingCare/multilingual-e5-base-v2](https://huggingface.co/BookingCare/multilingual-e5-base-v2). It maps sentences & paragraphs to a 768-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:** [BookingCare/multilingual-e5-base-v2](https://huggingface.co/BookingCare/multilingual-e5-base-v2) <!-- at revision 2123c87e34210130089526ab28cbb04929aefd66 --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 tokens - **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': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("BookingCare/multilingual-base-e5-v3.1") # Run inference sentences = [ 'Có cách nào để cải thiện môi trường làm việc độc hại không?', ' Tương tự như chất độc trong không khí,\ncó thể gây hại cho sức khỏe tinh thần và thể chất của người lao động. Nếu bạn tiếp tục làm việc quá lâu, nó có thể dẫn đến mức độ căng thẳng cao, lòng tự trọng bị tụt giảm và bệnh lý trầm cảm. môi trường làm việc độc hại Nếu sự vấn đề đến từ lãnh đạo hoặc tư duy của công ty, bạn sẽ không thể làm được gì nhiều để cải thiện, tuy nhiên nếu vấn đề chỉ đến từ 1 hoặc 2 người, bạn có thể thảo luận với người quản lý đáng tin cậy hoặc nói chuyện với bộ phận nhân sự (HR). Sau đó, công ty có thể thuê trợ giúp từ bên ngoài như thông qua chương trình hỗ trợ nhân viên (EAP) để giúp giải quyết vấn đề. Nếu không có sự lựa chọn nào ngoài việc ở lại lúc này, hãy thử đặt mình vào một vỏ bọc nhỏ, cố gắng tránh mọi thị phi và giữ an tĩnh cho riêng mình. Tập trung vào các mục tiêu bên ngoài công việc và bắt đầu lập kế hoạch để thoát ra ngoài.', ' Chấn thương đầu, cổ, tủy sống rất nguy hiểm vì có thể gây mất vận động (liệt),\nhôn mê\nvà tử vong.\nChấn thương tủy sống\nlà nguyên nhân tổn thương thần kinh và gây ra\nkhó thở\n. hôn mê Chấn thương tủy sống khó thở Người bệnh bị chấn thương đầu, cổ, tủy sống cần được vận chuyển hết sức thận trọng. Bởi bất cứ vận động nào không phù hợp cũng có thể làm chấn thương nặng thêm như liệt tay hoặc chân. Nếu người bệnh không tỉnh, cần thực hiện hỗ trợ sự sống cơ bản.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Dataset: `healthcare-dev` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.8483 | | cosine_accuracy@3 | 0.9266 | | cosine_accuracy@5 | 0.9465 | | cosine_accuracy@10 | 0.9639 | | cosine_precision@1 | 0.8483 | | cosine_precision@3 | 0.3089 | | cosine_precision@5 | 0.1893 | | cosine_precision@10 | 0.0964 | | cosine_recall@1 | 0.8483 | | cosine_recall@3 | 0.9266 | | cosine_recall@5 | 0.9465 | | cosine_recall@10 | 0.9639 | | cosine_ndcg@10 | 0.9104 | | cosine_mrr@10 | 0.8928 | | **cosine_map@100** | **0.8943** | | dot_accuracy@1 | 0.8483 | | dot_accuracy@3 | 0.9266 | | dot_accuracy@5 | 0.9465 | | dot_accuracy@10 | 0.9639 | | dot_precision@1 | 0.8483 | | dot_precision@3 | 0.3089 | | dot_precision@5 | 0.1893 | | dot_precision@10 | 0.0964 | | dot_recall@1 | 0.8483 | | dot_recall@3 | 0.9266 | | dot_recall@5 | 0.9465 | | dot_recall@10 | 0.9639 | | dot_ndcg@10 | 0.9104 | | dot_mrr@10 | 0.8928 | | dot_map@100 | 0.8943 | #### Information Retrieval * Dataset: `healthcare-test` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.6714 | | cosine_accuracy@3 | 0.8209 | | cosine_accuracy@5 | 0.865 | | cosine_accuracy@10 | 0.8996 | | cosine_precision@1 | 0.6714 | | cosine_precision@3 | 0.2736 | | cosine_precision@5 | 0.173 | | cosine_precision@10 | 0.09 | | cosine_recall@1 | 0.6714 | | cosine_recall@3 | 0.8209 | | cosine_recall@5 | 0.865 | | cosine_recall@10 | 0.8996 | | cosine_ndcg@10 | 0.7892 | | cosine_mrr@10 | 0.7533 | | **cosine_map@100** | **0.7563** | | dot_accuracy@1 | 0.6714 | | dot_accuracy@3 | 0.8209 | | dot_accuracy@5 | 0.865 | | dot_accuracy@10 | 0.8996 | | dot_precision@1 | 0.6714 | | dot_precision@3 | 0.2736 | | dot_precision@5 | 0.173 | | dot_precision@10 | 0.09 | | dot_recall@1 | 0.6714 | | dot_recall@3 | 0.8209 | | dot_recall@5 | 0.865 | | dot_recall@10 | 0.8996 | | dot_ndcg@10 | 0.7892 | | dot_mrr@10 | 0.7533 | | dot_map@100 | 0.7563 | <!-- ## 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 ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: steps - `per_device_train_batch_size`: 5 - `per_device_eval_batch_size`: 6 - `learning_rate`: 2e-05 - `num_train_epochs`: 2 - `warmup_ratio`: 0.1 - `fp16`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 5 - `per_device_eval_batch_size`: 6 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 2 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs <details><summary>Click to expand</summary> | Epoch | Step | Training Loss | Validation Loss | healthcare-dev_cosine_map@100 | healthcare-test_cosine_map@100 | |:------:|:-----:|:-------------:|:---------------:|:-----------------------------:|:------------------------------:| | 0 | 0 | - | - | 0.8140 | 0.6266 | | 0.0126 | 100 | 0.1461 | 0.1289 | 0.8342 | - | | 0.0251 | 200 | 0.1063 | 0.1130 | 0.8448 | - | | 0.0377 | 300 | 0.1015 | 0.1008 | 0.8536 | - | | 0.0502 | 400 | 0.086 | 0.0937 | 0.8586 | - | | 0.0628 | 500 | 0.0824 | 0.0895 | 0.8654 | - | | 0.0753 | 600 | 0.1008 | 0.0872 | 0.8669 | - | | 0.0879 | 700 | 0.0755 | 0.0930 | 0.8658 | - | | 0.1004 | 800 | 0.0968 | 0.0923 | 0.8683 | - | | 0.1130 | 900 | 0.1011 | 0.0889 | 0.8677 | - | | 0.1255 | 1000 | 0.0943 | 0.0805 | 0.8706 | - | | 0.1381 | 1100 | 0.0668 | 0.0782 | 0.8660 | - | | 0.1507 | 1200 | 0.0746 | 0.0814 | 0.8738 | - | | 0.1632 | 1300 | 0.0825 | 0.0768 | 0.8728 | - | | 0.1758 | 1400 | 0.0851 | 0.0860 | 0.8660 | - | | 0.1883 | 1500 | 0.1029 | 0.0736 | 0.8752 | - | | 0.2009 | 1600 | 0.071 | 0.0805 | 0.8760 | - | | 0.2134 | 1700 | 0.081 | 0.0717 | 0.8731 | - | | 0.2260 | 1800 | 0.0767 | 0.0698 | 0.8744 | - | | 0.2385 | 1900 | 0.0895 | 0.0795 | 0.8705 | - | | 0.2511 | 2000 | 0.0666 | 0.0740 | 0.8701 | - | | 0.2637 | 2100 | 0.0791 | 0.0702 | 0.8733 | - | | 0.2762 | 2200 | 0.0779 | 0.0797 | 0.8767 | - | | 0.2888 | 2300 | 0.0812 | 0.0739 | 0.8790 | - | | 0.3013 | 2400 | 0.0492 | 0.0754 | 0.8798 | - | | 0.3139 | 2500 | 0.0442 | 0.0850 | 0.8722 | - | | 0.3264 | 2600 | 0.0652 | 0.0901 | 0.8717 | - | | 0.3390 | 2700 | 0.0579 | 0.0865 | 0.8733 | - | | 0.3515 | 2800 | 0.0543 | 0.0945 | 0.8742 | - | | 0.3641 | 2900 | 0.0639 | 0.0950 | 0.8678 | - | | 0.3766 | 3000 | 0.0587 | 0.0824 | 0.8775 | - | | 0.3892 | 3100 | 0.078 | 0.0864 | 0.8675 | - | | 0.4018 | 3200 | 0.091 | 0.0686 | 0.8763 | - | | 0.4143 | 3300 | 0.0763 | 0.0780 | 0.8734 | - | | 0.4269 | 3400 | 0.0552 | 0.0842 | 0.8668 | - | | 0.4394 | 3500 | 0.0549 | 0.0748 | 0.8748 | - | | 0.4520 | 3600 | 0.0642 | 0.0755 | 0.8790 | - | | 0.4645 | 3700 | 0.0796 | 0.0815 | 0.8650 | - | | 0.4771 | 3800 | 0.0949 | 0.0755 | 0.8642 | - | | 0.4896 | 3900 | 0.0783 | 0.0691 | 0.8698 | - | | 0.5022 | 4000 | 0.0534 | 0.0655 | 0.8822 | - | | 0.5148 | 4100 | 0.0453 | 0.0709 | 0.8742 | - | | 0.5273 | 4200 | 0.0498 | 0.0612 | 0.8838 | - | | 0.5399 | 4300 | 0.0903 | 0.0619 | 0.8795 | - | | 0.5524 | 4400 | 0.0667 | 0.0712 | 0.8825 | - | | 0.5650 | 4500 | 0.0364 | 0.0962 | 0.8722 | - | | 0.5775 | 4600 | 0.0502 | 0.0706 | 0.8790 | - | | 0.5901 | 4700 | 0.0685 | 0.0672 | 0.8788 | - | | 0.6026 | 4800 | 0.0675 | 0.0695 | 0.8768 | - | | 0.6152 | 4900 | 0.083 | 0.0680 | 0.8787 | - | | 0.6277 | 5000 | 0.0598 | 0.0715 | 0.8769 | - | | 0.6403 | 5100 | 0.0548 | 0.0710 | 0.8744 | - | | 0.6529 | 5200 | 0.0682 | 0.0679 | 0.8855 | - | | 0.6654 | 5300 | 0.0378 | 0.0779 | 0.8809 | - | | 0.6780 | 5400 | 0.0274 | 0.0711 | 0.8864 | - | | 0.6905 | 5500 | 0.0635 | 0.0699 | 0.8842 | - | | 0.7031 | 5600 | 0.0681 | 0.0563 | 0.8867 | - | | 0.7156 | 5700 | 0.0389 | 0.0595 | 0.8806 | - | | 0.7282 | 5800 | 0.0419 | 0.0586 | 0.8796 | - | | 0.7407 | 5900 | 0.0306 | 0.0520 | 0.8837 | - | | 0.7533 | 6000 | 0.0418 | 0.0622 | 0.8759 | - | | 0.7659 | 6100 | 0.0459 | 0.0691 | 0.8770 | - | | 0.7784 | 6200 | 0.0616 | 0.0679 | 0.8818 | - | | 0.7910 | 6300 | 0.0541 | 0.0658 | 0.8888 | - | | 0.8035 | 6400 | 0.0742 | 0.0767 | 0.8890 | - | | 0.8161 | 6500 | 0.0531 | 0.0675 | 0.8904 | - | | 0.8286 | 6600 | 0.0513 | 0.0720 | 0.8909 | - | | 0.8412 | 6700 | 0.0505 | 0.0722 | 0.8897 | - | | 0.8537 | 6800 | 0.0451 | 0.0705 | 0.8895 | - | | 0.8663 | 6900 | 0.0456 | 0.0704 | 0.8892 | - | | 0.8788 | 7000 | 0.0506 | 0.0668 | 0.8901 | - | | 0.8914 | 7100 | 0.0424 | 0.0556 | 0.8903 | - | | 0.9040 | 7200 | 0.036 | 0.0602 | 0.8890 | - | | 0.9165 | 7300 | 0.0545 | 0.0656 | 0.8886 | - | | 0.9291 | 7400 | 0.0604 | 0.0695 | 0.8863 | - | | 0.9416 | 7500 | 0.0362 | 0.0617 | 0.8909 | - | | 0.9542 | 7600 | 0.0442 | 0.0666 | 0.8932 | - | | 0.9667 | 7700 | 0.0398 | 0.0648 | 0.8886 | - | | 0.9793 | 7800 | 0.0471 | 0.0654 | 0.8921 | - | | 0.9918 | 7900 | 0.0716 | 0.0615 | 0.8933 | - | | 1.0044 | 8000 | 0.0306 | 0.0735 | 0.8929 | - | | 1.0169 | 8100 | 0.0601 | 0.0708 | 0.8927 | - | | 1.0295 | 8200 | 0.041 | 0.0672 | 0.8939 | - | | 1.0421 | 8300 | 0.0311 | 0.0693 | 0.8956 | - | | 1.0546 | 8400 | 0.0508 | 0.0700 | 0.8984 | - | | 1.0672 | 8500 | 0.0414 | 0.0640 | 0.8933 | - | | 1.0797 | 8600 | 0.0451 | 0.0606 | 0.8943 | - | | 1.0923 | 8700 | 0.0347 | 0.0668 | 0.8898 | - | | 1.1048 | 8800 | 0.0413 | 0.0663 | 0.8965 | - | | 1.1174 | 8900 | 0.0369 | 0.0641 | 0.8964 | - | | 1.1299 | 9000 | 0.0252 | 0.0543 | 0.8925 | - | | 1.1425 | 9100 | 0.0221 | 0.0529 | 0.8879 | - | | 1.1551 | 9200 | 0.0306 | 0.0568 | 0.8951 | - | | 1.1676 | 9300 | 0.0378 | 0.0616 | 0.8954 | - | | 1.1802 | 9400 | 0.0338 | 0.0592 | 0.8913 | - | | 1.1927 | 9500 | 0.0207 | 0.0565 | 0.8992 | - | | 1.2053 | 9600 | 0.0259 | 0.0600 | 0.8962 | - | | 1.2178 | 9700 | 0.0079 | 0.0655 | 0.8950 | - | | 1.2304 | 9800 | 0.022 | 0.0660 | 0.8959 | - | | 1.2429 | 9900 | 0.0296 | 0.0657 | 0.8960 | - | | 1.2555 | 10000 | 0.0263 | 0.0667 | 0.8916 | - | | 1.2680 | 10100 | 0.0184 | 0.0590 | 0.8951 | - | | 1.2806 | 10200 | 0.0254 | 0.0587 | 0.8926 | - | | 1.2932 | 10300 | 0.0213 | 0.0627 | 0.8896 | - | | 1.3057 | 10400 | 0.0141 | 0.0655 | 0.8905 | - | | 1.3183 | 10500 | 0.0077 | 0.0702 | 0.8910 | - | | 1.3308 | 10600 | 0.0159 | 0.0700 | 0.8921 | - | | 1.3434 | 10700 | 0.015 | 0.0674 | 0.8908 | - | | 1.3559 | 10800 | 0.018 | 0.0698 | 0.8955 | - | | 1.3685 | 10900 | 0.0156 | 0.0677 | 0.8908 | - | | 1.3810 | 11000 | 0.0219 | 0.0666 | 0.8952 | - | | 1.3936 | 11100 | 0.015 | 0.0640 | 0.8941 | - | | 1.4062 | 11200 | 0.0231 | 0.0634 | 0.8916 | - | | 1.4187 | 11300 | 0.0172 | 0.0679 | 0.8940 | - | | 1.4313 | 11400 | 0.0228 | 0.0636 | 0.8925 | - | | 1.4438 | 11500 | 0.0199 | 0.0655 | 0.8935 | - | | 1.4564 | 11600 | 0.025 | 0.0687 | 0.8961 | - | | 1.4689 | 11700 | 0.0277 | 0.0679 | 0.8922 | - | | 1.4815 | 11800 | 0.0227 | 0.0672 | 0.8912 | - | | 1.4940 | 11900 | 0.0222 | 0.0679 | 0.8914 | - | | 1.5066 | 12000 | 0.0138 | 0.0656 | 0.8929 | - | | 1.5191 | 12100 | 0.0107 | 0.0663 | 0.8916 | - | | 1.5317 | 12200 | 0.0137 | 0.0580 | 0.8927 | - | | 1.5443 | 12300 | 0.0311 | 0.0578 | 0.8948 | - | | 1.5568 | 12400 | 0.0198 | 0.0621 | 0.8953 | - | | 1.5694 | 12500 | 0.0084 | 0.0638 | 0.8950 | - | | 1.5819 | 12600 | 0.0166 | 0.0600 | 0.8959 | - | | 1.5945 | 12700 | 0.0251 | 0.0599 | 0.8928 | - | | 1.6070 | 12800 | 0.0154 | 0.0624 | 0.8973 | - | | 1.6196 | 12900 | 0.0301 | 0.0629 | 0.8937 | - | | 1.6321 | 13000 | 0.0198 | 0.0616 | 0.8937 | - | | 1.6447 | 13100 | 0.0146 | 0.0601 | 0.8914 | - | | 1.6573 | 13200 | 0.0128 | 0.0610 | 0.8945 | - | | 1.6698 | 13300 | 0.0092 | 0.0606 | 0.8920 | - | | 1.6824 | 13400 | 0.0121 | 0.0595 | 0.8954 | - | | 1.6949 | 13500 | 0.0183 | 0.0577 | 0.8918 | - | | 1.7075 | 13600 | 0.0245 | 0.0572 | 0.8944 | - | | 1.7200 | 13700 | 0.0166 | 0.0592 | 0.8931 | - | | 1.7326 | 13800 | 0.0059 | 0.0593 | 0.8929 | - | | 1.7451 | 13900 | 0.0087 | 0.0581 | 0.8918 | - | | 1.7577 | 14000 | 0.0252 | 0.0595 | 0.8924 | - | | 1.7702 | 14100 | 0.0165 | 0.0585 | 0.8976 | - | | 1.7828 | 14200 | 0.022 | 0.0595 | 0.8976 | - | | 1.7954 | 14300 | 0.0143 | 0.0602 | 0.8967 | - | | 1.8079 | 14400 | 0.0328 | 0.0608 | 0.8974 | - | | 1.8205 | 14500 | 0.0228 | 0.0597 | 0.8983 | - | | 1.8330 | 14600 | 0.009 | 0.0594 | 0.8979 | - | | 1.8456 | 14700 | 0.0188 | 0.0593 | 0.8952 | - | | 1.8581 | 14800 | 0.0157 | 0.0583 | 0.8962 | - | | 1.8707 | 14900 | 0.0116 | 0.0571 | 0.8969 | - | | 1.8832 | 15000 | 0.0183 | 0.0559 | 0.8989 | - | | 1.8958 | 15100 | 0.0118 | 0.0554 | 0.8972 | - | | 1.9083 | 15200 | 0.0192 | 0.0559 | 0.8970 | - | | 1.9209 | 15300 | 0.0109 | 0.0566 | 0.8957 | - | | 1.9335 | 15400 | 0.0145 | 0.0566 | 0.8975 | - | | 1.9460 | 15500 | 0.0131 | 0.0573 | 0.8965 | - | | 1.9586 | 15600 | 0.0104 | 0.0575 | 0.8969 | - | | 1.9711 | 15700 | 0.0185 | 0.0581 | 0.8961 | - | | 1.9837 | 15800 | 0.0131 | 0.0579 | 0.8943 | - | | 1.9962 | 15900 | 0.032 | 0.0576 | 0.8943 | - | | 2.0 | 15930 | - | - | - | 0.7563 | </details> ### Framework Versions - Python: 3.10.13 - Sentence Transformers: 3.2.0 - Transformers: 4.41.2 - PyTorch: 2.1.2 - Accelerate: 0.30.1 - Datasets: 2.19.2 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
null
BioNLP
# SentenceTransformer based on BookingCare/multilingual-e5-base-v2 This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BookingCare/multilingual-e5-base-v2](https://huggingface.co/BookingCare/multilingual-e5-base-v2). It maps sentences & paragraphs to a 768-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:** [BookingCare/multilingual-e5-base-v2](https://huggingface.co/BookingCare/multilingual-e5-base-v2) <!-- at revision 2123c87e34210130089526ab28cbb04929aefd66 --> - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 tokens - **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': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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): Normalize() ) ``` ## Usage ### Direct Usage (Sentence Transformers) First install the Sentence Transformers library: ```bash pip install -U sentence-transformers ``` Then you can load this model and run inference. ```python from sentence_transformers import SentenceTransformer # Download from the 🤗 Hub model = SentenceTransformer("BookingCare/multilingual-base-e5-v3.1") # Run inference sentences = [ 'Có cách nào để cải thiện môi trường làm việc độc hại không?', ' Tương tự như chất độc trong không khí,\ncó thể gây hại cho sức khỏe tinh thần và thể chất của người lao động. Nếu bạn tiếp tục làm việc quá lâu, nó có thể dẫn đến mức độ căng thẳng cao, lòng tự trọng bị tụt giảm và bệnh lý trầm cảm. môi trường làm việc độc hại Nếu sự vấn đề đến từ lãnh đạo hoặc tư duy của công ty, bạn sẽ không thể làm được gì nhiều để cải thiện, tuy nhiên nếu vấn đề chỉ đến từ 1 hoặc 2 người, bạn có thể thảo luận với người quản lý đáng tin cậy hoặc nói chuyện với bộ phận nhân sự (HR). Sau đó, công ty có thể thuê trợ giúp từ bên ngoài như thông qua chương trình hỗ trợ nhân viên (EAP) để giúp giải quyết vấn đề. Nếu không có sự lựa chọn nào ngoài việc ở lại lúc này, hãy thử đặt mình vào một vỏ bọc nhỏ, cố gắng tránh mọi thị phi và giữ an tĩnh cho riêng mình. Tập trung vào các mục tiêu bên ngoài công việc và bắt đầu lập kế hoạch để thoát ra ngoài.', ' Chấn thương đầu, cổ, tủy sống rất nguy hiểm vì có thể gây mất vận động (liệt),\nhôn mê\nvà tử vong.\nChấn thương tủy sống\nlà nguyên nhân tổn thương thần kinh và gây ra\nkhó thở\n. hôn mê Chấn thương tủy sống khó thở Người bệnh bị chấn thương đầu, cổ, tủy sống cần được vận chuyển hết sức thận trọng. Bởi bất cứ vận động nào không phù hợp cũng có thể làm chấn thương nặng thêm như liệt tay hoặc chân. Nếu người bệnh không tỉnh, cần thực hiện hỗ trợ sự sống cơ bản.', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] ``` <!-- ### 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.* --> ## Evaluation ### Metrics #### Information Retrieval * Dataset: `healthcare-dev` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.8483 | | cosine_accuracy@3 | 0.9266 | | cosine_accuracy@5 | 0.9465 | | cosine_accuracy@10 | 0.9639 | | cosine_precision@1 | 0.8483 | | cosine_precision@3 | 0.3089 | | cosine_precision@5 | 0.1893 | | cosine_precision@10 | 0.0964 | | cosine_recall@1 | 0.8483 | | cosine_recall@3 | 0.9266 | | cosine_recall@5 | 0.9465 | | cosine_recall@10 | 0.9639 | | cosine_ndcg@10 | 0.9104 | | cosine_mrr@10 | 0.8928 | | **cosine_map@100** | **0.8943** | | dot_accuracy@1 | 0.8483 | | dot_accuracy@3 | 0.9266 | | dot_accuracy@5 | 0.9465 | | dot_accuracy@10 | 0.9639 | | dot_precision@1 | 0.8483 | | dot_precision@3 | 0.3089 | | dot_precision@5 | 0.1893 | | dot_precision@10 | 0.0964 | | dot_recall@1 | 0.8483 | | dot_recall@3 | 0.9266 | | dot_recall@5 | 0.9465 | | dot_recall@10 | 0.9639 | | dot_ndcg@10 | 0.9104 | | dot_mrr@10 | 0.8928 | | dot_map@100 | 0.8943 | #### Information Retrieval * Dataset: `healthcare-test` * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.6714 | | cosine_accuracy@3 | 0.8209 | | cosine_accuracy@5 | 0.865 | | cosine_accuracy@10 | 0.8996 | | cosine_precision@1 | 0.6714 | | cosine_precision@3 | 0.2736 | | cosine_precision@5 | 0.173 | | cosine_precision@10 | 0.09 | | cosine_recall@1 | 0.6714 | | cosine_recall@3 | 0.8209 | | cosine_recall@5 | 0.865 | | cosine_recall@10 | 0.8996 | | cosine_ndcg@10 | 0.7892 | | cosine_mrr@10 | 0.7533 | | **cosine_map@100** | **0.7563** | | dot_accuracy@1 | 0.6714 | | dot_accuracy@3 | 0.8209 | | dot_accuracy@5 | 0.865 | | dot_accuracy@10 | 0.8996 | | dot_precision@1 | 0.6714 | | dot_precision@3 | 0.2736 | | dot_precision@5 | 0.173 | | dot_precision@10 | 0.09 | | dot_recall@1 | 0.6714 | | dot_recall@3 | 0.8209 | | dot_recall@5 | 0.865 | | dot_recall@10 | 0.8996 | | dot_ndcg@10 | 0.7892 | | dot_mrr@10 | 0.7533 | | dot_map@100 | 0.7563 | <!-- ## 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 ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: steps - `per_device_train_batch_size`: 5 - `per_device_eval_batch_size`: 6 - `learning_rate`: 2e-05 - `num_train_epochs`: 2 - `warmup_ratio`: 0.1 - `fp16`: True - `batch_sampler`: no_duplicates #### All Hyperparameters <details><summary>Click to expand</summary> - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: steps - `prediction_loss_only`: True - `per_device_train_batch_size`: 5 - `per_device_eval_batch_size`: 6 - `per_gpu_train_batch_size`: None - `per_gpu_eval_batch_size`: None - `gradient_accumulation_steps`: 1 - `eval_accumulation_steps`: None - `learning_rate`: 2e-05 - `weight_decay`: 0.0 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 2 - `max_steps`: -1 - `lr_scheduler_type`: linear - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.1 - `warmup_steps`: 0 - `log_level`: passive - `log_level_replica`: warning - `log_on_each_node`: True - `logging_nan_inf_filter`: True - `save_safetensors`: True - `save_on_each_node`: False - `save_only_model`: False - `restore_callback_states_from_checkpoint`: False - `no_cuda`: False - `use_cpu`: False - `use_mps_device`: False - `seed`: 42 - `data_seed`: None - `jit_mode_eval`: False - `use_ipex`: False - `bf16`: False - `fp16`: True - `fp16_opt_level`: O1 - `half_precision_backend`: auto - `bf16_full_eval`: False - `fp16_full_eval`: False - `tf32`: None - `local_rank`: 0 - `ddp_backend`: None - `tpu_num_cores`: None - `tpu_metrics_debug`: False - `debug`: [] - `dataloader_drop_last`: False - `dataloader_num_workers`: 0 - `dataloader_prefetch_factor`: None - `past_index`: -1 - `disable_tqdm`: False - `remove_unused_columns`: True - `label_names`: None - `load_best_model_at_end`: False - `ignore_data_skip`: False - `fsdp`: [] - `fsdp_min_num_params`: 0 - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} - `deepspeed`: None - `label_smoothing_factor`: 0.0 - `optim`: adamw_torch - `optim_args`: None - `adafactor`: False - `group_by_length`: False - `length_column_name`: length - `ddp_find_unused_parameters`: None - `ddp_bucket_cap_mb`: None - `ddp_broadcast_buffers`: False - `dataloader_pin_memory`: True - `dataloader_persistent_workers`: False - `skip_memory_metrics`: True - `use_legacy_prediction_loop`: False - `push_to_hub`: False - `resume_from_checkpoint`: None - `hub_model_id`: None - `hub_strategy`: every_save - `hub_private_repo`: False - `hub_always_push`: False - `gradient_checkpointing`: False - `gradient_checkpointing_kwargs`: None - `include_inputs_for_metrics`: False - `eval_do_concat_batches`: True - `fp16_backend`: auto - `push_to_hub_model_id`: None - `push_to_hub_organization`: None - `mp_parameters`: - `auto_find_batch_size`: False - `full_determinism`: False - `torchdynamo`: None - `ray_scope`: last - `ddp_timeout`: 1800 - `torch_compile`: False - `torch_compile_backend`: None - `torch_compile_mode`: None - `dispatch_batches`: None - `split_batches`: None - `include_tokens_per_second`: False - `include_num_input_tokens_seen`: False - `neftune_noise_alpha`: None - `optim_target_modules`: None - `batch_eval_metrics`: False - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional </details> ### Training Logs <details><summary>Click to expand</summary> | Epoch | Step | Training Loss | Validation Loss | healthcare-dev_cosine_map@100 | healthcare-test_cosine_map@100 | |:------:|:-----:|:-------------:|:---------------:|:-----------------------------:|:------------------------------:| | 0 | 0 | - | - | 0.8140 | 0.6266 | | 0.0126 | 100 | 0.1461 | 0.1289 | 0.8342 | - | | 0.0251 | 200 | 0.1063 | 0.1130 | 0.8448 | - | | 0.0377 | 300 | 0.1015 | 0.1008 | 0.8536 | - | | 0.0502 | 400 | 0.086 | 0.0937 | 0.8586 | - | | 0.0628 | 500 | 0.0824 | 0.0895 | 0.8654 | - | | 0.0753 | 600 | 0.1008 | 0.0872 | 0.8669 | - | | 0.0879 | 700 | 0.0755 | 0.0930 | 0.8658 | - | | 0.1004 | 800 | 0.0968 | 0.0923 | 0.8683 | - | | 0.1130 | 900 | 0.1011 | 0.0889 | 0.8677 | - | | 0.1255 | 1000 | 0.0943 | 0.0805 | 0.8706 | - | | 0.1381 | 1100 | 0.0668 | 0.0782 | 0.8660 | - | | 0.1507 | 1200 | 0.0746 | 0.0814 | 0.8738 | - | | 0.1632 | 1300 | 0.0825 | 0.0768 | 0.8728 | - | | 0.1758 | 1400 | 0.0851 | 0.0860 | 0.8660 | - | | 0.1883 | 1500 | 0.1029 | 0.0736 | 0.8752 | - | | 0.2009 | 1600 | 0.071 | 0.0805 | 0.8760 | - | | 0.2134 | 1700 | 0.081 | 0.0717 | 0.8731 | - | | 0.2260 | 1800 | 0.0767 | 0.0698 | 0.8744 | - | | 0.2385 | 1900 | 0.0895 | 0.0795 | 0.8705 | - | | 0.2511 | 2000 | 0.0666 | 0.0740 | 0.8701 | - | | 0.2637 | 2100 | 0.0791 | 0.0702 | 0.8733 | - | | 0.2762 | 2200 | 0.0779 | 0.0797 | 0.8767 | - | | 0.2888 | 2300 | 0.0812 | 0.0739 | 0.8790 | - | | 0.3013 | 2400 | 0.0492 | 0.0754 | 0.8798 | - | | 0.3139 | 2500 | 0.0442 | 0.0850 | 0.8722 | - | | 0.3264 | 2600 | 0.0652 | 0.0901 | 0.8717 | - | | 0.3390 | 2700 | 0.0579 | 0.0865 | 0.8733 | - | | 0.3515 | 2800 | 0.0543 | 0.0945 | 0.8742 | - | | 0.3641 | 2900 | 0.0639 | 0.0950 | 0.8678 | - | | 0.3766 | 3000 | 0.0587 | 0.0824 | 0.8775 | - | | 0.3892 | 3100 | 0.078 | 0.0864 | 0.8675 | - | | 0.4018 | 3200 | 0.091 | 0.0686 | 0.8763 | - | | 0.4143 | 3300 | 0.0763 | 0.0780 | 0.8734 | - | | 0.4269 | 3400 | 0.0552 | 0.0842 | 0.8668 | - | | 0.4394 | 3500 | 0.0549 | 0.0748 | 0.8748 | - | | 0.4520 | 3600 | 0.0642 | 0.0755 | 0.8790 | - | | 0.4645 | 3700 | 0.0796 | 0.0815 | 0.8650 | - | | 0.4771 | 3800 | 0.0949 | 0.0755 | 0.8642 | - | | 0.4896 | 3900 | 0.0783 | 0.0691 | 0.8698 | - | | 0.5022 | 4000 | 0.0534 | 0.0655 | 0.8822 | - | | 0.5148 | 4100 | 0.0453 | 0.0709 | 0.8742 | - | | 0.5273 | 4200 | 0.0498 | 0.0612 | 0.8838 | - | | 0.5399 | 4300 | 0.0903 | 0.0619 | 0.8795 | - | | 0.5524 | 4400 | 0.0667 | 0.0712 | 0.8825 | - | | 0.5650 | 4500 | 0.0364 | 0.0962 | 0.8722 | - | | 0.5775 | 4600 | 0.0502 | 0.0706 | 0.8790 | - | | 0.5901 | 4700 | 0.0685 | 0.0672 | 0.8788 | - | | 0.6026 | 4800 | 0.0675 | 0.0695 | 0.8768 | - | | 0.6152 | 4900 | 0.083 | 0.0680 | 0.8787 | - | | 0.6277 | 5000 | 0.0598 | 0.0715 | 0.8769 | - | | 0.6403 | 5100 | 0.0548 | 0.0710 | 0.8744 | - | | 0.6529 | 5200 | 0.0682 | 0.0679 | 0.8855 | - | | 0.6654 | 5300 | 0.0378 | 0.0779 | 0.8809 | - | | 0.6780 | 5400 | 0.0274 | 0.0711 | 0.8864 | - | | 0.6905 | 5500 | 0.0635 | 0.0699 | 0.8842 | - | | 0.7031 | 5600 | 0.0681 | 0.0563 | 0.8867 | - | | 0.7156 | 5700 | 0.0389 | 0.0595 | 0.8806 | - | | 0.7282 | 5800 | 0.0419 | 0.0586 | 0.8796 | - | | 0.7407 | 5900 | 0.0306 | 0.0520 | 0.8837 | - | | 0.7533 | 6000 | 0.0418 | 0.0622 | 0.8759 | - | | 0.7659 | 6100 | 0.0459 | 0.0691 | 0.8770 | - | | 0.7784 | 6200 | 0.0616 | 0.0679 | 0.8818 | - | | 0.7910 | 6300 | 0.0541 | 0.0658 | 0.8888 | - | | 0.8035 | 6400 | 0.0742 | 0.0767 | 0.8890 | - | | 0.8161 | 6500 | 0.0531 | 0.0675 | 0.8904 | - | | 0.8286 | 6600 | 0.0513 | 0.0720 | 0.8909 | - | | 0.8412 | 6700 | 0.0505 | 0.0722 | 0.8897 | - | | 0.8537 | 6800 | 0.0451 | 0.0705 | 0.8895 | - | | 0.8663 | 6900 | 0.0456 | 0.0704 | 0.8892 | - | | 0.8788 | 7000 | 0.0506 | 0.0668 | 0.8901 | - | | 0.8914 | 7100 | 0.0424 | 0.0556 | 0.8903 | - | | 0.9040 | 7200 | 0.036 | 0.0602 | 0.8890 | - | | 0.9165 | 7300 | 0.0545 | 0.0656 | 0.8886 | - | | 0.9291 | 7400 | 0.0604 | 0.0695 | 0.8863 | - | | 0.9416 | 7500 | 0.0362 | 0.0617 | 0.8909 | - | | 0.9542 | 7600 | 0.0442 | 0.0666 | 0.8932 | - | | 0.9667 | 7700 | 0.0398 | 0.0648 | 0.8886 | - | | 0.9793 | 7800 | 0.0471 | 0.0654 | 0.8921 | - | | 0.9918 | 7900 | 0.0716 | 0.0615 | 0.8933 | - | | 1.0044 | 8000 | 0.0306 | 0.0735 | 0.8929 | - | | 1.0169 | 8100 | 0.0601 | 0.0708 | 0.8927 | - | | 1.0295 | 8200 | 0.041 | 0.0672 | 0.8939 | - | | 1.0421 | 8300 | 0.0311 | 0.0693 | 0.8956 | - | | 1.0546 | 8400 | 0.0508 | 0.0700 | 0.8984 | - | | 1.0672 | 8500 | 0.0414 | 0.0640 | 0.8933 | - | | 1.0797 | 8600 | 0.0451 | 0.0606 | 0.8943 | - | | 1.0923 | 8700 | 0.0347 | 0.0668 | 0.8898 | - | | 1.1048 | 8800 | 0.0413 | 0.0663 | 0.8965 | - | | 1.1174 | 8900 | 0.0369 | 0.0641 | 0.8964 | - | | 1.1299 | 9000 | 0.0252 | 0.0543 | 0.8925 | - | | 1.1425 | 9100 | 0.0221 | 0.0529 | 0.8879 | - | | 1.1551 | 9200 | 0.0306 | 0.0568 | 0.8951 | - | | 1.1676 | 9300 | 0.0378 | 0.0616 | 0.8954 | - | | 1.1802 | 9400 | 0.0338 | 0.0592 | 0.8913 | - | | 1.1927 | 9500 | 0.0207 | 0.0565 | 0.8992 | - | | 1.2053 | 9600 | 0.0259 | 0.0600 | 0.8962 | - | | 1.2178 | 9700 | 0.0079 | 0.0655 | 0.8950 | - | | 1.2304 | 9800 | 0.022 | 0.0660 | 0.8959 | - | | 1.2429 | 9900 | 0.0296 | 0.0657 | 0.8960 | - | | 1.2555 | 10000 | 0.0263 | 0.0667 | 0.8916 | - | | 1.2680 | 10100 | 0.0184 | 0.0590 | 0.8951 | - | | 1.2806 | 10200 | 0.0254 | 0.0587 | 0.8926 | - | | 1.2932 | 10300 | 0.0213 | 0.0627 | 0.8896 | - | | 1.3057 | 10400 | 0.0141 | 0.0655 | 0.8905 | - | | 1.3183 | 10500 | 0.0077 | 0.0702 | 0.8910 | - | | 1.3308 | 10600 | 0.0159 | 0.0700 | 0.8921 | - | | 1.3434 | 10700 | 0.015 | 0.0674 | 0.8908 | - | | 1.3559 | 10800 | 0.018 | 0.0698 | 0.8955 | - | | 1.3685 | 10900 | 0.0156 | 0.0677 | 0.8908 | - | | 1.3810 | 11000 | 0.0219 | 0.0666 | 0.8952 | - | | 1.3936 | 11100 | 0.015 | 0.0640 | 0.8941 | - | | 1.4062 | 11200 | 0.0231 | 0.0634 | 0.8916 | - | | 1.4187 | 11300 | 0.0172 | 0.0679 | 0.8940 | - | | 1.4313 | 11400 | 0.0228 | 0.0636 | 0.8925 | - | | 1.4438 | 11500 | 0.0199 | 0.0655 | 0.8935 | - | | 1.4564 | 11600 | 0.025 | 0.0687 | 0.8961 | - | | 1.4689 | 11700 | 0.0277 | 0.0679 | 0.8922 | - | | 1.4815 | 11800 | 0.0227 | 0.0672 | 0.8912 | - | | 1.4940 | 11900 | 0.0222 | 0.0679 | 0.8914 | - | | 1.5066 | 12000 | 0.0138 | 0.0656 | 0.8929 | - | | 1.5191 | 12100 | 0.0107 | 0.0663 | 0.8916 | - | | 1.5317 | 12200 | 0.0137 | 0.0580 | 0.8927 | - | | 1.5443 | 12300 | 0.0311 | 0.0578 | 0.8948 | - | | 1.5568 | 12400 | 0.0198 | 0.0621 | 0.8953 | - | | 1.5694 | 12500 | 0.0084 | 0.0638 | 0.8950 | - | | 1.5819 | 12600 | 0.0166 | 0.0600 | 0.8959 | - | | 1.5945 | 12700 | 0.0251 | 0.0599 | 0.8928 | - | | 1.6070 | 12800 | 0.0154 | 0.0624 | 0.8973 | - | | 1.6196 | 12900 | 0.0301 | 0.0629 | 0.8937 | - | | 1.6321 | 13000 | 0.0198 | 0.0616 | 0.8937 | - | | 1.6447 | 13100 | 0.0146 | 0.0601 | 0.8914 | - | | 1.6573 | 13200 | 0.0128 | 0.0610 | 0.8945 | - | | 1.6698 | 13300 | 0.0092 | 0.0606 | 0.8920 | - | | 1.6824 | 13400 | 0.0121 | 0.0595 | 0.8954 | - | | 1.6949 | 13500 | 0.0183 | 0.0577 | 0.8918 | - | | 1.7075 | 13600 | 0.0245 | 0.0572 | 0.8944 | - | | 1.7200 | 13700 | 0.0166 | 0.0592 | 0.8931 | - | | 1.7326 | 13800 | 0.0059 | 0.0593 | 0.8929 | - | | 1.7451 | 13900 | 0.0087 | 0.0581 | 0.8918 | - | | 1.7577 | 14000 | 0.0252 | 0.0595 | 0.8924 | - | | 1.7702 | 14100 | 0.0165 | 0.0585 | 0.8976 | - | | 1.7828 | 14200 | 0.022 | 0.0595 | 0.8976 | - | | 1.7954 | 14300 | 0.0143 | 0.0602 | 0.8967 | - | | 1.8079 | 14400 | 0.0328 | 0.0608 | 0.8974 | - | | 1.8205 | 14500 | 0.0228 | 0.0597 | 0.8983 | - | | 1.8330 | 14600 | 0.009 | 0.0594 | 0.8979 | - | | 1.8456 | 14700 | 0.0188 | 0.0593 | 0.8952 | - | | 1.8581 | 14800 | 0.0157 | 0.0583 | 0.8962 | - | | 1.8707 | 14900 | 0.0116 | 0.0571 | 0.8969 | - | | 1.8832 | 15000 | 0.0183 | 0.0559 | 0.8989 | - | | 1.8958 | 15100 | 0.0118 | 0.0554 | 0.8972 | - | | 1.9083 | 15200 | 0.0192 | 0.0559 | 0.8970 | - | | 1.9209 | 15300 | 0.0109 | 0.0566 | 0.8957 | - | | 1.9335 | 15400 | 0.0145 | 0.0566 | 0.8975 | - | | 1.9460 | 15500 | 0.0131 | 0.0573 | 0.8965 | - | | 1.9586 | 15600 | 0.0104 | 0.0575 | 0.8969 | - | | 1.9711 | 15700 | 0.0185 | 0.0581 | 0.8961 | - | | 1.9837 | 15800 | 0.0131 | 0.0579 | 0.8943 | - | | 1.9962 | 15900 | 0.032 | 0.0576 | 0.8943 | - | | 2.0 | 15930 | - | - | - | 0.7563 | </details> ### Framework Versions - Python: 3.10.13 - Sentence Transformers: 3.2.0 - Transformers: 4.41.2 - PyTorch: 2.1.2 - Accelerate: 0.30.1 - Datasets: 2.19.2 - Tokenizers: 0.19.1 ## Citation ### BibTeX #### Sentence Transformers ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", } ``` #### MultipleNegativesRankingLoss ```bibtex @misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` <!-- ## 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.* -->
{"base_model": "BookingCare/multilingual-e5-base-v2", "library_name": "sentence-transformers", "metrics": ["cosine_accuracy@1", "cosine_accuracy@3", "cosine_accuracy@5", "cosine_accuracy@10", "cosine_precision@1", "cosine_precision@3", "cosine_precision@5", "cosine_precision@10", "cosine_recall@1", "cosine_recall@3", "cosine_recall@5", "cosine_recall@10", "cosine_ndcg@10", "cosine_mrr@10", "cosine_map@100", "dot_accuracy@1", "dot_accuracy@3", "dot_accuracy@5", "dot_accuracy@10", "dot_precision@1", "dot_precision@3", "dot_precision@5", "dot_precision@10", "dot_recall@1", "dot_recall@3", "dot_recall@5", "dot_recall@10", "dot_ndcg@10", "dot_mrr@10", "dot_map@100"], "pipeline_tag": "sentence-similarity", "tags": ["sentence-transformers", "sentence-similarity", "feature-extraction", "generated_from_trainer", "dataset_size:80448", "loss:MultipleNegativesRankingLoss"], "widget": [{"source_sentence": "Chấn thương phần mềm nghiêm trọng", "sentences": [" Theo Đông y, bạc thau có tính mát, vị đắng, hơi cay và chua. Cây có tác dụng điều kinh, lợi tiểu, thanh nhiệt, cầm máu, thư cân hoạt lạc, tiêu đờm, nhuận phế, chỉ khái. Vậy\nTrong dân gian Việt Nam,\nthường được dùng để làm thuốc chữa\nkinh nguyệt không đều\nrong kinh\n, bí tiểu tiện, rát buốt, tiểu ít, màu nước tiểu đục. Ngoài ra,\ndùng trong điều trị lở ngứa, mụn nhọt, sát khuẩn, giải độc,\nviêm phế quản\nvà sốt rét cũng rất hiệu quả. Người ta thường dùng tươi, giã nát ra đắp lên những nơi bị\ngãy xương\nhoặc đắp lên mụn nhọt cho hút mủ lên da non. Bên cạnh đó, người ta hay dùng bạc thau phơi khô để chữa ho đặc biệt là cho trẻ em. cây bạc thau chữa bệnh gì? bạc thau kinh nguyệt không đều , rong kinh bạc thau viêm phế quản gãy xương Ở Quảng Tây (Trung Quốc), bạc sau được dùng bằng cách lấy toàn cây để trị ho, nhức mỏi chân tay, viêm thận thuỷ thũng hay dùng ngoài trị độc do giang mai.", "1.1. Định nghĩa Các bác sĩ cho biết những chấn thương phần mềm được gọi là nghiêm trọng khi: Vết thương phần mềm làm lộ gân, xương khớp, thần kinh và/hoặc mạch máu; Vết thương mất đoạn gân hoặc xương. 1.2. Hậu quả Tình trạng này nếu không được điều trị đúng cách sẽ có nguy cơ dẫn đến di chứng: Nhiễm trùng; – gân ,mạch máu, thần kinh,cơ... Hoại tử xương Biến dạng, co rút cơ quan vận động; Cứng khớp; Làm mất chức năng vận động của chi thể, ảnh hưởng lớn đến cuộc sống của người bệnh. 1.3. Điều trị Các biện pháp phù hợp thường được áp dụng đối với dạng chấn thương này là: Khâu da che phủ thì đầu (vết thương đơn giản không bị căng kéo); Ghép da tự thân; Xoay vạt da tại chỗ; có cuống mạch liền Chuyển vạt da rời có cuống mạnh rời (nối vi phẫu mạch máu). Chuyển vạt da Theo khuyến cáo của bác sĩ, quyết định khâu da thì đầu hay để hở hoặc chuyển vạt cơ che phủ các chấn thương là rất quan trọng. Điều này phụ thuộc rất nhiều vào trình độ chuyên môn của phẫu thuật viên.Đánh giá vết thương và xử lý vết thương theo thang tạo hình từ thấp tới cao tương ứng với độ phức tạp của vết thương.", " (CPP – Cerebral Perfusion Pressure) có mối liên quan mật thiết với\n. Áp lực tưới máu não được định nghĩa là hiệu số giữa áp lực động mạch trung bình (Mean Arterial Pressure - MAP) và áp lực nội sọ (ICP). Điều đó có nghĩa là: CPP = MAP - ICP. Áp lực động mạch trung bình là áp lực trung bình ở động mạch cảnh. MAP = (áp lực thì tâm thu + 2 áp lực thì tâm trương)/3.\nở người bình thường là trên 50mmHg. Áp lực tưới máu não nên duy trì ở mức 70 - 80mmHg và áp lực nội sọ ở mức dưới 15mmHg. Áp lực tưới máu não áp lực nội sọ Áp lực tưới máu não Tình trạng tăng\ndẫn đến quá trình giảm áp lực tưới máu não và lưu lượng máu não, là nguyên nhân chính gây tử vong đối với các bệnh nhân bị chấn thương sọ não. Bởi vậy, việc duy trì áp lực tưới máu não ở một giá trị thích hợp trong thời gian nhanh nhất chính là một trong những yếu tố then chốt của hoạt động chăm sóc đặc biệt cho người bệnh, tránh hoại tử não ở bệnh nhân bị tăng\n, đặc biệt với người bị\nthường gặp trong tai nạn giao thông. áp lực nội sọ áp lực nội sọ chấn thương sọ não Theo dõi mức\nvà\ncho phép đánh giá chính xác những thay đổi áp lực và lưu lượng máu trong não, phục vụ tốt nhất cho quá trình chẩn đoán và điều trị ở các bệnh nhân bị\nchấn thương sọ não nặng\n, hôn mê,... áp lực nội sọ áp lực tưới máu não chấn thương sọ não nặng Video đề xuất: Khám sức khỏe định kỳ tại Vinmec: Bảo vệ bạn trước khi quá muộn! XEM THÊM: Chức năng của dịch não tủy Chức năng của dịch não tủy Điều trị ở bệnh nhân tụ máu não do chấn thương sọ não Điều trị ở bệnh nhân tụ máu não do chấn thương sọ não Chấn thương sọ não: Nhận biết và điều trị thế nào? Chấn thương sọ não: Nhận biết và điều trị thế nào? Thần kinh Điều chỉnh áp lực tưới máu não Chấn thương sọ não Điều chỉnh áp lực trong sọ Áp lực tưới máu não Dịch não tủy"]}, {"source_sentence": "Định nghĩa về tình trạng hiếm muộn", "sentences": [" Những người sau điều trị ung thư có thể gặp các vấn đề về sức khỏe răng miệng, tùy thuộc vào các phương pháp điều trị mà họ nhận được: Hóa trị có thể ảnh hưởng đến men răng và làm tăng nguy cơ mắc các vấn đề răng miệng lâu dài. Liệu pháp xạ trị liều cao đến vùng đầu và cổ có thể làm thay đổi sự phát triển của răng. Nó cũng có thể gây ra bệnh nướu răng và sản xuất nước bọt thấp hơn, gây khô miệng. Thuốc steroid có thể làm tăng nguy cơ mắc các vấn đề về mắt như bong tróc mắt ảnh hưởng đến thị lực (đục thủy tinh thể). Để theo dõi các vấn đề này trong tương lai, người bệnh nên sắp xếp các cuộc hẹn thường xuyên với nha sĩ và bác sĩ nhãn khoa.", " Vắc xin phòng cúm\n: Khá nhiều cha mẹ băn khoăn liệu trẻ có cần vắc xin phòng cúm hay không, thì câu trả lời là có. Biến chứng của cúm ở trẻ dưới 5 tuổi thường nghiêm trọng, do đó để bảo vệ sức khỏe cho trẻ, cha mẹ nên đưa đi tiêm phòng cúm. Lịch tiêm cụ thể cha mẹ cần tham vấn với bác sĩ. Cha mẹ cần lưu ý virus cúm mỗi năm lại biến đổi, do đó trẻ cần được tiêm phòng hàng năm. Vắc xin phòng cúm Ngoài chế độ dinh dưỡng, trẻ 8 tháng cần 5mg kẽm nguyên tố/ngày để trẻ ăn ngon, đạt chiều cao và cân nặng đúng chuẩn và vượt chuẩn. Kẽm đóng vai trò tác động đến hầu hết các quá trình sinh học diễn ra trong cơ thể, đặc biệt là quá trình phân giải tổng hợp axit nucleic, protein... Các cơ quan trong cơ thể khi thiếu kẽm có thể dẫn đến một số bệnh lý như rối loạn thần kinh, dễ sinh cáu gắt,... Vì vậy cha mẹ cần tìm hiểu về\nVai trò của kẽm và hướng dẫn bổ sung kẽm hợp lý cho bé\n. Vai trò của kẽm và hướng dẫn bổ sung kẽm hợp lý cho bé Ngoài kẽm, cha mẹ cũng cần bổ sung cho trẻ các vitamin và khoáng chất quan trọng khác như lysine, crom, vitamin nhóm B,... giúp con ăn ngon, có hệ miễn dịch tốt, tăng cường đề kháng để ít ốm vặt. Hãy thường xuyên truy cập website\nVinmec.com\nvà cập nhật những thông tin hữu ích để chăm sóc cho bé và cả gia đình nhé. Vinmec.com Bài viết tham khảo nguồn: mayoclinic.org và whattoexpect.com Thực Phẩm bảo vệ sức khỏe LAMINKID I: Sản phẩm có công dụng bổ sung vi khoáng và vitamin cho cơ thể. Hỗ trợ tiêu hóa, tăng cường hấp thu thức ăn, giúp trẻ ăn ngon. Hỗ trợ nâng cao đề kháng cho trẻ, hỗ trợ giảm nguy cơ mắc bệnh do sức đề kháng kém như viêm đường hô hấp trên, cảm cúm. Đối tượng sử dụng: - Trẻ biếng ăn, kém hấp thu thức ăn, trẻ gầy yếu, suy dinh dưỡng, chậm phát triển. - Trẻ có sức đề kháng kém, đang ốm hoặc vừa ốm dậy, trẻ hay mắc các bệnh viêm đường hô hấp trên, cảm cúm. Chịu trách nhiệm về chất lượng sản phẩm: Công ty Cổ phần dược phẩm Elepharma Số 9, phố Trương Công Giai, tổ 17, Phường Dịch Vọng, Quận Cầu Giấy, Thành phố Hà Nội, Việt Nam (ĐT) 1800 6091; (E) [email protected] https://i.vinmec.com/laminkid Xem thêm thông tin về sản phẩm tại: https://i.vinmec.com/dangkytuvandinhduong Đăng ký tư vấn dinh dưỡng cho bé tại: nhi khoa Trẻ 8 tháng tuổi Vận động của trẻ LaminKid Trẻ mọc răng Dinh dưỡng của trẻ Nhận thức của trẻ Giấc ngủ của trẻ", " Hiếm muộn\nhiện đang là một gánh nặng của ngành y tế Việt Nam, ảnh hưởng đến khoảng 15-20% các cặp vợ chồng ở độ tuổi sinh sản. Theo tổ chức Y tế thế giới (WHO) quy định: hiếm muộn là bệnh lý của cơ quan sinh sản, một cặp vợ chồng được gọi là hiếm muộn khi không có khả năng có thai sau một năm chung sống trở lên, giao hợp đều đặn và không sử dụng\nnào. Với các cặp vợ chồng có người vợ trên 35 tuổi thì thời gian quy định là 6 tháng. Vì vậy, khi người vợ trên 35 tuổi, sau 6 tháng mong con nhưng vẫn không thể có thai được nên được khám và điều trị sớm. Tuy nhiên đối với những trường hợp, nguyên nhân hiếm muộn tương đối rõ ràng thì việc tính thời gian không còn được đặt ra. Hiếm muộn biện pháp tránh thai"]}, {"source_sentence": "Chơi trò chơi đố chữ", "sentences": [" Việc\ndạy trẻ nói\nsẽ trở nên hấp dẫn hơn nhiều khi nó được thực hiện thông qua một trò chơi. Trẻ ở lứa tuổi mới biết đi sẽ thích một trò chơi có tên \"Đây là gì?\" Khi đưa trẻ đến một môi trường mới - quán cà phê, sân bay hoặc chợ - hãy chỉ vào một thứ gì đó và hỏi trẻ, \"Đây là gì?\" Thách thức trẻ tìm ra tên chính xác. Để giúp trẻ không nản lòng, hãy bắt đầu với một vài đồ vật - một con mèo, một cái bánh quy – mà bố mẹ chắc chắn rằng trẻ đã biết. Sau đó, thỉnh thoảng lại lén nói một từ mới. Nếu trẻ không biết, hãy thì thầm câu trả lời và để trẻ hét lên. Sau đó, giới thiệu cho trẻ biết đồ vật đó là gì và nó hoạt động như thế nào. Ví dụ \"Đó là một chiếc ô. Chúng ta sử dụng ô để khi trời mưa để không bị ướt.\" dạy trẻ nói Những đứa trẻ ở độ tuổi lớn hơn sẽ đánh giá cao một trò chơi phức tạp hơn một chút có tên \"Điều gì xảy ra tiếp theo?\" Bắt đầu kể cho trẻ nghe một câu chuyện, và ngay khi cốt truyện bắt đầu đi lên cao trào, hãy yêu cầu trẻ kể cho bố mẹ nghe kết thúc của nó. Nếu trẻ không đủ vốn từ để tự mình trình bày cụ thể, bố mẹ có thể giúp con bằng cách đặt một số câu hỏi gợi ý như \"Con có nghĩ con chó sói bỏ chạy không?\" Một khi bố mẹ đã gợi ý một hướng cốt truyện, bố mẹ có thể hỏi trẻ để biết thêm suy nghĩ của chúng một cách chi tiết hơn như \"Con nghĩ chú chó đã đi đâu?\" hoặc \"Ai đã đi cùng trẻ?\"", " 3.1 Tầm soát cho đối tượng hội chứng Lynch, có 02 nhóm Người có thân nhân thế hệ một (cha mẹ, anh em) đã bị ung thư đại-trực tràng trước tuổi 45. Các đối tượng này dễ bị ung thư gấp 10 lần người thường, Người có hơn 2 người thân thế hệ một bị bất kỳ ung thư nào. Các đối tượng này dễ bị ung thư gấp 6 lần người thường. Vì\nhay xảy ra từ tuổi 50 vì thế nên tầm soát ở độ tuổi này chúng ta có thể giảm tỷ lệ 50% ung thư và kéo dài thời gian sống hơn 12 tháng. Test nên dùng cho các đối tượng này là nội soi đại tràng. Nếu trong gia đình có người rất trẻ, dưới 40 tuổi bị ung thư, nên tầm soát những người trong gia đình sớm hơn 10 năm và nên thực hiện kiểm tra nội soi đại tràng mỗi 5 năm. ung thư đại - trực tràng 3.1.1 Ung thư đại tràng không do polyp (Hereditary non-polyposis colon cancer: HNPCC) Loại ung thư này (hình 9) hay xảy ra trong gia đình và gây bệnh ở người trẻ, trước tuổi 45. Ngoài nội soi đại tràng cho những người thân trong gia đình mỗi 5 năm tính từ tuổi người mắc bệnh, cần thử DNA để so sánh với DNA của người thân đã bị ung thư trước đó. Các đối tượng trong gia đình này cần nội soi đại tràng, nội soi dạ dày, chụp nhũ ảnh, siêu âm vùng chậu và thử tế bào tử cung vì ngoài\nhọ có thể bị ung thư dạ dày, ung thư vú, tử cung và buồng trứng. ung thư đại tràng Đa polyp trong gia đình (Familial Adenomatous Polyposis: FAP) Loại bệnh này ít gặp hơn loại\nkhông do polyp nhưng sẽ diễn tiến thành ung thư đại tràng khi trên 50 tuổi, vì thế cần tầm soát tất cả người thân của bệnh nhân đã mắc bệnh này bắt đầu từ 10 tuổi, nội soi đại tràng chậu hông hoặc nội soi toàn bộ đại tràng. Nếu có bệnh FAP (hình 10), nên cân nhắc quyết định cắt toàn bộ đại tràng để phòng ngừa polyp hóa ác. ung thư đại tràng Theo dõi sau cắt polyp ác tính: Những polyp đại trực tràng lớn hơn 1cm, không cuống, nghịch sản có nguy cơ hóa ác cao. Sau cắt polyp qua nội soi, cần theo dõi và nội soi kiểm tra định kỳ như sau: Mỗi 01 tháng trong 03 tháng đầu, trong năm thứ nhất. Mỗi 03 tháng trong 06 tháng kế tiếp, trong năm thứ nhất. Mỗi 06 tháng trong năm thứ hai. Mỗi năm, từ năm thứ 03 đến năm thứ 05. Những tổn thương polyp ác tính, lịch nội soi kiểm tra tương tự như lịch theo dõi những ung thư đại trực tràng đã được phẫu thuật như: Xét nghiệm máu tìm chỉ điểm ung thư (CEA) 06 tháng sau mổ, trong 05 năm. Nội soi đại tràng kiểm tra 06 tháng sau mổ, trong năm thứ nhất. Nội soi đại tràng kiểm tra 01 năm sau mổ, trong năm thứ hai. Nội soi đại tràng kiểm tra 03 năm sau mổ, trong năm thứ ba về sau. Theo dõi các bệnh viêm đại tràng Các bệnh\nviêm đại tràng\ngồm\nviêm loét đại tràng\n(hình 11) và bệnh\nCrohn\ngây phản ứng viêm trên hơn một nửa đại tràng và khiến bệnh nhân dễ bị ung thư gấp 10 lần người bình thường. viêm đại tràng viêm loét đại tràng Crohn Các tác giả khuyến cáo nếu viêm đại tràng trên 8 năm thì hàng năm nên nội soi đại tràng. Mục tiêu chính là phát hiện tổn thương tiền ung thư. Nếu có dị sản nặng do ít nhất 2 chuyên gia giải phẫu bệnh xác nhận thì nên cắt toàn bộ đại tràng để ngừa ung thư.", "Nếu ngã theo cơ thế chống tay hay sưng nề nhiều vùng cổ bàn tay nghi ngờ gãy xương thuyền cần đến các cơ sở y tế chuyên khoa để chẩn đoán kịp thời. được chẩn đoán bằng hỏi bệnh sử, khám thực thể, chụp Xquang cổ bàn tay. Trong một vài trường hợp thì phim Xquang chụp ngay sau chấn thương có vẻ bình thường và việc chẩn đoán có thể bị chậm sau 2-3 tuần chỗ gãy mới rõ trên Xquang. Cả chụp CT và MRI có thể có giá trị để đánh giá những điểm khác nhau của gãy xương thuyền. Chẩn đoán và điều trị sớm là quan trọng để có kết quả tối ưu. Gãy xương thuyền Những triệu chứng của gãy xương thuyền là: đau, sưng, ấn đau vùng cổ tay, không có biến dạng rõ ràng vì thế mà gãy xương thuyền có thể nhầm lẫn với bong gân cổ tay nên bác sĩ phải hỏi bệnh sử tỉ mỉ về cơ chế gãy chấn thương và cần phải khám lâm sàng thích hợp."]}, {"source_sentence": "Thiếu vi chất dinh dưỡng ảnh hưởng đến trẻ như thế nào?", "sentences": ["3.1 Thiếu vitamin A có vai trò quan trọng đối với trẻ nhỏ, giúp trẻ phát triển bình thường, tăng cường khả năng miễn dịch và bảo vệ giác mạc, da, niêm mạc. Đặc biệt, vitamin A còn có tác dụng phòng ngừa các bệnh nhiễm trùng như tiêu chảy, đường hô hấp, khô giác mạc và mù lòa. Nếu\nthiếu vitamin A\ntrẻ sẽ dễ gặp các bệnh về mắt và tăng nguy cơ nhiễm trùng. Vitamin A thiếu vitamin A 3.2 Thiếu canxi và vitamin D Thiếu vitamin D\nlà nguyên nhân chính gây ra\nbệnh còi xương ở trẻ em\n, bởi vì thiếu vitamin D làm giảm hấp thụ canxi ở ruột, cơ thể sẽ huy động lượng canxi ở trong xương đi vào máu gây ra rối loạn quá trình khoáng hóa xương. Trẻ sẽ có những biểu hiện như quấy khóc, nôn trớ, ra mồ hôi trộm, rụng tóc, đầu to, thóp rộng, răng mọc chậm, chậm biết đi, biến dạng xương, lồng ngực dô,... Từ đó, làm giảm chiều cao của trẻ. Thiếu vitamin D ảnh hưởng đến hệ miễn dịch, sức đề kháng của trẻ. Trẻ dễ mắc các bệnh lý như viêm đường hô hấp trên, hay tái phát. Thiếu vitamin D bệnh còi xương ở trẻ em 3.3 Thiếu sắt Sắt\nlà một trong những thành phần của huyết sắc tố, tham gia vào quá trình vận chuyển oxy và hô hấp tế bào. Thiếu sắt dẫn tới thiếu máu và các bệnh viêm đường hô hấp, các bệnh nhiễm khuẩn ở trẻ. Thiếu sắt làm cho trẻ bị thiếu các dưỡng chất ảnh hưởng đến tăng trưởng và phát triển của cơ thể. Sắt 3.4 Thiếu iot Khi cơ thể trẻ thiếu i-ốt, tuyến giáp phát triển lớn và gây\nbệnh bướu cổ\n. Bên cạnh đó, trẻ thiếu i-ốt còn làm tăng nguy cơ chậm phát triển trí tuệ, chậm lớn, thiểu năng và đần độn. bệnh bướu cổ 3.5 Thiếu kẽm Kẽm là một trong những vi chất có vai trò quan trọng trong quá trình tăng trưởng và miễn dịch. Trẻ bị thiếu kẽm sẽ\nchậm lớn và giảm sức đề kháng, suy dinh dưỡng và chậm phát triển chiều cao. biếng ăn , Tóm lại, vi chất dinh dưỡng là những chất chỉ chiếm một lượng nhỏ trong cơ thể nhưng đóng vai trò rất quan trọng trong tăng trưởng, duy trì và nâng cao sức khỏe, phát triển trí tuệ,... Thiếu vi chất là tình trạng thường gặp ở trẻ nhỏ ảnh hưởng đến sự phát triển của trẻ. Do vậy, khi trẻ có những biểu hiện thiếu vi chất dinh dưỡng thì cha mẹ hãy đưa trẻ đến ngay cơ sở y tế để được kiểm tra. Ngoài ra cha mẹ cũng nên cho trẻ khám định kỳ nhằm phát hiện sớm tình trạng thiếu vi chất ở trẻ. Thiếu vi chất dinh dưỡng LaminKid Suy dinh dưỡng Vi chất dinh dưỡng Chậm phát triển chiều cao Chậm phát triển trí tuệ", " Bất kỳ ai bị tiểu đường đều có nguy cơ cao mắc hôn mê do tiểu đường, tuy nhiên những yếu tố dưới đây được xem là các nguy cơ hàng đầu dẫn đến tình trạng này, bao gồm: Nếu bạn đang sử dụng máy bơm insulin, bạn cần phải kiểm tra thường xuyên lượng đường trong máu của mình. Việc cung cấp insulin có thể dừng lại nếu máy bơm bị lỗi hoặc ống thông bị xoắn hay rơi ra khỏi vị trí. Khi bị thiếu hụt insulin có thể dẫn đến tình trạng nhiễm toan ceton do tiểu đường. Vấn đề về cung cấp insulin: Khi cơ thể bị ốm hoặc gặp phải chấn thương sẽ khiến cho lượng đường trong máu của bạn có xu hướng tăng cao đột ngột. Điều này có thể gây ra nhiễm toan ceton do tiểu đường nếu bạn bị bệnh tiểu đường loại 1 và không tăng liều insulin để bù đắp cho lượng bị thiếu hụt. Một số tình trạng sức khoẻ khác, chẳng hạn như bệnh thận hoặc\nsuy tim sung huyết\n, cũng có thể làm tăng nguy cơ mắc hội chứng tăng áp lực thẩm thấu bệnh tiểu đường (hyperosmolar). Bệnh tật, chấn thương hoặc phẫu thuật: suy tim sung huyết Nếu bạn không theo dõi thường xuyên lượng đường trong máu hoặc dùng thuốc không theo chỉ dẫn của bác sĩ, bạn sẽ có nguy cơ cao mắc các biến chứng tiểu đường lâu dài, thậm chí là hôn mê do tiểu đường. Bệnh tiểu đường không được kiểm soát tốt: Đôi khi những người mắc bệnh tiểu đường cũng có thể gặp phải chứng\nrối loạn ăn uống\nchọn không sử dụng insulin theo chỉ dẫn với mong muốn có thể giảm cân. Đây là một hành động khá nguy hiểm, đe dọa đến tính mạng và làm tăng nguy cơ hôn mê do tiểu đường. Cố ý bỏ bữa hoặc không dùng insulin: rối loạn ăn uống Rượu là một trong những yếu tố có thể tác động khó lượng đến lượng đường trong máu của bạn. Tác dụng an thần của rượu có thể khiến bạn khó nhận biết được khi nào mình đang gặp phải các triệu chứng của hạ đường huyết. Điều này cũng sẽ làm tăng nguy cơ hôn mê do tiểu đường. Uống nhiều rượu: Một số loại thuốc bị cấm sử dụng, chẳng hạn như\ncocaine\nhoặc thuốc lắc, có thể làm tăng nguy cơ lượng đường trong máu cao ở mức nghiêm trọng và các tình trạng khác liên quan đến hôn mê do tiểu đường. Sử dụng các loại thuốc bất hợp pháp: cocaine", " Việc lạm dụng hoặc sử dụng không đúng các sản phẩm giải độc gan có thể để lại một số tác dụng không mong muốn, khiến cho tình trạng bệnh lý ở gan nặng hơn cũng như gây ra các tác dụng phụ toàn thân, nặng hơn có thể dẫn đến\nsuy gan\n, đe dọa tính mạng. Do đó, không nên tự ý sử dụng các loại thuốc hoặc thực phẩm chức năng giải độc gan nếu không có hướng dẫn, chỉ định của bác sĩ. suy gan Một số bệnh nhân mắc các bệnh lý gan mật tự ý dùng các thuốc giải độc gan đơn thuần với hy vọng điều trị được bệnh. Đây là quan điểm sai lầm bởi vì gan bị nhiễm độc là do nhiều nguyên nhân khác nhau. Điều quan trọng là phải tìm được nguyên nhân mới hy vọng điều trị bệnh hiệu quả. Thực tế là các thuốc giải độc gan chỉ hỗ trợ điều trị tổn thương gan chứ không tác dụng trực tiếp đến nguyên nhân bệnh. Do đó, các sản phẩm giải độc gan không thể thay thế điều trị y khoa. Phương pháp dân gian giải độc gan được truyền miệng từ xa xưa không phải đều phù hợp với tất cả bệnh nhân. Tác dụng và hiệu quả còn tùy thuộc vào cơ địa từng người, bệnh cảnh cụ thể, cũng như liều lượng, cách dùng, cách bảo quản,... Việc sử dụng tùy tiện các loại cây thuốc nam không những không mang lại hiệu quả điều trị mà còn có thể ảnh hưởng đến sức khỏe người bệnh. Một số người bệnh\nnghiện rượu\nbia tỏ ra chủ quan khi dùng thuốc giải độc gan vì cho rằng mỗi khi đã sử dụng thuốc giải độc gan thì có thể uống bao nhiêu bia, rượu cũng được. Điều này hoàn toàn sai lầm vì thuốc giải độc gan không thể hỗ trợ điều trị khi nguyên nhân không được giải quyết. nghiện rượu"]}, {"source_sentence": "Có cách nào để cải thiện môi trường làm việc độc hại không?", "sentences": [" Chấn thương đầu, cổ, tủy sống rất nguy hiểm vì có thể gây mất vận động (liệt),\nhôn mê\nvà tử vong.\nChấn thương tủy sống\nlà nguyên nhân tổn thương thần kinh và gây ra\nkhó thở\n. hôn mê Chấn thương tủy sống khó thở Người bệnh bị chấn thương đầu, cổ, tủy sống cần được vận chuyển hết sức thận trọng. Bởi bất cứ vận động nào không phù hợp cũng có thể làm chấn thương nặng thêm như liệt tay hoặc chân. Nếu người bệnh không tỉnh, cần thực hiện hỗ trợ sự sống cơ bản.", " Quá trình mang thai bị tê tay chân là hiện tượng phổ biến thường gặp. Nếu ở mức độ nhẹ thì bệnh chỉ gây ảnh hưởng đến sinh hoạt hằng ngày. Nhưng nếu như tình trạng tê tay chân diễn ra liên tục và kèm theo các chứng\nchóng mặt\n, khó nhấc tay chân, co cơ,... cần nghĩ đến dấu hiệu của một bệnh lý khác. chóng mặt Lúc này, bạn cần tới các cơ sở y tế uy tín gần nhất để được thăm khám chuyên sâu và có hướng điều trị phù hợp.", " Tương tự như chất độc trong không khí,\ncó thể gây hại cho sức khỏe tinh thần và thể chất của người lao động. Nếu bạn tiếp tục làm việc quá lâu, nó có thể dẫn đến mức độ căng thẳng cao, lòng tự trọng bị tụt giảm và bệnh lý trầm cảm. môi trường làm việc độc hại Nếu sự vấn đề đến từ lãnh đạo hoặc tư duy của công ty, bạn sẽ không thể làm được gì nhiều để cải thiện, tuy nhiên nếu vấn đề chỉ đến từ 1 hoặc 2 người, bạn có thể thảo luận với người quản lý đáng tin cậy hoặc nói chuyện với bộ phận nhân sự (HR). Sau đó, công ty có thể thuê trợ giúp từ bên ngoài như thông qua chương trình hỗ trợ nhân viên (EAP) để giúp giải quyết vấn đề. Nếu không có sự lựa chọn nào ngoài việc ở lại lúc này, hãy thử đặt mình vào một vỏ bọc nhỏ, cố gắng tránh mọi thị phi và giữ an tĩnh cho riêng mình. Tập trung vào các mục tiêu bên ngoài công việc và bắt đầu lập kế hoạch để thoát ra ngoài."]}], "model-index": [{"name": "SentenceTransformer based on BookingCare/multilingual-e5-base-v2", "results": [{"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "healthcare dev", "type": "healthcare-dev"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.8482587064676617, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.9266169154228856, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.9465174129353234, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.9639303482587065, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.8482587064676617, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.3088723051409619, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.18930348258706467, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.09639303482587065, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.8482587064676617, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.9266169154228856, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.9465174129353234, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.9639303482587065, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.9103935171059057, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.8927939666745639, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.8943003609860257, "name": "Cosine Map@100"}, {"type": "dot_accuracy@1", "value": 0.8482587064676617, "name": "Dot Accuracy@1"}, {"type": "dot_accuracy@3", "value": 0.9266169154228856, "name": "Dot Accuracy@3"}, {"type": "dot_accuracy@5", "value": 0.9465174129353234, "name": "Dot Accuracy@5"}, {"type": "dot_accuracy@10", "value": 0.9639303482587065, "name": "Dot Accuracy@10"}, {"type": "dot_precision@1", "value": 0.8482587064676617, "name": "Dot Precision@1"}, {"type": "dot_precision@3", "value": 0.3088723051409619, "name": "Dot Precision@3"}, {"type": "dot_precision@5", "value": 0.18930348258706467, "name": "Dot Precision@5"}, {"type": "dot_precision@10", "value": 0.09639303482587065, "name": "Dot Precision@10"}, {"type": "dot_recall@1", "value": 0.8482587064676617, "name": "Dot Recall@1"}, {"type": "dot_recall@3", "value": 0.9266169154228856, "name": "Dot Recall@3"}, {"type": "dot_recall@5", "value": 0.9465174129353234, "name": "Dot Recall@5"}, {"type": "dot_recall@10", "value": 0.9639303482587065, "name": "Dot Recall@10"}, {"type": "dot_ndcg@10", "value": 0.9103935171059057, "name": "Dot Ndcg@10"}, {"type": "dot_mrr@10", "value": 0.8927939666745639, "name": "Dot Mrr@10"}, {"type": "dot_map@100", "value": 0.8943003609860257, "name": "Dot Map@100"}]}, {"task": {"type": "information-retrieval", "name": "Information Retrieval"}, "dataset": {"name": "healthcare test", "type": "healthcare-test"}, "metrics": [{"type": "cosine_accuracy@1", "value": 0.6713868285007867, "name": "Cosine Accuracy@1"}, {"type": "cosine_accuracy@3", "value": 0.8208586199145875, "name": "Cosine Accuracy@3"}, {"type": "cosine_accuracy@5", "value": 0.8650258485052821, "name": "Cosine Accuracy@5"}, {"type": "cosine_accuracy@10", "value": 0.8996403686221622, "name": "Cosine Accuracy@10"}, {"type": "cosine_precision@1", "value": 0.6713868285007867, "name": "Cosine Precision@1"}, {"type": "cosine_precision@3", "value": 0.2736195399715291, "name": "Cosine Precision@3"}, {"type": "cosine_precision@5", "value": 0.17300516970105642, "name": "Cosine Precision@5"}, {"type": "cosine_precision@10", "value": 0.08996403686221624, "name": "Cosine Precision@10"}, {"type": "cosine_recall@1", "value": 0.6713868285007867, "name": "Cosine Recall@1"}, {"type": "cosine_recall@3", "value": 0.8208586199145875, "name": "Cosine Recall@3"}, {"type": "cosine_recall@5", "value": 0.8650258485052821, "name": "Cosine Recall@5"}, {"type": "cosine_recall@10", "value": 0.8996403686221622, "name": "Cosine Recall@10"}, {"type": "cosine_ndcg@10", "value": 0.7891859267149058, "name": "Cosine Ndcg@10"}, {"type": "cosine_mrr@10", "value": 0.7533213277818758, "name": "Cosine Mrr@10"}, {"type": "cosine_map@100", "value": 0.7563423273488229, "name": "Cosine Map@100"}, {"type": "dot_accuracy@1", "value": 0.6713868285007867, "name": "Dot Accuracy@1"}, {"type": "dot_accuracy@3", "value": 0.8208586199145875, "name": "Dot Accuracy@3"}, {"type": "dot_accuracy@5", "value": 0.8650258485052821, "name": "Dot Accuracy@5"}, {"type": "dot_accuracy@10", "value": 0.8996403686221622, "name": "Dot Accuracy@10"}, {"type": "dot_precision@1", "value": 0.6713868285007867, "name": "Dot Precision@1"}, {"type": "dot_precision@3", "value": 0.2736195399715291, "name": "Dot Precision@3"}, {"type": "dot_precision@5", "value": 0.17300516970105642, "name": "Dot Precision@5"}, {"type": "dot_precision@10", "value": 0.08996403686221624, "name": "Dot Precision@10"}, {"type": "dot_recall@1", "value": 0.6713868285007867, "name": "Dot Recall@1"}, {"type": "dot_recall@3", "value": 0.8208586199145875, "name": "Dot Recall@3"}, {"type": "dot_recall@5", "value": 0.8650258485052821, "name": "Dot Recall@5"}, {"type": "dot_recall@10", "value": 0.8996403686221622, "name": "Dot Recall@10"}, {"type": "dot_ndcg@10", "value": 0.7891859267149058, "name": "Dot Ndcg@10"}, {"type": "dot_mrr@10", "value": 0.7533213277818758, "name": "Dot Mrr@10"}, {"type": "dot_map@100", "value": 0.7563423273488229, "name": "Dot Map@100"}]}]}]}
task
[ "TEXT_CLASSIFICATION" ]
46,519