--- library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: "Copy env-production to .env (setting up)\nHi, very sorry to ask, dont know\ \ if here would be ok... but where can I get the env-production file to be copied\ \ to .env? because here https://github.com/frappe/frappe_docker/wiki/Easiest-Install\ \ says so but cant be found...```\r\n\r\nThanks,\r\n\r\n$ **cp env-production\ \ .env**\r\n$ sed -i -e \"s/FRAPPE_VERSION=edge/FRAPPE_VERSION=v12.9.4/g\" .env\r\ \n$ sed -i -e \"s/ERPNEXT_VERSION=edge/ERPNEXT_VERSION=v12.6.2/g\" .env\r\n$ sed\ \ -i -e \"s/email@example.com/hello@myweb.com/g\" .env\r\n$ sed -i -e \"s/erp.example.com/erp.myweb.com/g\"\ \ .env\r\n$ sed -i -e \"s/ADMIN_PASSWORD=admin/ADMIN_PASSWORD=supersecret/g\"\ \ .env\r\n$ sed -i -e \"s/MYSQL_ROOT_PASSWORD=admin/MYSQL_ROOT_PASSWORD=longsecretpassword/g\"\ \ .env\r\n```" - text: "[BUG] Unwanted \"supported\" or \"unknown\" message\n## User Story\r\nI see\ \ string \"supported\" on \"start\" command.\r\n\r\n## Basic info\r\n\r\n* **Distro:**\ \ Ubuntu 20.04.3 LTS\r\n* **Game:** Any\r\n* **Command:** start\r\n* **LinuxGSM\ \ version:** v21.5.0\r\n\r\n## Further Information\r\n\r\nProbably it is debug\ \ message from deps check. \"supported\" is replaced by \"unknown\" on unsupported\ \ distro.\r\nThis LGSM is upgraded from previous version.\r\n```\r\naaa@hostname:~$\ \ ./arma3server start\r\nsupported\r\nsupported\r\nsupported\r\n[ OK ] Starting\ \ arma3server: server name\r\n```\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce\ \ the behaviour:\r\n1. Use start command\r\n\r\n## Expected behaviour\r\nSee only\ \ \"[ OK ] Starting arma3server: server name\" message," - text: 'Docs are still using `DBT_PROJECT_DIR` This was switched to `ARTEFACTS_ DBT_PROJECT_DIR` last release.' - text: 'Document CNI upgrade strategies Document supported CNIs + supported CNI upgrade strategies.' - text: 'Read the Docs Implement read the docs for documentation' inference: true --- # SetFit This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. 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 - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 384 tokens - **Number of Classes:** 4 classes ### 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 | |:--------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | bug | | | feature | | | documentation | | | question | | ## 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("setfit_model_id") # Run inference preds = model("Read the Docs Implement read the docs for documentation") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:---------|:------| | Word count | 3 | 186.9402 | 10443 | | Label | Training Sample Count | |:--------------|:----------------------| | bug | 47 | | documentation | 33 | | feature | 60 | | question | 44 | ### Training Hyperparameters - batch_size: (16, 2) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 20 - 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.0022 | 1 | 0.7229 | - | | 0.1087 | 50 | 0.2697 | - | | 0.2174 | 100 | 0.1336 | - | | 0.3261 | 150 | 0.0209 | - | | 0.4348 | 200 | 0.0026 | - | | 0.5435 | 250 | 0.001 | - | | 0.6522 | 300 | 0.0008 | - | | 0.7609 | 350 | 0.0006 | - | | 0.8696 | 400 | 0.0005 | - | | 0.9783 | 450 | 0.0004 | - | ### Framework Versions - Python: 3.11.6 - SetFit: 1.1.0 - Sentence Transformers: 3.0.1 - Transformers: 4.44.2 - PyTorch: 2.4.1+cu121 - Datasets: 2.21.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} } ```