HuggingFace镜像/YingLong_110m
模型介绍
文件和版本
分析

YingLong

YingLong 模型在本论文中被提出。此版本在780亿个时间点上进行了预训练。更多详情可参见我们的GitHub和项目页面。

快速开始

pip install xformers transformers
pip install flash-attn --no-build-isolation
git clone https://github.com/Dao-AILab/flash-attention && cd flash-attention
cd csrc/rotary && pip install .
cd ../layer_norm && pip install .

不需要使用Flash Attention。如果您使用V100或其他不支持Flash Attention的GPU,只需在model.py文件中将FlashAttention2Available = RequirementCache("flash-attn>=2.0.0.post1")修改为FlashAttention2Available = False即可运行。

import torch
from transformers import AutoModelForCausalLM

# load pretrain model
model = AutoModelForCausalLM.from_pretrained('qcw2333/YingLong_110m', trust_remote_code=True,torch_dtype=torch.bfloat16).cuda()

# prepare input
batch_size, lookback_length = 1, 2880
seqs = torch.randn(batch_size, lookback_length).bfloat16().cuda()

# generate forecast
prediction_length = 96
output = model.generate(seqs, future_token=prediction_length)

print(output.shape)

还提供了一个示例笔记本,链接为 here。长期预测任务和gift-eval任务的示例代码可在 link 获取。

引用

即将推出...

联系方式

如果您有任何问题或想使用代码,欢迎联系:

Xue Wang (xue.w@alibaba-inc.com)

Tian Zhou (tian.zt@alibaba-inc.com)

许可证

本模型采用 cc-by-4.0 许可证。