ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

timesfm Skill

โดย google-research★ 35,5671 skill

ติดตั้ง

ใช้ทำอะไรได้

TimesFM เป็นโมเดลพื้นฐานสำหรับข้อมูลอนุกรมเวลาที่ผ่านการฝึกมาแล้ว พัฒนาโดย Google Research ใช้สำหรับพยากรณ์ข้อมูลอนุกรมเวลา

แปลอัตโนมัติจากคำอธิบายของผู้ทำ · ทีมยังไม่ได้ตรวจ

  • ต่อแบบ ไฟล์คำสั่งให้ AI อ่าน ไม่ต่อบริการใด
  • บัญชีหรือคีย์ ไม่ต้องใส่คีย์
  • หมวด ข้อมูลและค้นคว้า
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

ใช้คู่กับ

MCP ที่ต่อ AI เข้ากับบริการในงานเดียวกัน

Firebase MCP

Gives AI development tools Firebase-specific capabilities and expertise.

โดย firebaseใช้กันมาก↓ 4.9M/สัปดาห์★ 4.5K ดาวรวมทั้งรีโปอัปเดต 12 เดือนที่ผ่านมา

MCP · ต่อบริการรันบนเครื่อง

Supabase

server ทางการของ Supabase ให้ AI สร้างตาราง ถามข้อมูล และดูการตั้งค่าโปรเจกต์ในฐานข้อมูล Supabase ของคุณ

โดย supabaseใช้กันมาก↓ 245.5K/สัปดาห์★ 3K ดาวรวมทั้งรีโปอัปเดต 3 วันที่ผ่านมา

MCP · ต่อบริการบนเครื่องหรือคลาวด์✓ เจ้าของบริการ · supabase.com

Dbx

Query databases from AI agents using connections configured in DBX.

โดย t8y2ใช้กันมาก↓ 9.4K/สัปดาห์★ 30.4Kอัปเดต 7 เดือนที่ผ่านมา

MCP · ต่อบริการรันบนเครื่อง

ชุดคำสั่ง (Skill) 1 ชุดจาก google-research ให้ AI อ่านแล้วทำงานตามวิธีนี้ · ไม่ใช่ MCP server

Skill ต่างจาก MCP ยังไง

MCP = มือ

ต่อ AI เข้ากับบริการหรือข้อมูลข้างนอก เช่น อ่าน Notion หรือสร้างใบแจ้งหนี้ ต้องมีโปรแกรมหรือ server ทำงานอยู่

Skill = คู่มือ

ไฟล์ข้อความที่สอน AI ว่างานนี้ทำยังไง ไม่ต่อบริการใด

บางตัวคล้ายกัน: Skill บางตัวมีสคริปต์เรียกเครื่องมือ และ MCP บางตัวส่งแค่ความรู้ ให้ดูที่งานที่อยากทำเป็นหลัก

ใช้กับแอปไหน

ผู้ทำไม่ได้ระบุ · Skill แบบ SKILL.md ใช้ได้กับแอปที่รองรับ Agent Skills เช่น Claude Code, Codex และ Cursor

ติดตั้ง

ปลอดภัยไหม

  • ใครทำ

    บัญชี GitHub google-research (องค์กร) เปิดมา 8 ปี

  • คนใช้และการดูแล

    ★ 35,567 ดาว · แก้โค้ดล่าสุด 13 พ.ย. 2569

  • มีสคริปต์ไหม

    มีสคริปต์ 11 ไฟล์ที่รันบนเครื่องได้: examples/global-temperature/run_example.sh, examples/anomaly-detection/detect_anomalies.py, examples/covariates-forecasting/demo_covariates.py, examples/finetuning/finetune_lora.py และอีก 7 ไฟล์

  • ใช้อินเทอร์เน็ตไหม

    สคริปต์ที่เรียกอินเทอร์เน็ต: examples/covariates-forecasting/demo_covariates.py

  • แก้ค่าตั้งทั้งเครื่องไหม

    ไม่พบ hook หรือการเขียนค่าตั้งของเครื่อง

