--- library_name: setfit tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer datasets: - hojzas/proj8-label2 metrics: - accuracy widget: - text: 'def first_with_given_key(iterable, key=lambda x: x):\n keys_used = {}\n for item in iterable:\n rp = repr(key(item))\n if rp not in keys_used.keys():\n keys_used[rp] = repr(item)\n yield item' - text: 'def first_with_given_key(iterable, key=lambda x: x):\n keys=[]\n for i in iterable:\n if key(i) not in keys:\n yield i\n keys.append(key(i))' - text: 'def first_with_given_key(iterable, key=repr):\n set_of_keys = set()\n lambda_key = (lambda x: key(x))\n for item in iterable:\n key = lambda_key(item)\n try:\n key_for_set = hash(key)\n except TypeError:\n key_for_set = repr(key)\n if key_for_set in set_of_keys:\n continue\n set_of_keys.add(key_for_set)\n yield item' - text: 'def first_with_given_key(iterable, key = lambda x: x):\n found_keys={}\n for i in iterable:\n if key(i) not in found_keys.keys():\n found_keys[key(i)]=i\n yield i' - text: 'def first_with_given_key(the_iterable, key=lambda x: x):\n temp_keys=[]\n for i in range(len(the_iterable)):\n if (key(the_iterable[i]) not in temp_keys):\n temp_keys.append(key(the_iterable[i]))\n yield the_iterable[i]\n del temp_keys' pipeline_tag: text-classification inference: true co2_eq_emissions: emissions: 0.11699550964562933 source: codecarbon training_type: fine-tuning on_cloud: false cpu_model: Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz ram_total_size: 251.49160385131836 hours_used: 0.002 base_model: flax-sentence-embeddings/st-codesearch-distilroberta-base --- # SetFit with flax-sentence-embeddings/st-codesearch-distilroberta-base This is a [SetFit](https://github.com/huggingface/setfit) model trained on the [hojzas/proj8-label2](https://huggingface.co/datasets/hojzas/proj8-label2) dataset that can be used for Text Classification. This SetFit model uses [flax-sentence-embeddings/st-codesearch-distilroberta-base](https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-base) 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:** [flax-sentence-embeddings/st-codesearch-distilroberta-base](https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-base) - **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:** 2 classes - **Training Dataset:** [hojzas/proj8-label2](https://huggingface.co/datasets/hojzas/proj8-label2) ### 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 | |:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 0 |