faq.mdx 25.2 KB
Newer Older
bailuo's avatar
readme  
bailuo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
---
title: "TimeGPT FAQ"
description: "Frequently asked questions about TimeGPT"
icon: "question"
---

<CardGroup cols={3}>
  <Card
    title="Quick Start"
    icon="rocket"
    href="/forecasting/timegpt_quickstart"
  >
    Get started with TimeGPT in minutes
  </Card>
  <Card
    title="SDK Installation"
    icon="box"
    href="/setup/setting_up_your_api_key"
  >
    Set up the Python SDK for TimeGPT
  </Card>
  <Card
    title="Pricing"
    icon="credit-card"
    href="/introduction/timegpt_subscription_plans"
  >
    Review subscription plans and pricing
  </Card>
</CardGroup>

## Commonly asked questions
<Tabs>
  <Tab title="TimeGPT" icon="chart-line">
    <Accordion title="What is TimeGPT?">
      TimeGPT is the first foundation model for time series forecasting. It produces accurate forecasts for new time series across diverse domains using only historical values as inputs. The model reads time series data sequentially from left to right, similar to how humans read a sentence. It examines windows of past data as "tokens" and predicts what comes next based on identified patterns that extrapolate into the future. Beyond forecasting, TimeGPT supports other time series tasks, including what-if scenarios and anomaly detection.
    </Accordion>

    <Accordion title="Is TimeGPT based on a Large Language Model (LLM)?">
      <Check>
        TimeGPT is specifically designed for time series data, not text.
      </Check>

      No, TimeGPT is not based on any large language model. While it follows the principle of training a large transformer model on a vast dataset, its architecture specifically handles time series data and minimizes forecasting errors.
    </Accordion>

    <Accordion title="How do I get started with TimeGPT?">
      To get started with TimeGPT, register for an account at [dashboard.nixtla.io](https://dashboard.nixtla.io/). After confirming your signup via email, you can access your dashboard with account details.

      <Steps>
        <Step title="Sign up" icon="plus">
          Create an account at [dashboard.nixtla.io](https://dashboard.nixtla.io/)
        </Step>
        <Step title="Confirm email" icon="envelope">
          Click the confirmation link in your email
        </Step>
        <Step title="Get API key" icon="key">
          Find your API key in the dashboard under "API Keys"
        </Step>
        <Step title="Install SDK" icon="download">
          Run `pip install nixtla` to install the Python SDK
        </Step>
      </Steps>
    </Accordion>

    <Accordion title="How accessible is TimeGPT and what are the usage costs?">
      For a deeper understanding of TimeGPT, refer to the [research paper](https://arxiv.org/pdf/2310.03589.pdf). While some aspects of the model architecture remain confidential, registration for TimeGPT is open to everyone.
    </Accordion>

    <Accordion title="How can I use TimeGPT?">
      You can use TimeGPT through the Python SDK or the REST API.

      <Tabs>
        <Tab title="Python SDK" icon="code">
          ```python Python SDK Forecast Example
          from nixtla import NixtlaClient

          # Initialize client with your API key
          client = NixtlaClient(api_key="your_api_key")

          # Make a forecast
          forecast = client.forecast(df, h=7)
          ```
        </Tab>

        <Tab title="REST API" icon="server">
          ```bash REST API Forecast Example
          curl -X POST "https://api.nixtla.io/timegpt" \
            -H "accept: application/json" \
            -H "x-api-key: your_api_key" \
            -H "Content-Type: application/json" \
            -d '{"df": [{"ds": "2023-01-01", "y": 100}, ...], "h": 7}'
          ```
        </Tab>
      </Tabs>

      Both methods require an API key, obtained upon registration and available in your dashboard under "API Keys".
    </Accordion>
  </Tab>

  <Tab title="API Key" icon="key">
    <Accordion title="What is an API key?">
      An API key is a unique string of characters that authenticates your requests when using the Nixtla SDK, ensuring only authorized users can make requests.

      <Warning>
        Your API key is personal and should not be shared with anyone or exposed in client-side code.
      </Warning>
    </Accordion>

    <Accordion title="Where can I get an API key?">
      Upon registration, you receive an API key available in your [dashboard](https://dashboard.nixtla.io/) under "API Keys". Keep your API key confidential.
    </Accordion>

    <Accordion title="How do I use my API key?">
      To integrate your API key into your development workflow, refer to the [Setting Up Your API Key](/setup/setting_up_your_api_key) tutorial.

      <CodeGroup>
        <CodeBlock title="Python API Key Usage" icon="code">
          ```python Python API Key Example
          from nixtla import NixtlaClient

          client = NixtlaClient(api_key="your_api_key")
          ```
        </CodeBlock>

        <CodeBlock title="REST API Key Usage" icon="server">
          ```bash REST API Key Example
          curl -X POST "https://api.nixtla.io/timegpt" \
            -H "accept: application/json" \
            -H "x-api-key: your_api_key" \
            -H "Content-Type: application/json" \
            -d '{"df": [{"ds": "2023-01-01", "y": 100}, ...], "h": 7}'
          ```
        </CodeBlock>
      </CodeGroup>
    </Accordion>

    <Accordion title="How can I check the status of my API key?">
      Check your API key status with the [`validate_api_key` method](https://nixtlaverse.nixtla.io/nixtla/nixtla_client.html#nixtlaclient-validate-api-key) of the `NixtlaClient` class.

      ```python Validate API Key Example
      from nixtla import NixtlaClient

      nixtla_client = NixtlaClient(api_key='my_api_key_provided_by_nixtla')
      nixtla_client.validate_api_key()
      ```

      ```bash Log Output
      INFO:nixtla.nixtla_client:Happy Forecasting! :), If you have questions or need support, please email support@nixtla.io

      True
      ```
    </Accordion>

    <Accordion title="What if my API key isn't validating?">
      When you validate your API key and it returns `False`:
      * If you are targeting an Azure endpoint, getting `False` from the `NixtlaClient.validate_api_key` method is expected. You can skip this step when targeting an Azure endpoint and proceed diretly to forecasting instead.
      * If you are not taregting an Azure endpoint, then you should check the following:
        * Make sure you are using the latest version of the SDK (Python or R).
        * Check that your API key is active in your dashboard by visiting https://dashboard.nixtla.io/.
        * Consider any firewalls your organization might have. There may be restricted access. If so, you can whitelist our endpoint https://api.nixtla.io/.
          * To use Nixtla's API, you need to let your system know that our endpoint is ok, so it will let you access it. Whitelisting the endpoint isn't something that Nixtla can do on our side. It's something that needs to be done on the user's system. This is a bit of an [overview on whitelisting](https://www.csoonline.com/article/569493/whitelisting-explained-how-it-works-and-where-it-fits-in-a-security-program.html).
          * If you work in an organization, please work with an IT team. They're likely the ones setting the security and you can talk with them to get it addressed. If you run your own systems, then it's something you should be able to update, depending on the system you're using.
    </Accordion>
  </Tab>

  <Tab title="Privacy & Security" icon="shield-check">
    <Accordion title="How do you ensure the privacy and security of my data?">
      At Nixtla, we take privacy and security very seriously. To ensure you understand our data policies, refer to these documents:

      <CardGroup cols={3}>
        <Card title="Privacy Notice" icon="shield-check" href="/about/privacy-notice">
          Our data privacy policies
        </Card>
        <Card title="License Agreement" icon="file" href="https://github.com/Nixtla/nixtla/blob/main/LICENSE">
          Python SDK license
        </Card>
        <Card title="Terms and Conditions" icon="scale-balanced" href="/about/terms-and-conditions">
          TimeGPT service terms
        </Card>
      </CardGroup>

      <Info>
        We offer a self-hosted version of TimeGPT, allowing you complete control over your data - your data never leaves your premises. You can either use [Docker](/setup/docker) or a [Python wheel file](/setup/python_wheel). If interested in these option, contact us at `support@nixtla.io`.
      </Info>
    </Accordion>
  </Tab>

  <Tab title="Troubleshooting" icon="wrench">
    <h3 className="text-lg font-semibold mb-3">Common errors and warnings</h3>

    <Accordion title="Error message: Invalid API key">
      ```python Invalid API Key Error
      ApiError: status_code: 401, body: {'data': None, 'message': 'Invalid API key', 'details': 'Key not found', 'code': 'A12', 'requestID': 'E7F2BBTB2P', 'support': 'If you have questions or need support, please email support@nixtla.io'}
      ```

      <Note>
        This error occurs when your TimeGPT API key is invalid or not set up correctly. Use the `validate_api_key` method to verify it or check that you copied it correctly from the "API Keys" section of your [dashboard](https://dashboard.nixtla.io/).
      </Note>
    </Accordion>

    <Accordion title="Error message: Too many requests">
      ```python Too Many Requests Error
      ApiError: status_code: 429, body: {'data': None, 'message': 'Too many requests', 'details': 'You need to add a payment method to continue using the API, do so from https://dashboard.nixtla.io', 'code': 'A21', 'requestID': 'NCJDK7KSJ6', 'support': 'If you have questions or need support, please email support@nixtla.io'}
      ```

      <Note>
        This error occurs when you have exhausted your free credits and need to add a payment method to continue using TimeGPT. Add a payment method in the "Billing" section of your [dashboard](https://dashboard.nixtla.io/).
      </Note>
    </Accordion>

    <Accordion title="Error message: WriteTimeout">
      <Note>
        A `WriteTimeout` error indicates the request exceeded allowable processing time. This commonly happens with large datasets. To fix this, increase the `num_partitions` parameter in the [`forecast` method](https://nixtlaverse.nixtla.io/nixtla/nixtla_client.html#nixtlaclient-forecast) of the `NixtlaClient` class, or use a distributed backend.
      </Note>
    </Accordion>
  </Tab>

  <Tab title="Support" icon="headphones">
    Get Help with TimeGPT
    For more questions or support, reach out through one of our channels:

    <CardGroup cols={3}>
      <Card
        title="GitHub Issues"
        icon="bug"
        href="https://github.com/Nixtla/nixtla/issues"
      >
        For technical questions or bugs
      </Card>
      <Card title="Email Support" icon="envelope" href="mailto:support@nixtla.io">
        For general inquiries or support
      </Card>
      <Card
        title="Slack Community"
        icon="comments"
        href="https://join.slack.com/t/nixtlacommunity/shared_invite/zt-2ebtgjbip-QMSnvm6ED1NF5vi4xj_13Q"
      >
        Connect with our team and community
      </Card>
    </CardGroup>

    <Tip className="mt-6">
      When reporting issues, include your API key status, SDK version, and sample code to help us assist you more quickly.
    </Tip>
  </Tab>
</Tabs>

## Features & Capabilities

<Tabs>
  <Tab title="Input Data" icon="database">
    <Accordion title="What is the input to TimeGPT?">
      TimeGPT accepts pandas dataframes in [long format](https://www.theanalysisfactor.com/wide-and-long-data/#comments) with these necessary columns:

      <ParamField name="ds" type="timestamp" required>
        Timestamp in format `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`
      </ParamField>

      <ParamField name="y" type="numeric" required>
        The target variable to forecast
      </ParamField>

      <Tip>
        You can also pass a DataFrame with a DatetimeIndex without the `ds` column.
      </Tip>

      <CodeGroup>
        <CodeBlock title="Example Input DataFrame" icon="table">
          ```python Example Input DataFrame
          import pandas as pd

          # Create sample data
          data = {
              'ds': ['2023-01-01', '2023-01-02', '2023-01-03'],
              'y': [10, 12, 15]
          }

          df = pd.DataFrame(data)
          df['ds'] = pd.to_datetime(df['ds'])

          print(df)
          ```
        </CodeBlock>

        <CodeBlock title="Printed DataFrame Output" icon="clipboard">
          ```
                   ds   y
          0 2023-01-01  10
          1 2023-01-02  12
          2 2023-01-03  15
          ```
        </CodeBlock>
      </CodeGroup>

      TimeGPT also works with [distributed dataframes](/forecasting/forecasting-at-scale/computing_at_scale) like `dask`, `spark`, and `ray`.
    </Accordion>

    <Accordion title="Can TimeGPT handle multiple time series?">
      <Check>
        Yes, TimeGPT can forecast multiple time series simultaneously.
      </Check>

      For guidance on forecasting multiple time series at once, consult the [Multiple Series](/forecasting/timegpt_quickstart) tutorial.

      <CodeGroup>
        <CodeBlock title="Multiple Series Forecasting Example" icon="chart-bar">
          ```python Multiple Series Forecasting
          # Example of forecasting multiple series
          from nixtla import NixtlaClient

          # Initialize client
          client = NixtlaClient(api_key="your_api_key")

          # Group identifier for multiple series
          df['unique_id'] = df['store_id'] + '_' + df['item_id']

          # Forecast multiple series at once
          forecast = client.forecast(df, h=7, level=[80, 90])
          ```
        </CodeBlock>
      </CodeGroup>
    </Accordion>
  </Tab>

  <Tab title="Forecasting" icon="chart-bar">
    <Accordion title="Does TimeGPT support forecasting with exogenous variables?">
      <Check>
        Yes, TimeGPT can incorporate external variables into forecasts.
      </Check>

      For instructions on incorporating exogenous variables to TimeGPT, see the [Exogenous Variables](/forecasting/exogenous-variables/numeric_features) tutorial. For incorporating calendar dates, the [Holidays and Special Dates](https://docs.nixtla.io/docs/tutorials-holidays_and_special_dates) tutorial might help. For categorical variables, refer to the [Categorical Variables](https://docs.nixtla.io/docs/tutorials-categorical_variables) tutorial.

      <CodeGroup>
        <CodeBlock title="Exogenous Variables Forecast Example" icon="code-branch">
          ```python Exogenous Variables Forecast
          # Forecasting with exogenous variables
          forecast = client.forecast(
              df,
              h=7,
              X_df=exog_df  # DataFrame with exogenous variables
          )
          ```
        </CodeBlock>
      </CodeGroup>
    </Accordion>

    <Accordion title="Can TimeGPT be used to forecast historical data?">
      Yes. To forecast historical data using TimeGPT, use cross-validation. See the full tutorial on [cross-validation](/forecasting/evaluation/cross_validation).

      <CodeGroup>
        <CodeBlock title="Historical Forecast Example" icon="clock">
          ```python Historical Forecast
          # Get in-sample predictions
          historical_forecast = client.cross_validation(
              df,
              h=12,
              n_windows=11 # Set as many windows as you want
          )
          ```
        </CodeBlock>
      </CodeGroup>


    </Accordion>

    <Accordion title="What is the maximum forecast horizon allowed by TimeGPT?">
      TimeGPT has no maximum forecast horizon, but performance decreases as the horizon increases. When the forecast horizon exceeds the data's seasonal length (for example, more than 12 months for monthly data), you will receive this message:

      <Info>
        `WARNING:nixtla.nixtla_client:The specified horizon "h" exceeds the model horizon. This may lead to less accurate forecasts. Please consider using a smaller horizon`
      </Info>

      For details, refer to the [Long Horizon in Time Series](/forecasting/model-version/longhorizon_model) tutorial.

      <Tip>
        For best results, keep your forecast horizon within the seasonal pattern of your data.
      </Tip>
    </Accordion>
  </Tab>

  <Tab title="Advanced Features" icon="gear">
    <Accordion title="Can TimeGPT be used for anomaly detection?">
      <Check>
        Yes, TimeGPT includes anomaly detection capabilities.
      </Check>

      To learn how to use TimeGPT for anomaly detection, refer to the [Anomaly Detection](/anomaly_detection/real-time/introduction) tutorial.

      <CodeGroup>
        <CodeBlock title="Anomaly Detection Example" icon="bug">
          ```python Anomaly Detection Example
          # Detect anomalies in time series
          anomalies = client.detect_anomalies(df)
          ```
        </CodeBlock>
      </CodeGroup>

    </Accordion>

    <Accordion title="Does TimeGPT support cross-validation?">
      Yes. To learn how to use TimeGPT for cross-validation, refer to the [Cross-Validation](/forecasting/evaluation/cross_validation) tutorial.

      <CodeGroup>
        <CodeBlock title="Cross-Validation Example" icon="check">
          ```python Cross-Validation Example
          # Perform cross-validation
          cv_results = client.cross_validation(
              df,
              h=7,
              k=3,  # Number of folds
              test_size=7  # Size of each test fold
          )
          ```
        </CodeBlock>
      </CodeGroup>
    </Accordion>

    <Accordion title="Can TimeGPT be used for uncertainty quantification?">
      Yes. For more information, explore the [Prediction Intervals](/forecasting/probabilistic/prediction_intervals) and [Quantile Forecasts](/forecasting/probabilistic/quantiles) tutorials.

      <CodeGroup>
        <CodeBlock title="Prediction Intervals Example" icon="chart-bar">
          ```python Prediction Intervals Example
          # Generate prediction intervals
          forecast_with_intervals = client.forecast(
              df,
              h=7,
              level=[80, 90, 95]  # Confidence levels
          )
          ```
        </CodeBlock>
      </CodeGroup>


    </Accordion>
  </Tab>

  <Tab title="Data Requirements" icon="clipboard-check">
    <Accordion title="Can TimeGPT handle large datasets?">
      <Check>
        Yes, TimeGPT works with distributed computing frameworks for large datasets.
      </Check>

      For large datasets with hundreds of thousands or millions of time series, we recommend using a distributed backend. TimeGPT works with several [distributed computing frameworks](/forecasting/forecasting-at-scale/computing_at_scale), including [Spark](/forecasting/forecasting-at-scale/spark), [Ray](/forecasting/forecasting-at-scale/ray), and [Dask](/forecasting/forecasting-at-scale/dask).

      <CodeGroup>
        <CodeBlock title="Using Dask for Large Datasets" icon="desktop">
          ```python Using Dask Example
          import dask.dataframe as dd

          # Convert to Dask DataFrame
          dask_df = dd.from_pandas(df, npartitions=4)

          # Forecast using Dask backend
          forecast = client.forecast(dask_df, h=7)
          ```
        </CodeBlock>
      </CodeGroup>
    </Accordion>

    <Accordion title="Can TimeGPT be used with limited/short data?">
      TimeGPT supports any amount of data for generating point forecasts and can produce results with just one observation per series. When using arguments such as `level`, `finetune_steps`, `X_df` (exogenous variables), or `add_history`, additional data points are necessary depending on data frequency. For more details, refer to the [Data Requirements](/data_requirements/data_requirements) tutorial.

      <Info>
        While TimeGPT can work with minimal data, more historical data typically produces better forecasts.
      </Info>
    </Accordion>

    <Accordion title="Can TimeGPT handle missing values?">
      <Warning>
        TimeGPT cannot handle missing values or series with irregular timestamps.
      </Warning>

      For more information, see the [Forecasting Time Series with Irregular Timestamps](/forecasting/special-topics/irregular_timestamps) and [Dealing with Missing Values](/data_requirements/missing_values) tutorials.
    </Accordion>
  </Tab>

  <Tab title="Visualization" icon="chart-bar">
    <Accordion title="How can I plot the TimeGPT forecast?">
      The `NixtlaClient` class has a [`plot` method](/reference/sdk_reference#nixtlaclient-plot) for visualizing forecasts. This method works only in interactive environments such as Jupyter notebooks, not in Python scripts.

      <CodeGroup>
        <CodeBlock title="Plotting Forecast Example" icon="image">
          ```python Plotting Forecast Example
          # Plot forecast
          client.plot(
              historical_data=df,
              forecast_data=forecast,
              level=[80, 95]  # Optional: show prediction intervals
          )
          ```
        </CodeBlock>
      </CodeGroup>


    </Accordion>

    <Accordion title="Does TimeGPT support polars?">
      Currently, TimeGPT does not support polars.
    </Accordion>

    <Accordion title="Does TimeGPT produce stable predictions?">
      <Check>
        Yes, TimeGPT produces consistent results for identical inputs.
      </Check>

      TimeGPT is engineered for stability, ensuring consistent results for identical input data. Given the same dataset, the model will produce the same forecasts.
    </Accordion>

    <Accordion title="Can TimeGPT forecast data with simple pattern such as a straight line or sine wave?">
      While not the primary use case for TimeGPT, it can generate solid results on simple data patterns like straight lines. Zero-shot predictions might not always meet expectations, but fine-tuning allows TimeGPT to quickly grasp trends and produce accurate forecasts. For more details, refer to the [Improve Forecast Accuracy with TimeGPT](/forecasting/improve_accuracy) tutorial.
    </Accordion>
  </Tab>

  <Tab title="Fine-tuning" icon="sliders">
    <Accordion title="What is fine-tuning?">
      <Check>
        Fine-tuning improves TimeGPT's performance for your specific data patterns.
      </Check>

      TimeGPT was trained on the largest publicly available time series dataset, covering domains including finance, retail, healthcare, and more. This comprehensive training enables TimeGPT to produce accurate forecasts for new time series without additional training (zero-shot learning).

      While the zero-shot model provides a solid baseline, TimeGPT performance often improves through fine-tuning. During this process, the TimeGPT model undergoes additional training using your specific dataset, starting from the pre-trained parameters.


      <CodeGroup>
        <CodeBlock title="Fine-tuning Usage Example" icon="wrench">
          ```python Fine-tuning Example
          # Fine-tune with 100 steps
          forecast = client.forecast(
              df,
              h=7,
              finetune_steps=100,
              finetune_loss="mse"  # Mean Squared Error
          )
          ```
        </CodeBlock>
      </CodeGroup>

      For a comprehensive guide on fine-tuning, refer to the [fine-tuning](/forecasting/fine-tuning/steps) and [fine-tuning with a specific loss function](/forecasting/fine-tuning/custom_loss) tutorials.
    </Accordion>

    <Accordion title="Do I have to fine-tune every series?">
      No, you do not need to fine-tune every series individually. When using the `finetune_steps` parameter, the model fine-tunes across all series in your dataset simultaneously. This cross-learning approach allows the model to learn from multiple series at once, which can improve individual forecasts.

      <Info>
        Selecting the right number of fine-tuning steps may require experimentation. As fine-tuning steps increase, the model becomes more specialized to your dataset but takes longer to train and may become more prone to overfitting.
      </Info>
    </Accordion>

    <Accordion title="Can I save fine-tuned parameters?">
      <Check>
        Yes, you can save and reuse fine-tuned models.
      </Check>

      You can fine-tune the TimeGPT model, save it, and reuse it later. For detailed instructions, see our guide on [Re-using Fine-tuned Models](/forecasting/fine-tuning/save_reuse_delete_finetuned_models).

      <Tabs>
        <Tab title="Save Model" icon="save">
          ```python Save Fine-tuned Model
          # Fine-tune and save the model
          fine_tuned_parameters = client.forecast(
              df,
              h=7,
              finetune_steps=100,
              return_model=True  # Return the fine-tuned parameters
          )

          # Save to file
          import pickle
          with open("fine_tuned_model.pkl", "wb") as f:
              pickle.dump(fine_tuned_parameters, f)
          ```
        </Tab>

        <Tab title="Load Model" icon="folder-open">
          ```python Load Fine-tuned Model
          # Load the fine-tuned parameters
          import pickle
          with open("fine_tuned_model.pkl", "rb") as f:
              fine_tuned_parameters = pickle.load(f)

          # Use the fine-tuned model
          forecast = client.forecast(
              new_df,
              h=7,
              model=fine_tuned_parameters
          )
          ```
        </Tab>
      </Tabs>
    </Accordion>
  </Tab>
</Tabs>

<Note>
  Need more help? Contact our [support team](mailto:support@nixtla.io).
</Note>