Add examples for all HuggingFace models (#2102)#2247
Open
AlexCatarino wants to merge 5 commits intoQuantConnect:masterfrom
Open
Add examples for all HuggingFace models (#2102)#2247AlexCatarino wants to merge 5 commits intoQuantConnect:masterfrom
AlexCatarino wants to merge 5 commits intoQuantConnect:masterfrom
Conversation
Add documentation sections with algorithm examples for all HuggingFace models in the popular models table that were missing examples: - Sentiment Analysis: covers 8 text classification models - Fill-Mask: covers BERT, DistilBERT, RoBERTa, DeBERTa - Text Generation: covers GPT-2, Gemma, DeepSeek - Moirai: time series forecasting (small/base/large) - MOMENT: time series foundation model - Granite TTM: IBM lightweight time series forecasting - Chronos-Bolt: efficient Chronos variant Update the model table to link every model to its example page. Fix AventIQ-AI model category from Time Series Forecasting to Text Classification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ntConnect#2102) - Change all example blocks from skip-test to testable - Fix Chronos-Bolt to use predict() instead of predict_quantiles() to match the same pattern as Chronos-T5 - Rewrite Moirai, MOMENT, and Granite TTM examples to use their correct package APIs (uni2ts, momentfm, tsfm_public) Sentiment Analysis, Fill-Mask, Text Generation, and Chronos-Bolt examples pass cloud backtesting. Moirai, MOMENT, and Granite TTM require uni2ts, momentfm, and tsfm_public packages respectively, which need to be pre-installed in the cloud environment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… entry (QuantConnect#2102) - Delete 09 Moirai, 10 MOMENT, 11 Granite TTM sections (require uni2ts/momentfm/tsfm_public, not available in QC Cloud; tracked in QuantConnect/Lean#9340) - Fix 00.json: correct Chronos-Bolt folder key from "09" to "12" - Remove example links for Moirai, MOMENT, Granite TTM rows in hugging-face-table.html Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ct#2102) Add EXAMPLES entries for sentiment-analysis, fill-mask, text-generation, and chronos-bolt pages; regenerate the HTML table. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…onnect#2102) The mrm8488/distilroberta placeholder model takes >10 minutes to backtest on QC Cloud due to model size and repeated inference over 4 months of data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resources/machine-learning/hugging-face-table.htmlfor the newly covered modelsuni2ts,momentfm, andtsfm_publicpackages that are not available in QC Cloud (tracked in [Library Upgrade] uni2ts, momentfm, tsfm_public (Moirai, MOMENT, Granite TTM) Lean#9340)Note: This PR does not resolve #2102. The remaining models (Moirai, MOMENT, Granite TTM) depend on QuantConnect/Lean#9340 to add their required packages to QC Cloud. Examples for those models will be added in a follow-up PR once the packages are available.
Model Backtest Results
Each example supports multiple interchangeable models. Results below use the same algorithm with different models swapped in.
Sentiment Analysis
mrm8488/distilroberta-finetuned-financial-news-sentiment-analysisahmedrachid/FinancialBERT-Sentiment-AnalysisAventIQ-AI/sentiment-analysis-for-stock-market-sentimentbardsai/finance-sentiment-fr-basecardiffnlp/twitter-roberta-base-sentiment-latestnickmuchi/deberta-v3-base-finetuned-finance-text-classificationnickmuchi/distilroberta-finetuned-financial-text-classificationnickmuchi/sec-bert-finetuned-finance-classificationStephanAkkerman/FinTwitBERT-sentimentFill-Mask
distilbert/distilbert-base-uncasedFacebookAI/roberta-basegoogle-bert/bert-base-uncasedmicrosoft/deberta-baseText Generation
openai-community/gpt2google/gemma-7bdeepseek-ai/DeepSeek-R1-Distill-Llama-70BChronos-Bolt
autogluon/chronos-bolt-baseTest plan