FinMA<T>

Models & Types · AiDotNet.Finance.NLP

FinMA (Financial Multi-Agent) neural network model for collaborative financial task solving.

Inheritance: NeuralNetworkBase<T> → FinancialModelBase<T> → FinancialNLPModelBase<T> → FinMA<T>

For Beginners

FinMA is a financial language model from the PIXIU project that can handle a wide range of financial tasks including sentiment analysis, named entity recognition in SEC filings, stock movement prediction, and financial question answering. It was instruction-tuned on 136K financial task examples, making it a versatile financial AI assistant.

Example

// Define architecture for instruction-tuned financial multi-task model (2048 tokens)
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.OneDimensional,
    taskType: NeuralNetworkTaskType.MultiClassClassification,
    inputHeight: 2048, inputWidth: 1, inputDepth: 1, outputSize: 32000);
            
// Training mode: multi-task financial LLM for sentiment, NER, and QA
var model = new FinMA<double>(architecture);
            
// ONNX inference mode: load pre-trained FinMA model
var onnxModel = new FinMA<double>(architecture, "finma.onnx");

Constructors

Constructor Summary
FinMA(NeuralNetworkArchitecture<T> architecture, FinMAOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) Creates a FinMA network in native mode for training.
FinMA(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, FinMAOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) Creates a FinMA network in native mode for training.