library_name: transformers
license: mit
datasets:
- allenai/dolma
language:
- en
FANformer-1B模型卡片
模型描述
- 模型名称: FANformer-1B
- 非嵌入参数量: 11亿
- 训练token量: 1万亿
- 发布日期: 2025年3月
- 模型类型: 增强周期性建模的解码器架构大语言模型
- 许可协议: MIT许可证
- 代码仓库: GitHub
- 论文: arXiv:2502.21309
FANformer-1B是通过创新周期性机制增强语言建模能力的自回归模型。其改进架构(olmo/model.py)引入了FAN层这一新颖组件,可有效捕捉训练数据中的周期性模式,实现更优的学习效率和性能表现。
训练细节
- 硬件配置: 80块A100 40G显卡
- 训练数据: Dolma数据集子集(OLMo-1B训练语料)
- 最大上下文长度: 2048个token
使用场景
- 主要用途: 通用文本生成与理解
- 下游任务: 可微调用于摘要生成、问答系统、对话系统等场景
- 局限性: 可能继承训练数据中的偏见,低资源语言性能不作保证
使用方法
推理示例:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("dongyh/FANformer-1B", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("dongyh/FANformer-1B", trust_remote_code=True)
input_text = "周期性概念作为自然界、人类社会乃至抽象系统的基本组织原则。从天体运行支配四季潮汐的规律节律,到生物钟调控生命体睡眠代谢的循环模式,重复出现的模式在混沌中创造稳定。生态系统中捕食者-猎物种群波动维持平衡,碳循环确保地球气候韧性。人类文明围绕农业周期、宗教历法和经济波动构建——丰收节庆标记季节馈赠,金融市场在繁荣萧条间摇摆。量子层面波函数揭示的固有周期性,正是物质现实的基石。这种普遍存在的循环模式使预测、适应与创新成为可能:通过识别周期规律,我们"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(inputs.input_ids, max_length=512, do_sample=True, temperature=0.6, top_p=0.8)
print(tokenizer.decode(outputs[0]))
性能评估
标准测试集 |
Llama-3.2-1B |
TinyLLaMA-v1.1 (3T) |
MobiLLaMA-1B (1.3T) |
OLMo-1B (2T) |
OpenELM-1_1B (1.8T) |
OLMo-1B-0724 (3T) |
AMD-OLMo-1B (1.3T) |
FANformer-1B (1T) |
arc_easy |
56.84 |
55.47 |
56.65 |
57.28 |
55.43 |
56.65 |
63.64 |
72.456 |
arc_challenge |
38.13 |
32.68 |
32.00 |
31.06 |
32.34 |
32.34 |
33.70 |
43.813 |
hellaswag |
64.00 |
61.47 |
61.80 |
62.92 |
64.81 |
66.12 |
63.61 |
64.758 |
piqa |
73.80 |
73.56 |
75.30 |
75.14 |
75.57 |
75.08 |
75.57 |
75.547 |
boolq |
64.30 |
55.99 |
60.83 |
61.74 |
63.58 |
66.18 |
60.58 |
64.924 |
sciq |
92.30 |
89.30 |
88.20 |
87.00 |
90.60 |
92.70 |
93.20 |
94.80 |
winogrande |
61.20 |
59.43 |
59.27 |
59.98 |
61.72 |
61.72 |
61.64 |
61.80 |
openbookqa |
46.00 |
36.80 |
35.40 |
36.20 |
36.20 |
35.60 |
35.80 |
48.20 |
gsm8k |
6.83 |
1.82 |
0.00 |
2.50 |
2.81 |
8.95 |
2.88 |
15.74 |
平均得分 |
55.93 |
51.84 |
52.16 |
52.65 |
53.67 |
55.04 |
54.51 |
60.23 |
引用文献
@article{dong2025fanformer,
title={FANformer: 通过有效周期性建模改进大语言模型},
author={董艺弘 and 李戈 and 姜雪 and 陶永定 and 张可驰 and 朱浩 and 刘寰宇 and 丁嘉政 and 李佳 and 邓金亮 and 梅宏},
journal={arXiv预印本 arXiv:2502.21309},
year={2025}
}
@article{dong2024fan,
title={FAN: 傅里叶分析网络},
author={董艺弘 and 李戈 and 陶永定 and 姜雪 and 张可驰 and 李佳 and 苏静 and 张俊 and 徐晶晶},
journal={arXiv预印本 arXiv:2410.02675},
year={2024}
}