ตรวจอัตโนมัติจากไฟล์ใน repo ที่ commit 918df02 (อ่านไฟล์อย่างเดียว ไม่ได้รัน) ไม่ใช่การรับรองความปลอดภัย อ่านแล้วตัดสินใจเอง

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่ใช้ แล้วหน้านี้จะแสดงเฉพาะวิธีติดตั้งของแอปนั้น

ทางที่ 1อัปโหลดเข้า claude.ai (เว็บและแอป)

อัปโหลดใน claude.ai ไม่ผ่าน เพราะคำอธิบายยาวเกิน 200 ตัวอักษร (751 ตัวอักษร) ใช้ทาง "ให้ AI ติดตั้งให้" แทน

ทางที่ 1ให้ Claude Code ติดตั้งให้

คัดลอกประโยคนี้ไปวางในแชตของ Claude Code

ติดตั้งไว้ที่ไหน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ให้ใช้ได้ทุกโปรเจกต์ของฉัน โดยวางไว้ที่ ~/.claude/skills/timesfm-forecasting อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอก path เต็มที่จะติดตั้ง รอฉันตกลงก่อน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ลงโปรเจกต์ที่แชตนี้เปิดอยู่ (ที่ .claude/skills/timesfm-forecasting) อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอกชื่อโปรเจกต์และ path เต็มที่จะติดตั้ง รอฉันตกลงก่อน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

เปิด Claude Code ใหม่ แล้วพิมพ์ /timesfm-forecasting หรือสั่งงานที่ตรงเรื่อง Claude จะเลือกใช้เอง

ตรวจกับเอกสารทางการล่าสุด 12 พ.ย. 2569 · แหล่ง: code.claude.com

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.claude/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    git clone --depth 1 https://github.com/google-research/timesfm.git /tmp/popnx-skill-google-research-timesfm-918df02 && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-google-research-timesfm-918df02/timesfm-forecasting' ~/.claude/skills/timesfm-forecasting
  3. เปิด Claude Code ใหม่ แล้วพิมพ์ /timesfm-forecasting หรือสั่งงานที่ตรงเรื่อง Claude จะเลือกใช้เอง

Skill ที่ติดตั้งเองใช้ได้ในแอป ChatGPT บนคอม, Codex CLI และส่วนขยาย Codex ใน IDE · ChatGPT บนเว็บและมือถือใช้ Skill ที่ติดตั้งเองไม่ได้ ใช้ได้เฉพาะ Skill ที่มากับปลั๊กอินในไดเรกทอรี

แอป ChatGPT บนคอม

แอป ChatGPT บนคอมมี Codex อยู่ในตัว Codex อ่าน Skill จากโฟลเดอร์ ~/.agents/skills

ทางที่ 1ให้ ChatGPT ติดตั้งให้

เปิด Codex ในแอป ChatGPT บนคอม แล้ววางประโยคนี้ในแชต

ติดตั้งไว้ที่ไหน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ให้ใช้ได้ทุกโปรเจกต์ของฉัน โดยวางไว้ที่ ~/.agents/skills/timesfm-forecasting อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอก path เต็มที่จะติดตั้ง รอฉันตกลงก่อน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ลงโปรเจกต์ที่แชตนี้เปิดอยู่ (ที่ .agents/skills/timesfm-forecasting) อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอกชื่อโปรเจกต์และ path เต็มที่จะติดตั้ง รอฉันตกลงก่อน

AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

ทางที่ 2วางโฟลเดอร์เอง

วางโฟลเดอร์ timesfm-forecasting ไว้ที่ ~/.agents/skills/timesfm-forecasting

~ คือโฟลเดอร์บ้านของคุณ ($HOME)

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.agents/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    git clone --depth 1 https://github.com/google-research/timesfm.git /tmp/popnx-skill-google-research-timesfm-918df02 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-google-research-timesfm-918df02/timesfm-forecasting' ~/.agents/skills/timesfm-forecasting

หลังติดตั้ง

  • แอป ChatGPT บนคอม: เปิด Skills ในแถบข้างเพื่อดูว่า Skill ขึ้นแล้ว
  • เรียกใช้: ใน ChatGPT พิมพ์ @ แล้วเลือก Skill · ใน Codex CLI หรือส่วนขยายใน IDE พิมพ์ /skills หรือพิมพ์ $ แล้วตามด้วยชื่อ Skill
  • Codex เห็น Skill ที่ติดตั้งใหม่เอง ถ้ายังไม่ขึ้นให้ปิดแล้วเปิด Codex ใหม่

