[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-google-deepmind--ferminet":3,"tool-google-deepmind--ferminet":65},[4,23,32,40,49,57],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":22},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,2,"2026-04-10T11:13:16",[13,14,15,16,17,18,19,20,21],"图像","数据工具","视频","插件","Agent","其他","语言模型","开发框架","音频","ready",{"id":24,"name":25,"github_repo":26,"description_zh":27,"stars":28,"difficulty_score":29,"last_commit_at":30,"category_tags":31,"status":22},5784,"funNLP","fighting41love\u002FfunNLP","funNLP 是一个专为中文自然语言处理（NLP）打造的超级资源库，被誉为\"NLP 民工的乐园”。它并非单一的软件工具，而是一个汇集了海量开源项目、数据集、预训练模型和实用代码的综合性平台。\n\n面对中文 NLP 领域资源分散、入门门槛高以及特定场景数据匮乏的痛点，funNLP 提供了“一站式”解决方案。这里不仅涵盖了分词、命名实体识别、情感分析、文本摘要等基础任务的标准工具，还独特地收录了丰富的垂直领域资源，如法律、医疗、金融行业的专用词库与数据集，甚至包含古诗词生成、歌词创作等趣味应用。其核心亮点在于极高的全面性与实用性，从基础的字典词典到前沿的 BERT、GPT-2 模型代码，再到高质量的标注数据和竞赛方案，应有尽有。\n\n无论是刚刚踏入 NLP 领域的学生、需要快速验证想法的算法工程师，还是从事人工智能研究的学者，都能在这里找到急需的“武器弹药”。对于开发者而言，它能大幅减少寻找数据和复现模型的时间；对于研究者，它提供了丰富的基准测试资源和前沿技术参考。funNLP 以开放共享的精神，极大地降低了中文自然语言处理的开发与研究成本，是中文 AI 社区不可或缺的宝藏仓库。",79857,1,"2026-04-08T20:11:31",[19,14,18],{"id":33,"name":34,"github_repo":35,"description_zh":36,"stars":37,"difficulty_score":29,"last_commit_at":38,"category_tags":39,"status":22},5773,"cs-video-courses","Developer-Y\u002Fcs-video-courses","cs-video-courses 是一个精心整理的计算机科学视频课程清单，旨在为自学者提供系统化的学习路径。它汇集了全球知名高校（如加州大学伯克利分校、新南威尔士大学等）的完整课程录像，涵盖从编程基础、数据结构与算法，到操作系统、分布式系统、数据库等核心领域，并深入延伸至人工智能、机器学习、量子计算及区块链等前沿方向。\n\n面对网络上零散且质量参差不齐的教学资源，cs-video-courses 解决了学习者难以找到成体系、高难度大学级别课程的痛点。该项目严格筛选内容，仅收录真正的大学层级课程，排除了碎片化的简短教程或商业广告，确保用户能接触到严谨的学术内容。\n\n这份清单特别适合希望夯实计算机基础的开发者、需要补充特定领域知识的研究人员，以及渴望像在校生一样系统学习计算机科学的自学者。其独特的技术亮点在于分类极其详尽，不仅包含传统的软件工程与网络安全，还细分了生成式 AI、大语言模型、计算生物学等新兴学科，并直接链接至官方视频播放列表，让用户能一站式获取高质量的教育资源，免费享受世界顶尖大学的课堂体验。",79792,"2026-04-08T22:03:59",[18,13,14,20],{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":46,"last_commit_at":47,"category_tags":48,"status":22},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,3,"2026-04-04T04:44:48",[17,13,20,19,18],{"id":50,"name":51,"github_repo":52,"description_zh":53,"stars":54,"difficulty_score":46,"last_commit_at":55,"category_tags":56,"status":22},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",75569,"2026-04-14T10:38:48",[19,13,20,18],{"id":58,"name":59,"github_repo":60,"description_zh":61,"stars":62,"difficulty_score":29,"last_commit_at":63,"category_tags":64,"status":22},3215,"awesome-machine-learning","josephmisiti\u002Fawesome-machine-learning","awesome-machine-learning 是一份精心整理的机器学习资源清单，汇集了全球优秀的机器学习框架、库和软件工具。面对机器学习领域技术迭代快、资源分散且难以甄选的痛点，这份清单按编程语言（如 Python、C++、Go 等）和应用场景（如计算机视觉、自然语言处理、深度学习等）进行了系统化分类，帮助使用者快速定位高质量项目。\n\n它特别适合开发者、数据科学家及研究人员使用。无论是初学者寻找入门库，还是资深工程师对比不同语言的技术选型，都能从中获得极具价值的参考。此外，清单还延伸提供了免费书籍、在线课程、行业会议、技术博客及线下聚会等丰富资源，构建了从学习到实践的全链路支持体系。\n\n其独特亮点在于严格的维护标准：明确标记已停止维护或长期未更新的项目，确保推荐内容的时效性与可靠性。作为机器学习领域的“导航图”，awesome-machine-learning 以开源协作的方式持续更新，旨在降低技术探索门槛，让每一位从业者都能高效地站在巨人的肩膀上创新。",72149,"2026-04-03T21:50:24",[20,18],{"id":66,"github_repo":67,"name":68,"description_en":69,"description_zh":70,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":92,"forks":93,"last_commit_at":94,"license":95,"difficulty_score":46,"env_os":96,"env_gpu":97,"env_ram":98,"env_deps":99,"category_tags":109,"github_topics":80,"view_count":10,"oss_zip_url":80,"oss_zip_packed_at":80,"status":22,"created_at":110,"updated_at":111,"faqs":112,"releases":142},7425,"google-deepmind\u002Fferminet","ferminet","An implementation of the Fermionic Neural Network for ab-initio electronic structure calculations","FermiNet 是一款基于深度神经网络的开源科研工具，专为原子和分子的从头算（ab-initio）电子结构计算而设计。它利用变分蒙特卡洛方法，致力于高精度地学习并求解多电子系统的薛定谔方程，从而获得原子与分子的基态波函数。\n\n在传统计算方法难以兼顾精度与效率的复杂量子多体问题中，FermiNet 通过神经网络强大的拟合能力，提供了一种新的解决思路，能够以极高的准确度模拟电子行为。其核心亮点在于将费米子交换反对称性直接融入神经网络架构中，确保了物理规律的自然满足；同时，项目基于 Google JAX 框架重构，支持 GPU 加速，显著提升了训练与计算效率。\n\n由于目前仍处于活跃开发的研究阶段，且需要用户编写配置文件或脚本来定义分子系统及超参数，FermiNet 主要面向计算化学、凝聚态物理领域的研究人员以及具备深度学习背景的开发者。对于希望探索人工智能在量子力学中应用前沿的科研团队而言，这是一个极具价值的实验平台，但尚不适合无需编程基础的普通用户直接使用。","# FermiNet: Fermionic Neural Networks\n\nFermiNet is a neural network for learning highly accurate ground state\nwavefunctions of atoms and molecules using a variational Monte Carlo approach.\n\nThis repository contains an implementation of the algorithm and experiments\nfirst described in \"Ab-Initio Solution of the Many-Electron Schroedinger\nEquation with Deep Neural Networks\", David Pfau, James S. Spencer, Alex G de G\nMatthews and W.M.C. Foulkes, Phys. Rev. Research 2, 033429 (2020), along with\nsubsequent research and developments.\n\nWARNING: This is a research-level release of a JAX implementation and is under\nactive development. The original TensorFlow implementation can be found in the\n`tf` branch.\n\n## Installation\n\n`pip install -e .` will install all required dependencies. This is best done\ninside a [virtual environment](https:\u002F\u002Fdocs.python-guide.org\u002Fdev\u002Fvirtualenvs\u002F).\n\n```shell\nvirtualenv ~\u002Fvenv\u002Fferminet\nsource ~\u002Fvenv\u002Fferminet\u002Fbin\u002Factivate\npip install -e .\n```\n\nIf you have a GPU available (highly recommended for fast training), then you can\ninstall JAX with CUDA support, using e.g.:\n\n```shell\npip install --upgrade jax jaxlib==0.1.57+cuda110 -f\nhttps:\u002F\u002Fstorage.googleapis.com\u002Fjax-releases\u002Fjax_releases.html\n```\n\nNote that the jaxlib version must correspond to the existing CUDA installation\nyou wish to use. Please see the\n[JAX documentation](https:\u002F\u002Fgithub.com\u002Fjax-ml\u002Fjax#installation) for more\ndetails.\n\nThe tests are easiest run using pytest:\n\n```shell\npip install -e '.[testing]'\npython -m pytest\n```\n\n## Usage\n\nferminet uses the `ConfigDict` from\n[ml_collections](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fml_collections) to configure the\nsystem. A few example scripts are included under `ferminet\u002Fconfigs\u002F`. These are\nmostly for testing so may need additional settings for a production-level\ncalculation.\n\n```shell\nferminet --config ferminet\u002Fconfigs\u002Fatom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100\n```\n\nor\n\n```shell\npython3 ferminet\u002Fmain.py --config ferminet\u002Fconfigs\u002Fatom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100\n```\n\nwill train FermiNet to find the ground-state wavefunction of the Li atom using a\nbatch size of 1024 MCMC configurations (\"walkers\" in variational Monte Carlo\nlanguage), and 100 iterations of pretraining (the default of 1000 is overkill\nfor such a small system). The system and hyperparameters can be controlled by\nmodifying the config file or (better, for one-off changes) using flags. See the\n[ml_collections](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fml_collections)' documentation for\nfurther details on the flag syntax. Details of all available config settings are\nin `ferminet\u002Fbase_config.py`.\n\nOther systems can easily be set up, by creating a new config file or `ferminet`,\nor writing a custom training script. For example, to run on the H2 molecule, you\ncan create a config file containing:\n\n```python\nfrom ferminet import base_config\nfrom ferminet.utils import system\n\n# Settings in a config files are loaded by executing the the get_config\n# function.\ndef get_config():\n  # Get default options.\n  cfg = base_config.default()\n  # Set up molecule\n  cfg.system.electrons = (1,1)\n  cfg.system.molecule = [system.Atom('H', (0, 0, -1)), system.Atom('H', (0, 0, 1))]\n\n  # Set training hyperparameters\n  cfg.batch_size = 256\n  cfg.pretrain.iterations = 100\n\n  return cfg\n```\n\nand then run it using\n\n```\nferminet --config \u002Fpath\u002Fto\u002Fh2_config.py\n```\n\nor equivalently write the following script (or execute it interactively):\n\n```python\nimport sys\n\nfrom absl import logging\nfrom ferminet.utils import system\nfrom ferminet import base_config\nfrom ferminet import train\n\n# Optional, for also printing training progress to STDOUT.\n# If running a script, you can also just use the --alsologtostderr flag.\nlogging.get_absl_handler().python_handler.stream = sys.stdout\nlogging.set_verbosity(logging.INFO)\n\n# Define H2 molecule\ncfg = base_config.default()\ncfg.system.electrons = (1,1)  # (alpha electrons, beta electrons)\ncfg.system.molecule = [system.Atom('H', (0, 0, -1)), system.Atom('H', (0, 0, 1))]\n\n# Set training parameters\ncfg.batch_size = 256\ncfg.pretrain.iterations = 100\n\ntrain.train(cfg)\n```\n\nAlternatively, you can directly pass in a PySCF ['Molecule'](http:\u002F\u002Fpyscf.org).\nYou can create PySCF Molecules with the following:\n\n```python\nfrom pyscf import gto\nmol = gto.Mole()\nmol.build(\n    atom = 'H  0 0 1; H 0 0 -1',\n    basis = 'sto-3g', unit='bohr')\n```\n\nOnce you have this molecule, you can pass it directly into the configuration by\nrunning\n\n```python\nfrom ferminet import base_config\nfrom ferminet import train\n\n# Add H2 molecule\ncfg = base_config.default()\ncfg.system.pyscf_mol = mol\n\n# Set training parameters\ncfg.batch_size = 256\ncfg.pretrain.iterations = 100\n\ntrain.train(cfg)\n```\n\nNote: to train on larger atoms and molecules with large batch sizes, multi-GPU\nparallelisation is essential. This is supported via JAX's\n[pmap](https:\u002F\u002Fjax.readthedocs.io\u002Fen\u002Flatest\u002Fjax.html#parallelization-pmap).\nMultiple GPUs will be automatically detected and used if available.\n\n### Inference\n\nAfter training, it is useful to run calculations of the energy and other\nobservables over many time steps with the parameters fixed to accumulate\nlow-variance estimates of physical quantities. To do this, just re-run the same\ncommand used for training with the flag `--config.optim.optimizer 'none'`. Make\nsure that either the value of `cfg.log.save_path` is the same, or that the value\nof `cfg.log.restore_path` is set to the value of `cfg.log.save_path` from the\noriginal training run.\n\nIt can also be useful to accumulate statistics about observables at inference\ntime which were not included in the original training run. Spin magnitude,\ndipole moments and density matrices can be tracked by adding\n`--config.observables.s2`, `--config.observables.dipole` and\n`--config.observables.density` to the command line if they are not set to true\nin the config file.\n\n## Excited States\n\nExcited state properties of systems can be calculated using either the\n[Natural Excited States for VMC (NES-VMC) algorithm](https:\u002F\u002Farxiv.org\u002Fabs\u002F2308.16848)\nor an [ensemble penalty method](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.00693).\nTo enable the calculation of `k` states of a system, simply set\n`cfg.system.states=k` in the config file. By default, NES-VMC is used, but to\nenable the ensemble penalty method, add `cfg.optim.objective='vmc_overlap'` to\nthe config. NES-VMC does not have any parameters to set, but the ensemble\npenalty method has a free choice of weights on the energies and overlap penalty,\nwhich can be set in `cfg.optim.overlap`. If the weights are not set for the\nenergies in the config, they are automatically set to 1\u002Fk for state k. We have\nfound that NES-VMC is generally more accurate than the ensemble penalty method,\nbut include both for completeness. Config files for all experiments from the\npaper which introduced NES-VMC can be found in the folder `configs\u002Fexcited`, and\nall experiments can be tested (on smaller networks) by running\n`tests\u002Fexcited_test.py`.\n\n## Output\n\nThe results directory contains `train_stats.csv` which contains the local energy\nand MCMC acceptance probability for each iteration, and the `checkpoints`\ndirectory, which contains the checkpoints generated during training. When\ncomputing observables of excited states or the density matrix for the ground\nstate, `.npy` files are also saved to the same folder. A single NumPy array is\nsaved for every iteration of optimization into the same file. An example Colab\nnotebook analyzing these outputs is given in\n`notebooks\u002Fexcited_states_analysis.ipynb`.\n\u003Ca target=\"_blank\" href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fgoogle-deepmind\u002Fferminet\u002Fblob\u002Fmain\u002Fferminet\u002Fnotebooks\u002Fexcited_states_analysis.ipynb\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"(Open in Colab!)\"\u002F>\u003C\u002Fa>\n\n## Giving Credit\n\nIf you use this code in your work, please cite the associated papers. The\ninitial paper details the architecture and results on a range of systems:\n\n```\n@article{pfau2020ferminet,\n  title={Ab-Initio Solution of the Many-Electron Schr{\\\"o}dinger Equation with Deep Neural Networks},\n  author={D. Pfau and J.S. Spencer and A.G. de G. Matthews and W.M.C. Foulkes},\n  journal={Phys. Rev. Research},\n  year={2020},\n  volume={2},\n  issue = {3},\n  pages={033429},\n  doi = {10.1103\u002FPhysRevResearch.2.033429},\n  url = {https:\u002F\u002Flink.aps.org\u002Fdoi\u002F10.1103\u002FPhysRevResearch.2.033429}\n}\n```\n\nand a NeurIPS Workshop Machine Learning and Physics paper describes the JAX\nimplementation:\n\n```\n@misc{spencer2020better,\n  title={Better, Faster Fermionic Neural Networks},\n  author={James S. Spencer and David Pfau and Aleksandar Botev and W. M.C. Foulkes},\n  year={2020},\n  eprint={2011.07125},\n  archivePrefix={arXiv},\n  primaryClass={physics.comp-ph},\n  url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2011.07125}\n}\n```\n\nThe PsiFormer architecture is detailed in an ICLR 2023 paper:\n\n```\n@misc{vonglehn2023psiformer,\n  title={A Self-Attention Ansatz for Ab-initio Quantum Chemistry},\n  author={Ingrid von Glehn and James S Spencer and David Pfau},\n  journal={ICLR},\n  year={2023},\n}\n```\n\nPeriodic boundary conditions were originally introduced in a Physical Review\nLetters article:\n\n```\n@article{cassella2023discovering,\n  title={Discovering quantum phase transitions with fermionic neural networks},\n  author={Cassella, Gino and Sutterud, Halvard and Azadi, Sam and Drummond, ND and Pfau, David and Spencer, James S and Foulkes, W Matthew C},\n  journal={Physical review letters},\n  volume={130},\n  number={3},\n  pages={036401},\n  year={2023},\n  publisher={APS}\n}\n```\n\nWasserstein QMC (thanks to Kirill Neklyudov) is described in a NeurIPS 2023\narticle:\n\n```\n@article{neklyudov2023wasserstein,\n  title={Wasserstein Quantum Monte Carlo: A Novel Approach for Solving the Quantum Many-Body Schr{\\\"o}dinger Equation},\n  author={Neklyudov, Kirill and Nys, Jannes and Thiede, Luca and Carrasquilla, Juan and Liu, Qiang and Welling, Max and Makhzani, Alireza},\n  journal={NeurIPS},\n  year={2023}\n}\n```\n\nNatural excited states was introduced in this article, which is also the first\npaper from our group using pseudopotentials\n\n```\n@article{pfau2024excited,\n  title={Accurate computation of quantum excited states with neural networks},\n  author={Pfau, David and Axelrod, Simon and Sutterud, Halvard and von Glehn, Ingrid and Spencer, James S},\n  journal={Science},\n  volume={385},\n  number={6711},\n  pages={eadn0137},\n  year={2024},\n  url={https:\u002F\u002Fdoi.org\u002F10.1126\u002Fscience.adn0137},\n}\n```\n\nThis repository can be cited using:\n\n```\n@software{ferminet_github,\n  author = {James S. Spencer, David Pfau and FermiNet Contributors},\n  title = {{FermiNet}},\n  url = {http:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fferminet},\n  year = {2020},\n}\n```\n\n## Disclaimer\n\nThis is not an official Google product.\n","# FermiNet：费米子神经网络\n\nFermiNet 是一种基于变分蒙特卡洛方法的神经网络，用于学习原子和分子的高精度基态波函数。\n\n本仓库包含了首次发表于《使用深度神经网络求解多电子薛定谔方程的从头计算法》（David Pfau、James S. Spencer、Alex G de G Matthews 和 W.M.C. Foulkes，《物理评论·研究》2, 033429 (2020)）中的算法实现及实验，并涵盖了后续的研究与进展。\n\n警告：这是一个 JAX 实现的研究级版本，目前仍在积极开发中。原始的 TensorFlow 实现可在 `tf` 分支中找到。\n\n## 安装\n\n运行 `pip install -e .` 将安装所有必需的依赖项。建议在 [虚拟环境](https:\u002F\u002Fdocs.python-guide.org\u002Fdev\u002Fvirtualenvs\u002F) 中进行此操作。\n\n```shell\nvirtualenv ~\u002Fvenv\u002Fferminet\nsource ~\u002Fvenv\u002Fferminet\u002Fbin\u002Factivate\npip install -e .\n```\n\n如果您有 GPU 可用（强烈推荐以加快训练速度），则可以安装支持 CUDA 的 JAX，例如：\n\n```shell\npip install --upgrade jax jaxlib==0.1.57+cuda110 -f\nhttps:\u002F\u002Fstorage.googleapis.com\u002Fjax-releases\u002Fjax_releases.html\n```\n\n请注意，jaxlib 的版本必须与您希望使用的现有 CUDA 安装相匹配。更多详细信息请参阅 [JAX 文档](https:\u002F\u002Fgithub.com\u002Fjax-ml\u002Fjax#installation)。\n\n测试最简单的方法是使用 pytest：\n\n```shell\npip install -e '.[testing]'\npython -m pytest\n```\n\n## 使用\n\nferminet 使用来自 [ml_collections](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fml_collections) 的 `ConfigDict` 来配置系统。`ferminet\u002Fconfigs\u002F` 目录下包含了一些示例脚本，这些脚本主要用于测试，因此在生产级计算中可能需要额外的设置。\n\n```shell\nferminet --config ferminet\u002Fconfigs\u002Fatom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100\n```\n\n或者\n\n```shell\npython3 ferminet\u002Fmain.py --config ferminet\u002Fconfigs\u002Fatom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100\n```\n\n将训练 FermiNet 以寻找锂原子的基态波函数，使用 1024 个 MCMC 配置（在变分蒙特卡洛语言中称为“游走者”）作为批次大小，并进行 100 次预训练迭代（对于如此小的系统，默认的 1000 次预训练显然过于冗余）。可以通过修改配置文件或（对于一次性更改，更推荐的方式）使用命令行标志来控制系统和超参数。有关标志语法的更多信息，请参阅 [ml_collections](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fml_collections) 的文档。所有可用配置选项的详细信息请参见 `ferminet\u002Fbase_config.py`。\n\n其他系统也可以轻松设置，只需创建一个新的配置文件或使用 `ferminet` 工具，或者编写自定义的训练脚本。例如，要对 H2 分子进行计算，您可以创建一个包含以下内容的配置文件：\n\n```python\nfrom ferminet import base_config\nfrom ferminet.utils import system\n\n# 配置文件中的设置通过执行 get_config 函数加载。\ndef get_config():\n  # 获取默认选项。\n  cfg = base_config.default()\n  # 设置分子\n  cfg.system.electrons = (1,1)\n  cfg.system.molecule = [system.Atom('H', (0, 0, -1)), system.Atom('H', (0, 0, 1))]\n\n  # 设置训练超参数\n  cfg.batch_size = 256\n  cfg.pretrain.iterations = 100\n\n  return cfg\n```\n\n然后使用以下命令运行：\n\n```\nferminet --config \u002Fpath\u002Fto\u002Fh2_config.py\n```\n\n或者等效地编写如下脚本（或交互式执行）：\n\n```python\nimport sys\n\nfrom absl import logging\nfrom ferminet.utils import system\nfrom ferminet import base_config\nfrom ferminet import train\n\n# 可选，用于将训练进度打印到标准输出。\n# 如果运行脚本，也可以直接使用 --alsologtostderr 标志。\nlogging.get_absl_handler().python_handler.stream = sys.stdout\nlogging.set_verbosity(logging.INFO)\n\n# 定义 H2 分子\ncfg = base_config.default()\ncfg.system.electrons = (1,1)  # (α电子，β电子)\ncfg.system.molecule = [system.Atom('H', (0, 0, -1)), system.Atom('H', (0, 0, 1))]\n\n# 设置训练参数\ncfg.batch_size = 256\ncfg.pretrain.iterations = 100\n\ntrain.train(cfg)\n```\n\n此外，您还可以直接传入一个 PySCF 的 ['Molecule'](http:\u002F\u002Fpyscf.org) 对象。可以使用以下代码创建 PySCF 分子：\n\n```python\nfrom pyscf import gto\nmol = gto.Mole()\nmol.build(\n    atom = 'H  0 0 1; H 0 0 -1',\n    basis = 'sto-3g', unit='bohr')\n```\n\n一旦有了这个分子，就可以将其直接传递给配置对象，运行如下代码：\n\n```python\nfrom ferminet import base_config\nfrom ferminet import train\n\n# 添加 H2 分子\ncfg = base_config.default()\ncfg.system.pyscf_mol = mol\n\n# 设置训练参数\ncfg.batch_size = 256\ncfg.pretrain.iterations = 100\n\ntrain.train(cfg)\n```\n\n注意：对于较大原子和分子的训练，尤其是当批次大小较大时，多 GPU 并行化至关重要。这可通过 JAX 的 [pmap](https:\u002F\u002Fjax.readthedocs.io\u002Fen\u002Flatest\u002Fjax.html#parallelization-pmap) 功能实现。如果有多个 GPU 可用，它们将被自动检测并使用。\n\n### 推断\n\n训练完成后，在参数固定的情况下，对能量和其他可观测量进行多次时间步长的计算，有助于积累低方差的物理量估计值。为此，只需使用与训练相同的命令，但添加 `--config.optim.optimizer 'none'` 标志即可。请确保 `cfg.log.save_path` 的值保持不变，或者将 `cfg.log.restore_path` 设置为原始训练运行时的 `cfg.log.save_path` 值。\n\n此外，在推断时收集原始训练中未包含的可观测量统计数据也很有用。如果配置文件中未启用，可以通过在命令行中添加 `--config.observables.s2`、`--config.observables.dipole` 和 `--config.observables.density` 来跟踪自旋模量、偶极矩和密度矩阵。\n\n## 激发态\n\n系统的激发态性质可以使用以下两种方法之一来计算：[VMC 的自然激发态算法 (NES-VMC)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2308.16848) 或 [系综惩罚方法](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.00693)。要计算系统的 `k` 个状态，只需在配置文件中设置 `cfg.system.states=k` 即可。默认情况下使用 NES-VMC，但若要启用系综惩罚方法，则需在配置中添加 `cfg.optim.objective='vmc_overlap'`。NES-VMC 没有需要设置的参数，而系综惩罚方法则允许自由选择能量和重叠惩罚项的权重，这些权重可以在 `cfg.optim.overlap` 中设定。如果配置中未为各状态的能量设置权重，系统会自动将其设为 1\u002Fk。我们发现，NES-VMC 通常比系综惩罚方法更为准确，但为了完整性，我们同时提供了这两种方法。介绍 NES-VMC 的论文中所有实验的配置文件都位于 `configs\u002Fexcited` 文件夹中，所有实验都可以通过运行 `tests\u002Fexcited_test.py` 在较小的网络上进行测试。\n\n## 输出\n\n结果目录包含 `train_stats.csv` 文件，其中记录了每次迭代的局域能量和 MCMC 接受概率；此外还有 `checkpoints` 目录，用于存储训练过程中生成的检查点。在计算激发态的可观测量或基态密度矩阵时，还会将 `.npy` 文件保存到同一文件夹中。每次优化迭代都会将一个 NumPy 数组保存到同一个文件中。分析这些输出的 Colab 笔记本示例位于 `notebooks\u002Fexcited_states_analysis.ipynb` 中。\n\u003Ca target=\"_blank\" href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fgoogle-deepmind\u002Fferminet\u002Fblob\u002Fmain\u002Fferminet\u002Fnotebooks\u002Fexcited_states_analysis.ipynb\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"(在 Colab 中打开!)\"\u002F>\u003C\u002Fa>\n\n## 致谢\n\n如果您在工作中使用了此代码，请引用相关论文。最初的论文详细介绍了架构及其在多种体系上的结果：\n\n```\n@article{pfau2020ferminet,\n  title={基于深度神经网络的多电子薛定谔方程从头计算解},\n  author={D. Pfau 和 J.S. Spencer、A.G. de G. Matthews、W.M.C. Foulkes},\n  journal={Phys. Rev. Research},\n  year={2020},\n  volume={2},\n  issue = {3},\n  pages={033429},\n  doi = {10.1103\u002FPhysRevResearch.2.033429},\n  url = {https:\u002F\u002Flink.aps.org\u002Fdoi\u002F10.1103\u002FPhysRevResearch.2.033429}\n}\n```\n\n一篇 NeurIPS 工作坊“机器学习与物理”会议论文描述了 JAX 实现：\n\n```\n@misc{spencer2020better,\n  title={更好、更快的费米子神经网络},\n  author={James S. Spencer、David Pfau、Aleksandar Botev 和 W. M.C. Foulkes},\n  year={2020},\n  eprint={2011.07125},\n  archivePrefix={arXiv},\n  primaryClass={physics.comp-ph},\n  url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2011.07125}\n}\n```\n\nPsiFormer 架构则在 2023 年 ICLR 论文中进行了详细说明：\n\n```\n@misc{vonglehn2023psiformer,\n  title={一种用于从头量子化学的自注意力 Ansatz},\n  author={Ingrid von Glehn、James S Spencer 和 David Pfau},\n  journal={ICLR},\n  year={2023},\n}\n```\n\n周期性边界条件最初是在《物理评论快报》的一篇文章中提出的：\n\n```\n@article{cassella2023discovering,\n  title={利用费米子神经网络发现量子相变},\n  author={Cassella, Gino、Sutterud, Halvard、Azadi, Sam、Drummond, ND、Pfau, David、Spencer, James S、Foulkes, W Matthew C},\n  journal={物理评论快报},\n  volume={130},\n  number={3},\n  pages={036401},\n  year={2023},\n  publisher={APS}\n}\n```\n\nWasserstein QMC（感谢 Kirill Neklyudov）则在 2023 年 NeurIPS 论文中有所介绍：\n\n```\n@article{neklyudov2023wasserstein,\n  title={Wasserstein 量子蒙特卡洛：求解量子多体薛定谔方程的一种新方法},\n  author={Neklyudov, Kirill、Nys, Jannes、Thiede, Luca、Carrasquilla, Juan、Liu, Qiang、Welling, Max、Makhzani, Alireza},\n  journal={NeurIPS},\n  year={2023}\n}\n```\n\n自然激发态则在这篇文章中被提出，这也是我们团队首次使用赝势的论文：\n\n```\n@article{pfau2024excited,\n  title={利用神经网络精确计算量子激发态},\n  author={Pfau, David、Axelrod, Simon、Sutterud, Halvard、von Glehn, Ingrid、Spencer, James S},\n  journal={Science},\n  volume={385},\n  number={6711},\n  pages={eadn0137},\n  year={2024},\n  url={https:\u002F\u002Fdoi.org\u002F10.1126\u002Fscience.adn0137},\n}\n```\n\n本仓库可按如下方式引用：\n\n```\n@software{ferminet_github,\n  author = {James S. Spencer、David Pfau 和 FermiNet 贡献者},\n  title = {{FermiNet}},\n  url = {http:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fferminet},\n  year = {2020},\n}\n```\n\n## 免责声明\n\n本项目并非 Google 官方产品。","# FermiNet 快速上手指南\n\nFermiNet 是一个基于变分蒙特卡洛（VMC）方法的神经网络，用于学习原子和分子的高精度基态波函数。本项目提供了该算法的 JAX 实现。\n\n## 环境准备\n\n*   **操作系统**：推荐 Linux 或 macOS。\n*   **Python**：建议使用 Python 3.8+。\n*   **硬件加速**：强烈推荐使用支持 CUDA 的 NVIDIA GPU 以加快训练速度。\n*   **依赖管理**：建议在虚拟环境中安装，避免污染系统环境。\n\n## 安装步骤\n\n### 1. 创建并激活虚拟环境\n```shell\nvirtualenv ~\u002Fvenv\u002Fferminet\nsource ~\u002Fvenv\u002Fferminet\u002Fbin\u002Factivate\n```\n\n### 2. 安装基础依赖\n进入项目目录后，执行以下命令安装核心包：\n```shell\npip install -e .\n```\n> **提示**：国内用户若遇到下载缓慢，可添加清华或阿里镜像源，例如：`pip install -e . -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 3. 配置 GPU 支持（可选但推荐）\n若需使用 GPU 加速，需安装带有 CUDA 支持的 `jax` 和 `jaxlib`。请根据您本地的 CUDA 版本选择对应的 `jaxlib` 版本（以下示例为 CUDA 11.0）：\n\n```shell\npip install --upgrade jax jaxlib==0.1.57+cuda110 -f https:\u002F\u002Fstorage.googleapis.com\u002Fjax-releases\u002Fjax_releases.html\n```\n> **注意**：`jaxlib` 版本必须与您系统中安装的 CUDA 版本严格对应。更多细节请参考 [JAX 官方文档](https:\u002F\u002Fgithub.com\u002Fjax-ml\u002Fjax#installation)。\n\n### 4. 安装测试依赖（可选）\n如需运行单元测试：\n```shell\npip install -e '.[testing]'\npython -m pytest\n```\n\n## 基本使用\n\nFermiNet 使用 `ConfigDict` 进行配置。您可以通过命令行参数直接覆盖配置文件中的设置。\n\n### 示例：计算锂原子 (Li) 的基态波函数\n\n以下命令将训练 FermiNet 以寻找锂原子的基态波函数。设置了批量大小为 256，预训练迭代次数为 100（对于小系统，默认值 1000 次通常过多）。\n\n```shell\nferminet --config ferminet\u002Fconfigs\u002Fatom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100\n```\n\n或者直接使用 Python 脚本运行：\n\n```shell\npython3 ferminet\u002Fmain.py --config ferminet\u002Fconfigs\u002Fatom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100\n```\n\n### 自定义分子系统（如 H2）\n\n您也可以通过编写简单的 Python 脚本来定义自定义分子（例如 H2）并启动训练：\n\n```python\nimport sys\nfrom absl import logging\nfrom ferminet.utils import system\nfrom ferminet import base_config\nfrom ferminet import train\n\n# 配置日志输出到标准输出\nlogging.get_absl_handler().python_handler.stream = sys.stdout\nlogging.set_verbosity(logging.INFO)\n\n# 初始化默认配置\ncfg = base_config.default()\n\n# 定义 H2 分子：(alpha 电子数，beta 电子数) 和 原子坐标\ncfg.system.electrons = (1, 1)\ncfg.system.molecule = [system.Atom('H', (0, 0, -1)), system.Atom('H', (0, 0, 1))]\n\n# 设置训练超参数\ncfg.batch_size = 256\ncfg.pretrain.iterations = 100\n\n# 开始训练\ntrain.train(cfg)\n```\n\n### 多 GPU 并行\n对于较大的原子或分子以及大批量训练，代码会自动检测并利用多个 GPU 进行并行计算（基于 JAX 的 `pmap`），无需额外配置。","某材料科学实验室的研究团队正致力于预测新型锂基电池催化剂的电子基态性质，以加速高性能材料的筛选过程。\n\n### 没有 ferminet 时\n- 依赖传统的密度泛函理论（DFT）或配置相互作用方法，在处理强关联电子系统时精度不足，导致能量计算误差较大。\n- 为了获得更高精度，不得不使用极其昂贵的耦合簇理论（如 CCSD(T)），计算成本随电子数呈指数级增长，难以应用于稍大的分子体系。\n- 波函数 Ansatz 通常基于固定的物理模型，缺乏灵活性，难以捕捉复杂的多体量子纠缠效应。\n- 调整计算方法以适应不同原子构型需要大量手动推导公式和重写代码，研发迭代周期长达数周。\n- 在普通计算集群上运行高精度模拟往往需要数天甚至数周才能收敛，严重拖慢实验验证进度。\n\n### 使用 ferminet 后\n- 利用费米子神经网络直接学习高精度的基态波函数，无需预设近似模型，显著提升了强关联体系的能量计算准确度。\n- 借助变分蒙特卡洛方法与 JAX 的 GPU 加速能力，以多项式级别的计算成本实现了接近基准方法的精度，大幅降低了算力门槛。\n- 神经网络架构自动适应复杂的电子相关性，灵活捕捉传统方法难以描述的多体纠缠特征，结果更贴近真实物理图像。\n- 仅需修改简单的 Python 配置文件即可定义新的原子或分子系统（如从锂原子切换到氢分子），将新体系的搭建时间缩短至几分钟。\n- 在单块 GPU 上即可快速完成训练与收敛，将原本数周的模拟任务压缩至数小时，极大加快了材料筛选的迭代速度。\n\nferminet 通过深度学习重构了量子多体问题的求解范式，让研究人员能在可承受的计算成本下获得前所未有的电子结构计算精度。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgoogle-deepmind_ferminet_63ff1e25.png","google-deepmind","Google DeepMind","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fgoogle-deepmind_06b1dd17.png","",null,"https:\u002F\u002Fwww.deepmind.com\u002F","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind",[84,88],{"name":85,"color":86,"percentage":87},"Python","#3572A5",84.8,{"name":89,"color":90,"percentage":91},"Jupyter Notebook","#DA5B0B",15.2,826,160,"2026-04-13T12:22:48","Apache-2.0","Linux, macOS","非必需但强烈推荐（用于快速训练）。需支持 CUDA 的 NVIDIA GPU，具体版本需与安装的 jaxlib 匹配（示例中提及 CUDA 11.0），支持多 GPU 并行。","未说明（但在处理大原子\u002F分子及大批次时需求较高）",{"notes":100,"python":101,"dependencies":102},"这是一个处于活跃开发中的研究级 JAX 实现。原始 TensorFlow 版本位于 'tf' 分支。建议使用 Python 虚拟环境进行安装。对于大型系统的大批量训练，必须使用多 GPU 并行（通过 JAX 的 pmap 自动检测）。配置系统使用 ConfigDict，可通过修改配置文件或命令行标志进行调整。","未说明（需支持虚拟环境及 pip 安装）",[103,104,105,106,107,108],"jax","jaxlib","ml_collections","pytest","pyscf","absl-py",[18],"2026-03-27T02:49:30.150509","2026-04-14T20:40:24.423738",[113,118,123,128,133,138],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},33304,"如何加载训练好的检查点（checkpoint）并重建 FermiNet 以计算波函数？","对于 TensorFlow 1 版本，建议仔细阅读代码并参考 TensorFlow 关于检查点和 MonitoredTrainingSession 的文档。一个可行的方法是 fork `train.py` 和 `qmc.py`（这两个文件已支持加载检查点），然后修改“训练”循环，使其接受自定义的电子坐标输入而不是继续训练。对于 JAX 版本，检查点更容易检查和推理，但当时可能尚未完全集成 KFAC 优化器。请注意在加载时需正确设置标志（flags），具体方式需参考 `base_config`。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fferminet\u002Fissues\u002F6",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},33305,"遇到 TypeError: _broadcast_in_dim_staging_rule() missing 'sharding' 错误如何解决？","该错误通常是由于 `kfac_jax` 版本与安装的 `jax` 版本不兼容导致的。解决方法有两种：1. 安装 `kfac_jax` 的最新开发版本，命令为：`pip install 'kfac_jax @ git+https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fkfac-jax'`；2. 或者降级使用较旧版本的 `jax`。FermiNet 的 `setup.py` 中默认采用了第一种方法（安装开发版）。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fferminet\u002Fissues\u002F96",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},33306,"在多 GPU 环境下使用 KFAC 优化器时遇到 cusolver 错误或训练失败怎么办？","这个问题可能与 CUDA 版本有关。有用户反馈在 CUDA 11 环境下多 GPU 运行会出现 cusolver 问题，但在降级到 CUDA 10.3 后问题解决，训练可以平滑进行。此外，KFAC 需要求解线性方程组，如果批量大小（batch size）过小导致曲率估计噪声过大，也可能导致矩阵非正定从而引发错误。建议尝试增大 batch size 或调整 damping factor，并优先测试 CUDA 10.3 环境。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fferminet\u002Fissues\u002F26",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},33307,"JAX 版本的 KFAC 优化器是否已开源？在哪里可以找到？","是的，JAX 版本的 KFAC 优化器已经开源。它最初发布在 deepmind-research 仓库中（路径：`deepmind-research\u002Ftree\u002Fmaster\u002Fkfac_ferminet_alpha`）。目前，JAX 分支已经是最新的，并且集成了 KFAC，可以直接在 FermiNet 的 JAX 分支（`https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fferminet\u002Ftree\u002Fjax`）中使用。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fferminet\u002Fissues\u002F24",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},33308,"为什么在训练小系统（如单电子自旋）时会出现 NaN 错误？","虽然提供的片段未显示完整解答，但结合相关讨论，NaN 通常源于数值不稳定。在使用 KFAC 时，如果批量大小太小，曲率估计会有噪声，导致矩阵分解（如 Cholesky 分解）失败，因为矩阵可能不再是对称正定的。对于小系统，建议显著增加 `batch_size`（例如增加到 4096 或更大），或者检查是否使用了过大的学习率和不合适的预训练设置。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fferminet\u002Fissues\u002F22",{"id":139,"question_zh":140,"answer_zh":141,"source_url":127},33309,"FermiNet 支持哪些元素的计算？在多 GPU 上训练较重元素（如 Na, Mg）有什么注意事项？","FermiNet 已成功用于计算从 P 到 Ar 等元素（参考 NeurIPS 2020 workshop paper）。对于第二行元素（如 Na, Mg），在多 GPU 上训练可能会遇到 cusolver 问题，这通常与 CUDA 版本兼容性有关。建议在使用多 GPU 训练较重元素时，使用 CUDA 10.3 而不是 CUDA 11。此外，确保使用足够大的批量大小以减少曲率估计的噪声，这对于 KFAC 优化器的稳定性至关重要。",[]]