--- license: apache-2.0 language: - en pipeline_tag: text-classification base_model: convaiinnovations/laya base_model_relation: adapter datasets: - zeroshot/twitter-financial-news-topic tags: - ariadne - laya - adapter - custom-code --- # Ariadne-Laya-FinanceTopics Classifies financial-news text into 20 topics. This **4.2 MB specialist interface** runs on a shared frozen Laya base. Switching between compatible Ariadne specialists replaces about **1 million parameters**, while the **421 million parameter base** stays in memory. Each specialist uses its own small interface. ## Use Install the included Python wheel from this downloaded model folder: ```bash pip install ./ariadne_specialists-0.2.0a1-py3-none-any.whl ``` ```python import ariadne from ariadne.specialists import Finance model = ariadne.load_specialist(Finance, model=".") result = model("The central bank raised interest rates.") print(result.label, result.score) ``` The base downloads automatically and is cached. Pass `device="cpu"` or `device="cuda:1"` to choose a device. A list of texts returns a list of predictions. Scores have not been recalibrated for this task. ## Load from Hugging Face After installing the included wheel, you can load this repository directly: ```python import ariadne from ariadne.specialists import Finance model = ariadne.load_specialist(Finance, model="GoatHerder/Ariadne-Laya-FinanceTopics") ``` Use the explicit `model=` argument with this preview wheel. The interface and pinned base are downloaded automatically and cached. Pass `revision=""` to pin a particular interface version. ## Interface The interface is a 1,024 × 1,024 linear projection plus a 1,024-element bias: **1,049,600 trainable parameters**. It sits after the base's native embeddings and before encoder block 0. It starts as the identity; training updates only this projection. The shared base has 421,293,827 parameters. Compatible specialists share one resident base in the same Python process and on the same device. ## Results All local results below use the same **4,117** requests and label task. | Model | Accuracy | Macro-F1 | |---|---:|---:| | Base Laya | 25.97% | 31.09% | | Ariadne Finance | 84.31% | 82.56% | | [leonas5555/finnews-topic-single-classify](https://huggingface.co/leonas5555/finnews-topic-single-classify) | 90.82% | 89.99% | | TF-IDF + logistic regression | 77.80% | 72.45% | The public fine-tune's training overlap with these cases is unknown, so this table does not establish a common unseen-test ranking. Full results and existing-task retention are in `metrics.json`. ## Training and scope Trained on [zeroshot/twitter-financial-news-topic](https://huggingface.co/datasets/zeroshot/twitter-financial-news-topic), revision `acbc8af2a35ccf0916124efcbe9e6cf25f191012`. One seed (0); epoch 2 selected by validation loss. LR 1e-4; only the 1,049,600 interface parameters were trained. The base embeddings, 28 encoder blocks and decision heads stayed frozen. English, single-topic inputs and the labels in `task.json`. Results cover this financial-news corpus; performance on later news and different sources remains untested. Unsupported or ambiguous requests still receive a label. Source datasets retain their own licences. Base revision: `55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851`. Independent adaptation; no affiliation with the original Laya authors.