ตรวจกับเอกสารทางการล่าสุด 15 พ.ย. 2569 · แหล่ง: learn.chatgpt.com

ChatGPT บนเว็บและมือถือ

ใช้ Skill ที่ติดตั้งเองไม่ได้ ใช้ได้เฉพาะ Skill ที่มากับปลั๊กอินในไดเรกทอรี

อยากใช้ Skill นี้กับ ChatGPT ให้ใช้แอป ChatGPT บนคอมตามวิธีด้านบน

ตรวจกับเอกสารทางการล่าสุด 15 พ.ย. 2569 · แหล่ง: learn.chatgpt.com

ทางที่ 1ให้ Codex ติดตั้งให้

คัดลอกประโยคนี้ไปวางในแชตของ Codex · ใช้ได้ทั้ง Codex ในแอป ChatGPT บนคอม, Codex CLI และส่วนขยายใน IDE

ติดตั้งไว้ที่ไหน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ให้ใช้ได้ทุกโปรเจกต์ของฉัน โดยวางไว้ที่ ~/.agents/skills/timesfm-forecasting อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอก path เต็มที่จะติดตั้ง รอฉันตกลงก่อน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ลงโปรเจกต์ที่แชตนี้เปิดอยู่ (ที่ .agents/skills/timesfm-forecasting) อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอกชื่อโปรเจกต์และ path เต็มที่จะติดตั้ง รอฉันตกลงก่อน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

Codex เห็น Skill ที่ติดตั้งใหม่เอง ถ้ายังไม่ขึ้นให้ปิดแล้วเปิด Codex ใหม่ · เรียกใช้: ใน ChatGPT พิมพ์ @ แล้วเลือก Skill · ใน Codex CLI หรือส่วนขยายใน IDE พิมพ์ /skills หรือพิมพ์ $ แล้วตามด้วยชื่อ Skill

ตรวจกับเอกสารทางการล่าสุด 15 พ.ย. 2569 · แหล่ง: learn.chatgpt.com

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.agents/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    git clone --depth 1 https://github.com/google-research/timesfm.git /tmp/popnx-skill-google-research-timesfm-918df02 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-google-research-timesfm-918df02/timesfm-forecasting' ~/.agents/skills/timesfm-forecasting
  3. เปิด Codex ใหม่ แล้วสั่งงานที่ตรงเรื่อง Codex จะเห็น skill นี้ในรายการ

ทางที่ 1ให้ Cursor ติดตั้งให้

คัดลอกประโยคนี้ไปวางในแชตของ Cursor

ติดตั้งไว้ที่ไหน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ให้ใช้ได้ทุกโปรเจกต์ของฉัน โดยวางไว้ที่ ~/.cursor/skills/timesfm-forecasting อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอก path เต็มที่จะติดตั้ง รอฉันตกลงก่อน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ลงโปรเจกต์ที่แชตนี้เปิดอยู่ (ที่ .cursor/skills/timesfm-forecasting) อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอกชื่อโปรเจกต์และ path เต็มที่จะติดตั้ง รอฉันตกลงก่อน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

ใน Agent chat ของ Cursor พิมพ์ / แล้วเลือก timesfm-forecasting

ตรวจกับเอกสารทางการล่าสุด 12 พ.ย. 2569 · แหล่ง: cursor.com

สำหรับคนที่ใช้ Terminal

Skill คือคำสั่งที่ AI จะทำตาม อ่านไฟล์ก่อนติดตั้ง และติดตั้งเฉพาะจากผู้ทำที่เชื่อถือได้

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: คำสั่งด้านล่างใช้ใน PowerShell ไม่ได้ ให้ใช้ทาง “ให้ AI ติดตั้งให้” ด้านบนแทน

  2. คัดลอกโฟลเดอร์ skill ไปไว้ที่ ~/.cursor/skills

    คำสั่งนี้ดาวน์โหลด repo ไว้ชั่วคราว แล้วคัดลอกเฉพาะโฟลเดอร์ที่มี SKILL.md

    git clone --depth 1 https://github.com/google-research/timesfm.git /tmp/popnx-skill-google-research-timesfm-918df02 && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-google-research-timesfm-918df02/timesfm-forecasting' ~/.cursor/skills/timesfm-forecasting
  3. ใน Agent chat ของ Cursor พิมพ์ / แล้วเลือก timesfm-forecasting

