nicholasKluge commited on
Commit
ff6e0b9
·
1 Parent(s): 243bd07

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -29,6 +29,21 @@ This repository contains a version of [TeenyTinyLlama-162m](https://huggingface.
29
  - **Optimizer:** `torch.optim.AdamW` (learning_rate = 4e-5, epsilon = 1e-8)
30
  - **GPU:** 1 NVIDIA A100-SXM4-40GB
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ## Reproducing
33
 
34
  To reproduce the fine-tuning process, use the following code snippet:
 
29
  - **Optimizer:** `torch.optim.AdamW` (learning_rate = 4e-5, epsilon = 1e-8)
30
  - **GPU:** 1 NVIDIA A100-SXM4-40GB
31
 
32
+ ## Usage
33
+
34
+ Using `transformers.pipeline`:
35
+
36
+ ```python
37
+ from transformers import pipeline
38
+
39
+ text = "Pega a sua opinião e vai a merda com ela!"
40
+
41
+ classifier = pipeline("text-classification", model="nicholasKluge/TeenyTinyLlama-162m-HateBR")
42
+ classifier(text)
43
+
44
+ # >>> [{'label': 'TOXIC', 'score': 0.9998729228973389}]
45
+ ```
46
+
47
  ## Reproducing
48
 
49
  To reproduce the fine-tuning process, use the following code snippet: