/ Модель

Характеристики

Контекст
131 072 токена
Параметры
7,5 млрд
Размер весов
16,1 ГБ
Лицензия
Apache 2.0
Архитектура
llama · dense
Базовая модель
Meta-Llama-3.1-8B
Библиотека
transformers
Опубликована
26 мая 2025

Finance-Llama-8B

Генерация текстаТекст → текст5 профессий

Дообученная на финансовых инструкциях модель Llama для ответов на финансовые вопросы, анализа текста и диалогов.

593скачиваний за 30 дней48лайковвеса обновлены11 фев 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Finance-Llama-8B — дообученная Tarun7r языковая модель семейства Llama на базе unsloth/Meta-Llama-3.1-8B. Она предназначена для финансовых задач и диалогов: отвечает на вопросы, помогает рассуждать о финансах, распознаёт сущности и тональность, классифицирует темы и обрабатывает многошаговые беседы.

Модель использует плотную архитектуру LlamaForCausalLM, содержит 7,5 млрд параметров и принимает текст для генерации текста. Указанная длина контекста — до 131 072 токенов. Обучение проводилось на наборе Finance-Instruct-500k, объединяющем более 500 тысяч инструкций и примеров из финансовых источников. В карточке заявлена многоязычная обработка, однако конкретный основной язык модели не установлен; метаданные карточки указывают английский.

Модель может быть полезна для прототипирования финансовых помощников, анализа финансового текста и подготовки к CFA Level 1. Результаты экзамена в карточке описаны как приблизительные и не подтверждают точность в реальных финансовых сценариях. Модель выпущена по лицензии Apache-2.0; её создатели не гарантируют точность и надёжность ответов и отказываются от ответственности за финансовые последствия использования.

Сценарии применения

  • ответы на вопросы о финансах и экономике
  • объяснение финансовых понятий и рассуждений
  • извлечение финансовых сущностей из текста
  • анализ тональности финансовых сообщений
  • классификация финансовых тем
  • подготовка учебных вопросов для CFA Level 1

Ограничения

Ответы могут быть неточными и не гарантируют надёжности для принятия финансовых решений; результаты CFA Level 1 в карточке обозначены как приблизительные. Хотя карточка заявляет многоязычное обучение, метаданные подтверждают только английский язык.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Card for Finance-Llama-8B

This model is a fine-tuned version of unsloth/Meta-Llama-3.1-8B on the Josephgflowers/Finance-Instruct-500k dataset. It's designed for financial tasks, reasoning, and multi-turn conversations.

Key Features

  • Extensive Coverage: Trained on over 500,000 entries spanning financial QA, reasoning, sentiment analysis, topic classification, multilingual NER, and conversational AI.📚
  • Multi-Turn Conversations: Capable of rich dialogues emphasizing contextual understanding and reasoning.
  • Diverse Data Sources: Includes entries from Cinder, Sujet-Finance-Instruct-177k, Phinance Dataset, BAAI/IndustryInstruction_Finance-Economics, Josephgflowers/Financial-NER-NLP, and many other high-quality datasets.
  • Financial Specialization: Tailored for financial reasoning, question answering, entity recognition, sentiment analysis, and more.

Dataset Details 💾

Finance-Instruct-500k Dataset

Overview Finance-Instruct-500k is a comprehensive and meticulously curated dataset designed to train advanced language models for financial tasks, reasoning, and multi-turn conversations. Combining data from numerous high-quality financial datasets, this corpus provides over 500,000 entries, offering unparalleled depth and versatility for finance-related instruction tuning and fine-tuning.

The dataset includes content tailored for financial reasoning, question answering, entity recognition, sentiment analysis, address parsing, and multilingual natural language processing (NLP). Its diverse and deduplicated entries make it suitable for a wide range of financial AI applications, including domain-specific assistants, conversational agents, and information extraction systems.

Key Features of the Dataset

  • Extensive Coverage: Over 500,000 entries spanning financial QA, reasoning, sentiment analysis, topic classification, multilingual NER, and conversational AI.🌍
  • Multi-Turn Conversations: Rich dialogues emphasizing contextual understanding and reasoning.🗣️
  • Diverse Data Sources: Includes entries from Cinder, Sujet-Finance-Instruct-177k, Phinance Dataset, BAAI/IndustryInstruction_Finance-Economics, Josephgflowers/Financial-NER-NLP, and many other high-quality datasets. 📖

CFA Level 1 Mock Exam Results

The CFA (Chartered Financial Analyst) exam is widely recognized as one of the most challenging professional certifications in the financial industry, typically requiring over 1000 hours of study across all three levels. The evaluation concept for the CFA Level 1 mock exam was inspired by the work on mukaj/Llama-3.1-Hawkish-8B. Below is a comparison of different models on a sample Level 1 CFA Mock Exam, demonstrating how Finance-Llama-8B performs on the exam. The same prompt was used for all models. The results presented are approximated and have been tested across multiple mock exam papers to ensure consistency. A sample mock exam with a comparison to other models is shown below.

The mock exams are designed to challenge candidates with varying levels of difficulty, reflecting the rigorous nature of the CFA Level 1 exam. Pass rates for these mock exams typically range from 64% to 72%, with an average pass rate of around 67%. This average is notably higher than the 12-year average Minimum Passing Score (MPS) of 65% for all CFA years, indicating the effectiveness of the preparation materials. For more detailed insights, visit 300hours.com/cfa-passing-score.