ทางที่ 1ให้ AI ติดตั้งให้

สำหรับแอปอื่นที่อ่าน Skill ได้ ประโยคนี้มี path ของ Claude Code, Codex และ Cursor ให้ AI เลือกตามแอปที่ใช้ · คัดลอกประโยคนี้ไปวางในแชตของแอป

ติดตั้งไว้ที่ไหน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ให้ใช้ได้ทุกโปรเจกต์ของฉัน โดยวางไว้ที่ ~/.claude/skills/timesfm-forecasting (ถ้าเป็น Codex ใช้ ~/.agents/skills/timesfm-forecasting ถ้าเป็น Cursor ใช้ ~/.cursor/skills/timesfm-forecasting) อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอก path เต็มที่จะติดตั้ง รอฉันตกลงก่อน
ช่วยติดตั้ง Skill ชื่อ timesfm-forecasting จาก https://github.com/google-research/timesfm โฟลเดอร์ timesfm-forecasting (commit 918df02) ลงโปรเจกต์ที่แชตนี้เปิดอยู่ (ที่ .claude/skills/timesfm-forecasting ถ้าเป็น Codex ใช้ .agents/skills/timesfm-forecasting ถ้าเป็น Cursor ใช้ .cursor/skills/timesfm-forecasting) อ่านไฟล์ทั้งหมดให้ฉันดูก่อนว่ามีสคริปต์หรือแก้ค่าตั้งเครื่องไหม แล้วบอกชื่อโปรเจกต์และ path เต็มที่จะติดตั้ง รอฉันตกลงก่อน

เลือกเฉพาะโปรเจกต์ ให้วางในแชตที่เปิดอยู่ในโฟลเดอร์ของโปรเจกต์นั้น · AI จะบอก path ให้ดูก่อนติดตั้งเสมอ

AI จะบอกก่อนว่าจะทำอะไร และขออนุญาตคุณทุกขั้น

ตรวจกับเอกสารทางการล่าสุด 12 พ.ย. 2569 · แหล่ง: code.claude.com, learn.chatgpt.com, cursor.com

สำหรับคนที่ใช้ Terminal

แอปอื่นที่รองรับ Agent Skills (เช่น Gemini CLI, GitHub Copilot) เก็บ skill ในโฟลเดอร์ต่างกัน ดูคู่มือของแอปนั้น แล้วคัดลอกโฟลเดอร์ที่มี SKILL.md ไปวาง

ดูบน GitHub ↗

ตรวจโฟลเดอร์ skill กับคู่มือทางการของ Claude Code, Codex และ Cursor เมื่อ 11 พ.ย. 2569

✓ ตรวจคำสั่งแล้ว 15 พ.ย. 2569

อ่าน SKILL.md ก่อนติดตั้ง

ข้อความต่อไปนี้มาจาก repo ของผู้ทำ ไม่ใช่คำสั่งของ PopNx MCP

---
name: timesfm-forecasting
description: >
  Zero-shot time series forecasting with Google's TimesFM foundation model. Use this
  skill when forecasting ANY univariate time series — sales, sensor readings, stock prices,
  energy demand, patient vitals, weather, or scientific measurements — without training a
  custom model. Supports both basic forecasting and advanced covariate forecasting (XReg)
  with dynamic and static exogenous variables. Automatically checks system RAM/GPU before
  loading the model, validates dataset fit before processing, supports CSV/DataFrame/array
  inputs, and returns point forecasts with calibrated prediction intervals. Includes a
  preflight system checker script that MUST be run before first use to verify the machine
  can load the model and handle your specific dataset.
license: Apache-2.0
metadata:
  author: Clayton Young (@borealBytes)
  version: "1.0.0"
---

# TimesFM Forecasting

## Overview

