Skip to content
decisionintelligencePublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

HORAI

HORAI 用于多模态时序预测。输入包括历史时序、图像,以及文本。

模型权重和加载代码见 Hugging Face 上的 DecisionIntelligence/HORAI。

安装依赖

建议使用 Python 3.10 或 3.11。先按操作系统和 CUDA 版本安装匹配的 PyTorch 与 torchvision。 PyTorch 安装说明

python -m pip install 'transformers==4.49.0' 'peft==0.14.0' \
  safetensors timm einops numpy pandas scikit-learn pillow matplotlib

准备权重和数据

horai/ 是模型目录。克隆 GitHub 源码后,在项目根目录使用 Hugging Face CLI 下载权重。

hf download DecisionIntelligence/HORAI model.safetensors --local-dir ./horai

目录中的 qwen/ 提供分词文件,vit/ 提供视觉编码器的结构和配置。视觉权重与词嵌入均从 HORAI checkpoint 读取。

horai/
├── README.md
├── config.json
├── model.safetensors
├── configuration_horai.py
├── modeling_horai.py
├── ts_generation_mixin.py
├── qwen/
│   ├── tokenizer.json
│   ├── tokenizer_config.json
│   ├── vocab.json
│   └── merges.txt
└── vit/
    ├── config.json
    ├── configuration_intern_vit.py
    └── modeling_intern_vit.py

以 Agriculture 为例,CSV 放在 dataset/Agriculture.csv,图像放在 dataset/Agriculture/image/。CSV 使用 OT 作为默认预测列,fact 作为外源文本列。

运行零样本预测

在项目根目录执行以下命令。此示例用 158 个历史时间步预测接下来的 6 步。

python run_longExp.py \
  --is_training 0 \
  --data Agriculture \
  --root_path ./dataset \
  --data_path Agriculture.csv \
  --model_path ./horai \
  --features S \
  --seq_len 158 \
  --pred_len 6 \
  --inference_token_len 12 \
  --batch_size 1 \
  --num_workers 0 \
  --gpu 0

批量运行可用 bash scripts/run_forecasting_zeroshot.sh。

发布到 Hugging Face

将 horai/ 的内容上传到模型仓库根目录。加载示例见 模型卡。

hf upload DecisionIntelligence/HORAI ./horai .

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages