Skip to content

Commit

Permalink
FIX: timemixer shapes mismatch and doc update (#1138)
Browse files Browse the repository at this point in the history
* Use math.ceil to prevent shape mismatch

* Show exog support for KAN in doc

* FEAT: TimeLLM is faster and supports more LLMs (#1139)

* Fix issue #950: Reduce TimeLLM setup time for training

* Restore changes on the examples

* Revert changes to nbs/models.ipynb, nbs/models.softs.ipynb and neuralforecast/_modidx.py

* Revert changes to nbs/models.ipynb, nbs/models.softs.ipynb and neuralforecast/_modidx.py

* Refactor code to dynamically load models with AutoModel, AutoTokenizer, and AutoConfig

- Updated load_model_and_tokenizer function to use AutoModel, AutoTokenizer, and AutoConfig for flexible model loading.
- Included default model(gpt2) for cases where the specified model fails to load.
- Kept llm, llm_config, and llm_tokenizer arguments to minimize changes.
- Changed llm from storing pretrained weights to accepting pretrained model path to reduce necessary modifications.

This update enhances the flexibility and reliability of model loading based on received feedback while minimizing necessary changes.

* Refactor code to dynamically load models with AutoModel, AutoTokenizer, and AutoConfig

- Updated load_model_and_tokenizer function to use AutoModel, AutoTokenizer, and AutoConfig for flexible model loading.
- Included default model(gpt2) for cases where the specified model fails to load.
- Kept llm, llm_config, and llm_tokenizer arguments to minimize changes.
- Changed llm from storing pretrained weights to accepting pretrained model path to reduce necessary modifications.

This update enhances the flexibility and reliability of model loading based on received feedback while minimizing necessary changes.

* clear output

* modify test code

* Optimize model loading and add deprecation warning

- Simplify model loading logic
- Add constant for default model name
- Improve error handling for model loading
- Add success messages for model loading
- Implement deprecation warning for 'llm_config' and 'llm_tokenizer' parameters
- Update print messages for clarity
- Remove redundant code

This commit improves code readability, maintainability, and user experience
by providing clearer feedback and warnings about deprecated parameters.

* Resolved conflict in nbs/models.timellm.ipynb

---------

Co-authored-by: ive2go <[email protected]>
Co-authored-by: Olivier Sprangers <[email protected]>

* Consistency with math.ceil

---------

Co-authored-by: Olivier Sprangers <[email protected]>
Co-authored-by: ive2go <[email protected]>
  • Loading branch information
3 people committed Sep 16, 2024
1 parent 32662f7 commit 61e8d2d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3,278 deletions.
2 changes: 1 addition & 1 deletion nbs/docs/capabilities/01_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"|`HINT` | `AutoHINT` | Any<sup>7</sup> | Both<sup>7</sup> | Both<sup>7</sup> | F/H/S | \n",
"|`Informer` | `AutoInformer` | Transformer | Multivariate | Direct | F | \n",
"|`iTransformer` | `AutoiTransformer` | Transformer | Multivariate | Direct | - | \n",
"|`KAN` | `AutoKAN` | KAN | Univariate | Direct | - | \n",
"|`KAN` | `AutoKAN` | KAN | Univariate | Direct | F/H/S | \n",
"|`LSTM` | `AutoLSTM` | RNN | Univariate | Recursive | F/H/S | \n",
"|`MLP` | `AutoMLP` | MLP | Univariate | Direct | F/H/S | \n",
"|`MLPMultivariate` | `AutoMLPMultivariate` | MLP | Multivariate | Direct | F/H/S | \n",
Expand Down
Loading

0 comments on commit 61e8d2d

Please sign in to comment.