Usage

Ollama

You can also use this model with Ollama. Pre-built GGUF versions (FP16 and Q4_K_M) are available at: ollama.com/martain7r/finance-llama-8b

To run the FP16 version:

ollama run martain7r/finance-llama-8b:fp16

To run the Q4_K_M quantized version (smaller and faster, with a slight trade-off in quality):

ollama run martain7r/finance-llama-8b:q4_k_m

This model can be used with the transformers library pipeline for text generation.

First, make sure you have the transformers and torch libraries installed:

pip install transformers torch

Usage 🚀 Transformers Pipeline

from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
import torch

# Alternative memory-efficient loading options without bitsandbytes

model_id = "tarun7r/Finance-Llama-8B"

print("Loading model with memory optimizations...")

# Option 1: Use FP16 (half precision) - reduces memory by ~50%
try:
    print("Trying FP16 loading...")
    model = AutoModelForCausalLM.from_pretrained(
        model_id,
        torch_dtype=torch.float16,  # Half precision
        device_map="auto",          # Automatic device placement
        low_cpu_mem_usage=True,     # Efficient CPU memory usage during loading
        trust_remote_code=True
    )
    print("✓ Model loaded with FP16")
    
except Exception as e:
    print(f"FP16 loading failed: {e}")
    
    # Option 2: CPU offloading - some layers on GPU, some on CPU
    try:
        print("Trying CPU offloading...")
        model = AutoModelForCausalLM.from_pretrained(
            model_id,
            torch_dtype=torch.float16,
            device_map="balanced",      # Balance between GPU and CPU
            low_cpu_mem_usage=True,
            trust_remote_code=True
        )
        print("✓ Model loaded with CPU offloading")
        
    except Exception as e:
        print(f"CPU offloading failed: {e}")
        
        # Option 3: Full CPU loading as fallback
        print("Loading on CPU...")
        model = AutoModelForCausalLM.from_pretrained(
            model_id,
            torch_dtype=torch.float16,
            device_map="cpu",
            low_cpu_mem_usage=True,
            trust_remote_code=True
        )
        print("✓ Model loaded on CPU")

# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)
if tokenizer.pad_token is None:
    tokenizer.pad_token = tokenizer.eos_token

# Create pipeline
generator = pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer
)

print("✓ Pipeline created successfully!")


# Your existing prompt code
finance_prompt_template = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
{}

### Input:
{}

### Response:
"""

# Update the system prompt to provide a more detailed description of the chatbot's role
messages = [
    {"role": "system", "content": "You are a highly knowledgeable finance chatbot. Your purpose is to provide accurate, insightful, and actionable financial advice to users, tailored to their specific needs and contexts."},
    {"role": "user", "content": "What strategies can an individual investor use to diversify their portfolio effectively in a volatile market?"},
]

# Update the generator call to use the messages
prompt = "\n".join([f"{msg['role'].capitalize()}: {msg['content']}" for msg in messages])

print("\n--- Generating Response ---")

try:
    outputs = generator(
        prompt,
        #max_new_tokens=250,         # Reduced for memory efficiency
        do_sample=True,
        temperature=0.7,
        top_p=0.9,
        pad_token_id=tokenizer.eos_token_id,
        # Memory efficient generation settings
        num_beams=1,                # No beam search to save memory
        early_stopping=True,
        use_cache=True
    )
    
    # Extract response
    generated_text = outputs[0]['generated_text']
    response_start = generated_text.rfind("### Response:")
    if response_start != -1:
        response = generated_text[response_start + len("### Response:"):].strip()
        print("\n--- Response ---")
        print(response)
    else:
        print(generated_text)
        
    # Clean up GPU memory after generation
    if torch.cuda.is_available():
        torch.cuda.empty_cache()
        
except Exception as e:
    print(f"Generation error: {e}")


Citation 📌

@misc{tarun7r/Finance-Llama-8B,
  author    = {tarun7r},
  title     = {tarun7r/Finance-Llama-8B: A Llama 3.1 8B Model Fine-tuned on Josephgflowers/Finance-Instruct-500k},
  year      = {2025},
  publisher = {Hugging Face},
  journal   = {Hugging Face Model Hub},
  howpublished = {\url{https://huggingface.co/tarun7r/Finance-Llama-8B}}
}

Disclaimer & Intended Uses

Model & License

This model is an experimental research implementation based on Meta's LLaMA 3.1 architecture and is governed by the LLaMA 3.1 community license terms, with additional restrictions as outlined below. It is designed for academic and research purposes to explore the influence of financial data in training language models. Users are advised that this model is experimental and should be used at their own risk, with full responsibility for any implementation or application. This model is not a financial advisor and should not be used for financial decision-making.

Liability & Responsibility

The creators of this model:

  • Accept no responsibility for any use of the model, including any financial losses or damages incurred.
  • Provide no warranties or guarantees regarding its performance, accuracy, or reliability.
  • Make no claims about the suitability of the model for any specific purpose.

Intellectual Property & Attribution

  • All findings and opinions expressed are solely those of the authors.
  • This model is not endorsed by or affiliated with Meta, the CFA Institute, or any other institutions.
  • All trademarks and intellectual property rights belong to their respective owners.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
295c206

0 моделей