TimesFM (Time Series Foundation Model) is a pretrained decoder-only foundation model
developed by Google Research for time-series forecasting. It works **zero-shot** — feed it
any univariate time series and it returns point forecasts with calibrated quantile
prediction intervals, no training required.

This skill includes a **mandatory preflight system checker** that verifies RAM, GPU memory,
and disk space before the model is ever loaded so the agent never crashes the user's machine.

> **Key numbers**: TimesFM 2.5 uses 200M parameters (~800 MB on disk, ~1.5 GB in RAM on
> CPU, ~1 GB VRAM on GPU). The archived v1/v2 500M-parameter model needs ~32 GB RAM.
> Always run the system checker first.

## When to Use This Skill

Use this skill when:

- Forecasting **any univariate time series** (sales, demand, sensor, vitals, price, weather)
- You need **zero-shot forecasting** without training a custom model
- You want **probabilistic forecasts** with calibrated prediction intervals (quantiles)
- You have time series of **any length** (the model handles 1–16,384 context points)
- You need to **batch-forecast** hundreds or thousands of series efficiently
- You want a **foundation model** approach instead of hand-tuning ARIMA/ETS parameters
- You need **covariate forecasting** with exogenous variables (price, promotions, holidays, day-of-week effects) → use `forecast_with_covariates()` (TimesFM 2.5 + `pip install timesfm[xreg]`)


Do **not** use this skill when:

- You need classical statistical models with coefficient interpretation → use `statsmodels`
- You need time series classification or clustering → use `aeon`
- You need multivariate vector autoregression or Granger causality → use `statsmodels`
- Your data is tabular (not temporal) → use `scikit-learn`
- You cannot install optional dependencies → XReg requires scikit-learn and JAX


> **Note on Anomaly Detection**: TimesFM does not have built-in anomaly detection, but you
> can use the **quantile forecasts as prediction intervals** — values outside the 90% CI
> (q10–q90) are statistically unusual. See `examples/anomaly-detection/` for a full example.

## ⚠️ Mandatory Preflight: System Requirements Check

**CRITICAL — ALWAYS run the system checker before loading the model for the first time.**

```bash
python scripts/check_system.py
```

This script checks:

1. **Available RAM** — warns if below 4 GB, blocks if below 2 GB
2. **GPU availability** — detects CUDA/MPS devices and VRAM
3. **Disk space** — verifies room for the ~800 MB model download
4. **Python version** — requires 3.10+
5. **Existing installation** — checks if `timesfm` and `torch` are installed

> **Note:** Model weights are **NOT stored in this repository**. TimesFM weights (~800 MB)
> download on-demand from HuggingFace on first use and cache in `~/.cache/huggingface/`.

```mermaid
flowchart TD
    start["🚀 Run check_system.py"] --> ram{"RAM ≥ 4 GB?"}
    ram -->|"Yes"| gpu{"GPU available?"}
    ram -->|"No (2-4 GB)"| warn_ram["⚠️ Warning: tight RAM<br/>CPU-only, small batches"]
    ram -->|"No (< 2 GB)"| block["🛑 BLOCKED<br/>Insufficient memory"]
    warn_ram --> disk
    gpu -->|"CUDA / MPS"| vram{"VRAM ≥ 2 GB?"}
    gpu -->|"CPU only"| cpu_ok["✅ CPU mode<br/>Slower but works"]
    vram -->|"Yes"| gpu_ok["✅ GPU mode<br/>Fast inference"]
    vram -->|"No"| cpu_ok
    gpu_ok --> disk{"Disk ≥ 2 GB free?"}
    cpu_ok --> disk
    disk -->|"Yes"| ready["✅ READY<br/>Safe to load model"]
    disk -->|"No"| block_disk["🛑 BLOCKED<br/>Need space for weights"]
```

### Dataset Preflight (NEW)

Before loading your actual data, verify it will fit in memory:

```bash
# Quick estimate for your dataset
python scripts/check_system.py \
  --num-series 1000 \
  --context-length 1024 \
  --horizon 24 \
  --batch-size 32 \
  --estimate-only
```

This will show you the estimated memory requirements and warn if your dataset is too large.

