Instructions to use 0xMaka/based-bert-sc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 0xMaka/based-bert-sc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="0xMaka/based-bert-sc")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("0xMaka/based-bert-sc") model = AutoModelForSequenceClassification.from_pretrained("0xMaka/based-bert-sc", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from 0xMaka/based-bert-sc: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/0xMaka/based-bert-sc/resolve/main/README.md
- Command line
-
hf download hf://0xMaka/based-bert-sc/README.md
-
curl -L -o README.md https://huggingface.co/0xMaka/based-bert-sc/resolve/main/README.md
1.53 kB
| datasets: | |
| - 0xMaka/trading-candles-subset-sc-format | |
| language: | |
| - en | |
| metrics: | |
| - accuracy | |
| - f1 | |
| widget: | |
| - text: 'identify candle: 17284.58,17264.41,17284.58,17264.41' | |
| example_title: Bear | |
| - text: 'identify candle: open: 17343.43, close: 17625.18, high: 17804.68, low: 17322.15' | |
| example_title: Bull | |
| license: gpl | |
| # Based Bert for sequence classification | |
| This model is a POC and shouldn't be used for any production task. | |
| ## Model description | |
| Based Bert SC is a text classification bot for binary classification of a trading candles opening and closing prices. | |
| ## Uses and limitations | |
| This model can reliably return the bullish or bearish status of a candle given the opening, closing, high and low, in a format shown. | |
| It will have trouble if the order of the numbers change (even if tags are included). | |
| ### How to use | |
| You can use this model directly with a pipeline | |
| ```python | |
| >>> from transformers import pipeline | |
| >>> pipe = pipeline("text-classification", model="0xMaka/based-bert-sc") | |
| >>> text = "identify candle: open: 21788.19, close: 21900, high: 21965.23, low: 21788.19" | |
| >>> pipe(text) | |
| [{'label': 'Bullish', 'score': 0.9999682903289795}] | |
| ``` | |
| ## Finetuning | |
| For parameters: https://github.com/0xMaka/based-bert-sc/blob/main/trainer.py | |
| This model was fine tuned on an RTX-3060-Mobile | |
| ``` | |
| // BUS_WIDTH = 192 | |
| // CLOCK_RATE = 1750 | |
| // DDR_MULTI = 8 // DDR6 | |
| // BWTheoretical = (((CLOCK_RATE * (10 ** 6)) * (BUS_WIDTH/8)) * DDR_MULI) / (10 ** 9) | |
| // BWTheoretical == 336 GB/s | |
| ``` | |
| Self-measured effective (GB/s): 316.280736 | |