huggingface / transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
https://huggingface.co/docs/transformers.js
Apache License 2.0
12.15k stars 771 forks source link

PatchTSTModel, PatchTSTConfig, & Trainer #1047

Open Datakunskap opened 2 days ago

Datakunskap commented 2 days ago

Feature request

Implementation of: PatchTSTModel, PatchTSTConfig, & Trainer

Source: https://github.com/huggingface/transformers/blob/v4.46.3/src/transformers/models/patchtst/modeling_patchtst.py#L1142

Motivation

https://github.com/huggingface/transformers

Your contribution

Submitting a PR

xenova commented 2 days ago

Opened PR here. Let me know if that works for you 👍

Datakunskap commented 1 day ago

@xenova You're amazing! We were about to switch over to Python. You saved our Typescript devs. Thank you!

We have one more request to make it on par with the Python transformer library. Would it be possible to add the following Models as well?

Kindest regards, Datakunskap

xenova commented 1 day ago

Sure thing! I've added them here.

Example usage for PatchTSMixerForPrediction can be found here.

Note for the config, you an simply do:

import { AutoConfig } from '@huggingface/transformers';

const config = await AutoConfig.from_pretrained('hf-internal-testing/tiny-random-PatchTSTModel'); 
console.log(config);