Fanformer 1B
模型简介
增强周期性建模的解码器架构大语言模型,适用于通用文本生成与理解任务。
模型特点
周期性建模增强
通过FAN层创新组件有效捕捉数据中的周期性模式,提升学习效率和性能表现
高效训练
在1万亿token训练量下实现优于同类模型的性能表现
轻量化设计
11亿参数规模在保持性能的同时降低计算资源需求
模型能力
文本生成
语言理解
知识问答
逻辑推理
使用案例
文本生成
学术写作辅助
生成包含周期性概念的科学论述文本
生成连贯性达72.45%的学术风格文本(基于arc_easy测试)
教育应用
科学问答系统
回答STEM领域基础问题
sciq测试集准确率达94.8%
🚀 FANformer-1B模型
FANformer-1B是一个拥有11亿参数的自回归语言模型,它通过有效的周期性机制来增强语言建模能力。该模型可用于通用文本生成和理解,还能针对特定任务进行微调。
🚀 快速开始
你可以按照以下代码示例进行推理:
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 = "The concept of periodicity serves as a fundamental organizing principle across the natural world, human societies, and even abstract systems. From the rhythmic cycles of celestial bodies governing seasons and tides to the biological clocks regulating sleep and metabolism in living organisms, recurring patterns create stability amid chaos. In ecosystems, predator-prey population oscillations maintain balance, while the carbon cycle ensures Earth's climate resilience. Culturally, humanity has structured civilizations around agricultural cycles, religious calendars, and economic fluctuations—harvest festivals marking seasonal abundance, financial markets swaying between boom and bust. Even at the quantum level, wave functions reveal inherent periodicity that underpins material reality. This universal recurrence enables prediction, adaptation, and innovation: by recognizing cycles, we"
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]))
✨ 主要特性
- 有效周期性建模:通过有效的周期性机制增强语言建模能力。
- 新型架构:引入FAN层,能够捕捉训练数据中的周期性模式,提高学习效率和性能。
- 多功能用途:可用于通用文本生成和理解,还能针对特定任务进行微调。
📦 安装指南
文档未提供安装步骤,可参考transformers
库的官方安装指南进行安装。
💻 使用示例
基础用法
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 = "The concept of periodicity serves as a fundamental organizing principle across the natural world, human societies, and even abstract systems. From the rhythmic cycles of celestial bodies governing seasons and tides to the biological clocks regulating sleep and metabolism in living organisms, recurring patterns create stability amid chaos. In ecosystems, predator-prey population oscillations maintain balance, while the carbon cycle ensures Earth's climate resilience. Culturally, humanity has structured civilizations around agricultural cycles, religious calendars, and economic fluctuations—harvest festivals marking seasonal abundance, financial markets swaying between boom and bust. Even at the quantum level, wave functions reveal inherent periodicity that underpins material reality. This universal recurrence enables prediction, adaptation, and innovation: by recognizing cycles, we"
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]))
📚 详细文档
模型描述
属性 | 详情 |
---|---|
模型名称 | FANformer-1B |
非嵌入参数 | 11亿 |
训练令牌 | 1万亿 |
发布日期 | 2025年3月 |
模型类型 | 仅解码器的大语言模型,具有增强的周期性建模能力 |
许可证 | MIT许可证 |
仓库 | GitHub |
论文 | arXiv:2502.21309 |
训练详情
属性 | 详情 |
---|---|
硬件 | 80个A100 40G GPU |
训练数据 | Dolma数据集的子集(OLMo-1B的训练语料库) |
最大上下文长度 | 2048个令牌 |
预期用途
- 主要用途:通用文本生成和理解。
- 下游用途:可针对总结、问答和对话等任务进行微调。
- 局限性:可能继承训练数据中的偏差,对低资源语言的性能无法保证。
评估
标准基准测试 | 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 |
Average | 55.93 | 51.84 | 52.16 | 52.65 | 53.67 | 55.04 | 54.51 | 60.23 |
🔧 技术细节
FANformer-1B的修订架构(olmo/model.py)引入了FAN层,这是一个新型组件,旨在捕捉训练数据中的周期性模式,从而提高学习效率和性能。
📄 许可证
本项目采用MIT许可证。
📖 引用
@article{dong2025fanformer,
title={FANformer: Improving Large Language Models Through Effective Periodicity Modeling},
author={Dong, Yihong and Li, Ge and Jiang, Xue and Tao, Yongding and Zhang, Kechi and Zhu, Hao and Liu, Huanyu and Ding, Jiazheng and Li, Jia and Deng, Jinliang and Mei, Hong},
journal={arXiv preprint arXiv:2502.21309},
year={2025}
}
@article{dong2024fan,
title={FAN: Fourier Analysis Networks},
author={Yihong Dong and Ge Li and Yongding Tao and Xue Jiang and Kechi Zhang and Jia Li and Jing Su and Jun Zhang and Jingjing Xu},
journal={arXiv preprint arXiv:2410.02675},
year={2024}
}
Phi 2 GGUF
其他
Phi-2是微软开发的一个小型但强大的语言模型,具有27亿参数,专注于高效推理和高质量文本生成。
大型语言模型 支持多种语言
P
TheBloke
41.5M
205
Roberta Large
MIT
基于掩码语言建模目标预训练的大型英语语言模型,采用改进的BERT训练方法
大型语言模型 英语
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基础模型的蒸馏版本,在保持相近性能的同时更轻量高效,适用于序列分类、标记分类等自然语言处理任务。
大型语言模型 英语
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一个多语言大语言模型,针对多语言对话用例进行了优化,在常见的行业基准测试中表现优异。
大型语言模型 英语
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基于100种语言的2.5TB过滤CommonCrawl数据预训练的多语言模型,采用掩码语言建模目标进行训练。
大型语言模型 支持多种语言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基于Transformer架构的英语预训练模型,通过掩码语言建模目标在海量文本上训练,支持文本特征提取和下游任务微调
大型语言模型 英语
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI发布的开放预训练Transformer语言模型套件,参数量从1.25亿到1750亿,旨在对标GPT-3系列性能,同时促进大规模语言模型的开放研究。
大型语言模型 英语
O
facebook
6.3M
198
1
基于transformers库的预训练模型,适用于多种NLP任务
大型语言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多语言大语言模型系列,包含8B、70B和405B参数规模,支持8种语言和代码生成,优化了多语言对话场景。
大型语言模型
Transformers 支持多种语言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基础版是由Google开发的文本到文本转换Transformer模型,参数规模2.2亿,支持多语言NLP任务。
大型语言模型 支持多种语言
T
google-t5
5.4M
702
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98