FarGlot
A Transformer-based SocialNLP toolkit for Farcaster.
Installation
pip install farglot
Examples
from farglot import CastAnalyzer
sentiment_analyzer=CastAnalyzer.sequence_analzyer_from_model_name(
hub_address="nemes.farcaster.xyz:2283",
model_name="pysentimiento/robertuito-sentiment-analysis"
)
sentiment_analyzer.predict_cast(fid=2, hash_hex="0bcdcbf006ec22b79f37f2cf2a09c33413883937")
# {'NEG': 0.051998768001794815, 'NEU': 0.22470703721046448, 'POS': 0.7232941389083862}
sentiment_analyzer.predict_casts_by_fid(fid=2)
# {'NEG': 0.03734538331627846, 'NEU': 0.505352795124054, 'POS': 0.4573018550872803}
Generate a Training Corpus from a Hub
Install the FarGlot CLI
pip install "farglot[cli]"
Define Training Set Classifier(s)
{
"name": "labels",
"default_value": 1 // optional
}
For multi-label classfication:
[
{
"name": "class_one",
"default_value": 1 // optional
},
{
"name": "class_two",
"default_value": 2 // optional
},
{
"name": "class_three",
"default_value": 3 // optional
}
]
Usage
farglot init
farglot set-classifers-path /path/to/class_configs.json
farglot set-hub-db-path /path/to/.rocks/rocks.hub._default
farglot new-training-set --out ./data/training-set.csv
Tuning
TODO: Example of fine-tuning and uploading dataset and model to Hugging Face
Tuning Resources
Not sure how to where to start? Check out the following blog posts on tuning an LLM:
This largely is largely adapted off of pysentimiento.
Metadata
Release files for farglot 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| farglot-0.1.3.tar.gz | 32.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| farglot-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.6 kB
Release files / farglot-0.1.3.tar.gz
| Download URL | farglot-0.1.3.tar.gz |
|---|---|
| Size | 32.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dcde866bd3bee4f72933dfa9a95f8293f118a8e94e1c4a84e554a5c24e96976e
|
|
BLAKE2b-256 checksum How to use checksums |
39cb0a678ac4f895cd79937082e2c3055ffee44c49564dfeb3316c9e0c06f68e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.15 CPython/3.8.12 Darwin/22.5.0
|
Release files / farglot-0.1.3-py3-none-any.whl
| Download URL | farglot-0.1.3-py3-none-any.whl |
|---|---|
| Size | 50.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43b78b6f8e395451fe4ccdd7e64d6ead3f53a75a53545e0c17892479071a95b8
|
|
BLAKE2b-256 checksum How to use checksums |
07b310869a59a5a88097bd5aa60275a18b85968a80cd3ae5e790f15e7d3893c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.15 CPython/3.8.12 Darwin/22.5.0
|
Security for farglot 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.