end2end_agnews / README.md
davidberenstein1957's picture
Upload README.md with huggingface_hub
62dd1cd
---
library_name: Transformers
tags:
- text-classification
- transformers
- argilla
---
<!-- This model card has been generated automatically according to the information the `ArgillaTrainer` had access to. You
should probably proofread and complete it, then remove this comment. -->
# Model Card for *Model ID*
This model has been created with [Argilla](https://docs.argilla.io), trained with *Transformers*.
<!-- Provide a quick summary of what the model is/does. -->
## Model training
Training the model using the `ArgillaTrainer`:
```python
# Load the dataset:
dataset = FeedbackDataset.from_argilla("...")
# Create the training task:
def formatting_func(sample):
text = sample["text"]
label = sample["label"][0]["value"]
return(text, label)
task = TrainingTask.for_text_classification(formatting_func=formatting_func)
# Create the ArgillaTrainer:
trainer = ArgillaTrainer(
dataset=dataset,
task=task,
framework="transformers",
model="bert-base-cased",
)
trainer.update_config({
"evaluation_strategy": "epoch",
"logging_dir": "./logs",
"logging_steps": 1,
"num_train_epochs": 1,
"output_dir": "textcat_model_transformers",
"use_mps_device": true
})
trainer.train(output_dir="None")
```
You can test the type of predictions of this model like so:
```python
trainer.predict("This is awesome!")
```
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** [More Information Needed]
- **Language(s) (NLP):** [More Information Needed]
- **License:** [More Information Needed]
- **Finetuned from model [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.*
-->
<!--
### Downstream Use [optional]
*This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app*
-->
<!--
### Out-of-Scope Use
*This section addresses misuse, malicious use, and uses that the model will not work well for.*
-->
<!--
## Bias, Risks, and Limitations
*This section is meant to convey both technical and sociotechnical limitations.*
-->
<!--
### Recommendations
*This section is meant to convey recommendations with respect to the bias, risk, and technical limitations.*
-->
<!--
## Training Details
### Training Metrics
*Metrics related to the model training.*
-->
<!--
### Training Hyperparameters
- **Training regime:** (fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision)
-->
<!--
## 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]
### Framework Versions
- Python: 3.9.17
- Argilla: 1.21.0-dev
<!--
## 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
-->
<!--
## Glossary [optional]
*If relevant, include terms and calculations in this section that can help readers understand the model or model card.*
-->
<!--
## Model Card Authors [optional]
*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.*
-->