**Memory Estimation Formula**:
`RAM ≈ 0.8 GB (model) + 0.5 GB (overhead) + (0.2 MB × num_series × context_length / 1000)`

**Example Outputs**:

✅ **Dataset Fits**:
```
Total CPU memory: 2.34 GB
Total GPU memory: 2.15 GB
```

⚠️ **Dataset Too Large**:
```
Dataset requires ~12.5 GB RAM but system has 8.0 GB.
Try: context_length=512 or process in chunks of 50 series.
```

### Hardware Requirements by Model Version

| Model | Parameters | RAM (CPU) | VRAM (GPU) | Disk | Context |
| ----- | ---------- | --------- | ---------- | ---- | ------- |
| **TimesFM 2.5** (recommended) | 200M | ≥ 4 GB | ≥ 2 GB | ~800 MB | up to 16,384 |
| TimesFM 2.0 (archived) | 500M | ≥ 16 GB | ≥ 8 GB | ~2 GB | up to 2,048 |
| TimesFM 1.0 (archived) | 200M | ≥ 8 GB | ≥ 4 GB | ~800 MB | up to 2,048 |

> **Recommendation**: Always use TimesFM 2.5 unless you have a specific reason to use an
> older checkpoint. It is smaller, faster, and supports 8× longer context.

## 🔧 Installation

### Step 1: Verify System (always first)

```bash
python scripts/check_system.py
```

### Step 2: Install TimesFM

```bash
# Using uv (fast)
uv pip install timesfm[torch]

# Or using pip
pip install timesfm[torch]

# For JAX/Flax backend (faster on TPU/GPU)
uv pip install timesfm[flax]
```

### Step 3: Install PyTorch for Your Hardware

```bash
# CUDA 12.1 (NVIDIA GPU)
pip install torch>=2.0.0 --index-url https://download.pytorch.org/whl/cu121

# CPU only
pip install torch>=2.0.0 --index-url https://download.pytorch.org/whl/cpu

# Apple Silicon (MPS)
pip install torch>=2.0.0  # MPS support is built-in
```

## 🎯 Quick Start

### Minimal Example

```python
import torch, numpy as np, timesfm

torch.set_float32_matmul_precision("high")

model = timesfm.TimesFM_2p5_200M_torch.from_pretrained(
    "google/timesfm-2.5-200m-pytorch"
)
model.compile(timesfm.ForecastConfig(
    max_context=1024, max_horizon=256, normalize_inputs=True,
    use_continuous_quantile_head=True, force_flip_invariance=True,
    infer_is_positive=True, fix_quantile_crossing=True,
))

point, quantiles = model.forecast(horizon=24, inputs=[
    np.sin(np.linspace(0, 20, 200)),  # any 1-D array
])
# point.shape == (1, 24)         — median forecast
# quantiles.shape == (1, 24, 10) — 10th–90th percentile bands
```

### Forecast with Covariates (XReg)

TimesFM 2.5+ supports exogenous variables through `forecast_with_covariates()`.
Requires `pip install timesfm[xreg]`.

```python
point, quantiles = model.forecast_with_covariates(
    inputs=inputs,
    dynamic_numerical_covariates={"price": price_arrays},
    dynamic_categorical_covariates={"holiday": holiday_arrays},
    static_categorical_covariates={"region": region_labels},
    xreg_mode="xreg + timesfm",  # or "timesfm + xreg"
)
```

### Anomaly Detection (via Quantile Intervals)

```python
point, q = model.forecast(horizon=H, inputs=[values])

lower_90 = q[0, :, 1]  # 10th percentile
upper_90 = q[0, :, 9]  # 90th percentile

actual = test_values
anomalies = (actual < lower_90) | (actual > upper_90)
```

| Severity | Condition | Interpretation |
| -------- | --------- | -------------- |
| **Normal** | Inside 80% CI | Expected beh

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบเพื่อโพสต์

ข้อมูลจาก GitHub

ดาว GitHub
35,567
ผู้ทำ
google-research
license
Apache-2.0
แก้โค้ดล่าสุด
13 พ.ย. 2569
ไฟล์ SKILL.md ใน repo (นับรวมสำเนาภาษาอื่นและแม่แบบ)
1