<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by woaker xiao on Medium]]></title>
        <description><![CDATA[Stories by woaker xiao on Medium]]></description>
        <link>https://medium.com/@woaker.xiao?source=rss-0943d9e5fb63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by woaker xiao on Medium</title>
            <link>https://medium.com/@woaker.xiao?source=rss-0943d9e5fb63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 07:25:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@woaker.xiao/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[subframe7536/maple-font]]></title>
            <link>https://medium.com/@woaker.xiao/subframe7536-maple-font-bf7dcaf4fd5b?source=rss-0943d9e5fb63------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf7dcaf4fd5b</guid>
            <dc:creator><![CDATA[woaker xiao]]></dc:creator>
            <pubDate>Sun, 23 Mar 2025 06:56:48 GMT</pubDate>
            <atom:updated>2025-03-23T06:56:48.851Z</atom:updated>
            <content:encoded><![CDATA[<p>subframe7536/maple-font</p><p>Maple Mono</p><p>Maple Mono is an open source monospace font focused on smoothing your coding flow.</p><p>I create it to enhance my working experience, and hope that it can be useful to others.</p><p>V7 is a completely remade version, providing variable font format and source files of font project, redesigning more than half of the glyphs and offering smarter ligatures. You can checkout V6 <a href="https://github.com/subframe7536/maple-font/tree/main">here</a></p><p>Features</p><p>✨ Variable - Infinity font weights with fine-grained italic glyphs.</p><p>☁️ Smooth - Round corner, brand-new glyph of @ $ % &amp; Q -&gt; and cursive f i j k l x y in italic style.</p><p>💪 Useful - Large amount of smart ligatures, see in <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/source/features/README.md">features/</a></p><p>🎨 Icon - First-Class <a href="https://github.com/ryanoasis/nerd-fonts">Nerd-Font</a> support, make your terminal more vivid.</p><p>🔨 Customize - Enable or disable font features as you want, just make your own font.</p><p>Simpified Chinese, Traditional Chinese and Japanese</p><p>CN version based on <a href="https://github.com/CyanoHao/Resource-Han-Rounded">Resource Han Rounded</a> provides complete character set support for Chinese development environments, including Simplified Chinese, Traditional Chinese, and Japanese. Meanwhile, the characteristic of perfect 2:1 alignment between Chinese and English allows this font to achieve a neat, uniform, beautiful, and comfortable appearance in scenarios such as multilingual display and Markdown tables. However, the spacing of Chinese characters is larger compared to other popular Chinese fonts. See details in <a href="https://github.com/subframe7536/maple-font/releases/tag/cn-base">release notes</a> and <a href="https://github.com/subframe7536/maple-font/issues/211">this issue</a>.</p><p>ScreenShots</p><p>Pictured by <a href="https://github.com/subframe7536/vscode-codeimg">CodeImg</a></p><p>Theme: <a href="https://github.com/subframe7536/vscode-theme-maple">Maple</a></p><p>Config: font size 16px, line height 1.8, default letter spacing</p><p>Download</p><p>You can download all the font archives from <a href="https://github.com/subframe7536/maple-font/releases">Releases</a>.</p><p>Scoop (Windows)</p><p># Add bucket scoop bucket add nerd-fonts # Maple Mono (ttf format) scoop install Maple-Mono # Maple Mono (hinted ttf format) scoop install Maple-Mono-autohint # Maple Mono (otf format) scoop install Maple-Mono-otf # Maple Mono NF scoop install Maple-Mono-NF # Maple Mono NF CN scoop install Maple-Mono-NF-CN</p><p>Homebrew (MacOS, Linux)</p><p># Maple Mono brew install --cask font-maple-mono # Maple Mono NF brew install --cask font-maple-mono-nf # Maple Mono CN brew install --cask font-maple-mono-cn # Maple Mono NF CN brew install --cask font-maple-mono-nf-cn # Maple Mono Normal brew install --cask font-maple-mono-normal # Maple Mono Normal NF brew install --cask font-maple-mono-normal-nf # Maple Mono Normal CN brew install --cask font-maple-mono-normal-cn # Maple Mono Normal NF CN brew install --cask font-maple-mono-normal-nf-cn</p><p>AUR (Arch Linux)</p><p># Maple Mono paru -S ttf-maple-beta # Maple Mono NF paru -S ttf-maple-beta-nf # Maple Mono NF CN paru -S ttf-maple-beta-nf-cn</p><p>CDN</p><p>Maple Mono</p><p><a href="https://fontsource.org/fonts/maple-mono">fontsource</a></p><p><a href="https://fonts.zeoseven.com/items/443/">ZeoSeven Fonts</a></p><p>Maple Mono CN</p><p><a href="https://chinese-font.netlify.app/zh-cn/fonts/maple-mono-cn/MapleMono-CN-Regular">The Chinese Web Fonts Plan (中文网字计划)</a></p><p><a href="https://fonts.zeoseven.com/items/442/">ZeoSeven Fonts</a></p><p>Usage &amp; Feature Configurations</p><p>See in <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/source/features/README.md">document</a> or try it in <a href="https://font.subf.dev/en/playground">Playground</a></p><p>[!note] The web tool for custom build is under development.</p><p>Naming FAQ</p><p>Features</p><p>Ligature: Default version with ligatures (Maple Mono)</p><p>No-Ligature: Default version without ligatures (Maple Mono NL)</p><p>Normal-Ligature: <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/#preset">--normal preset</a> with ligatures (Maple Mono Normal)</p><p>Normal-No-Ligature: <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/#preset">--normal preset</a> without ligatures (Maple Mono Normal NL)</p><p>Format and Glyph Set</p><p>Variable: Minimal version, smoothly change font weight by variable</p><p>TTF: Minimal version, ttf format [Recommend!]</p><p>OTF: Minimal version, otf format</p><p>WOFF2: Minimal version, woff2 format, for small size on web pages</p><p>NF: Nerd-Font patched version, add icons for terminal (With -NF suffix)</p><p>CN: Chinese version, embed with Chinese and Japanese glyphs (With -CN suffix)</p><p>NF-CN: Full version, embed with icons, Chinese and Japanese glyphs (With -NF-CN suffix)</p><p>Font Hint</p><p>Hinted font is used for low resolution screen to have better render effect. From my experience, if your screen resolution is lower or equal than 1080P, it is recommended to use &quot;hinted font&quot;. Using &quot;unhinted font&quot; will lead to misalignment or uneven thickness on your text.</p><p>In this case, you can choose MapleMono-TTF-AutoHint / MapleMono-NF / MapleMono-NF-CN, etc.</p><p>Unhinted font is used for high resolution screen (e.g. for MacBook). Using &quot;hinted font&quot; will blur your text or make it looks weird.</p><p>In this case, you can choose MapleMono-OTF / MapleMono-TTF / MapleMono-NF-unhinted / MapleMono-NF-CN-unhinted, etc.</p><p>Why there exists -AutoHint and -unhinted suffix?</p><p>for backward compatibility, I keep the original naming scheme. -AutoHint is only used for TTF format.</p><p>Custom Build</p><p>The <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/config.json">config.json</a> file is used to configure the build process. Checkout the <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/source/schema.json">schema</a> or <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/source/features/README.md">document</a> for more details.</p><p>There also have some <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/#build-script-usage">command line options</a> for customizing the build process. Cli options have higher priority than options in config.json.</p><p>Use Github Actions</p><p>You can use <a href="https://github.com/subframe7536/maple-font/actions/workflows/custom.yml">Github Actions</a> to build the font.</p><p>Fork the repo</p><p>(Optional) Change the content in config.json</p><p>Go to Actions tab</p><p>Click on Custom Build menu item on the left</p><p>Click on Run workflow button with options setup</p><p>Wait for the build to finish</p><p>Download the font archives from Releases</p><p>Use Docker</p><p>git clone https://github.com/subframe7536/maple-font --depth 1 -b variable docker build -t maple-font . docker run -v &quot;$(pwd)/fonts:/app/fonts&quot; -e BUILD_ARGS=&quot;--normal&quot; maple-font</p><p>Local Build</p><p>Clone the repo and run on your local machine. Make sure you have python3 and pip installed</p><p>git clone https://github.com/subframe7536/maple-font --depth 1 -b variable pip install -r requirements.txt python build.py</p><p>For Ubuntu or Debian, maybe python-is-python3 is needed as well</p><p>If you have trouble installing the dependencies, just create a new GitHub Codespace and run the commands there</p><p>Custom Nerd-Font</p><p>For custom font-patcher args, font-forge (and maybe python3-fontforge as well) is required.</p><p>Maybe you should also change &quot;nerd_font.extra_args&quot; in <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/config.json">config.json</a></p><p>Default args: -l --careful --outputdir dir</p><p>if &quot;nerd_font.mono&quot; is true, then add --mono</p><p>Preset</p><p>Run build.py with --normal flag, make the font looks not such &quot;Opinioned&quot; , just like JetBrains Mono (with slashed zero).</p><p>Font Feature Freeze</p><p>There are three kind of options for feature freeze (<a href="https://github.com/subframe7536/maple-font/issues/233#issuecomment-2410170270">Why</a>):</p><p>enable: Forcely enable the features without setting up cvXX / ssXX / zero in font features config, just as default glyphs / ligatures</p><p>disable: Remove the features in cvXX / ssXX / zero, which will no longer effect, even if you enable it manually</p><p>ignore: Do nothing</p><p>Load Custom Feature File</p><p>Run build.py with --apply-fea-file flag, the feature file from <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/source/features">source/features/{regular,italic}.fea</a> will be applied into variable font. You can modify it to change all features, e.g. remove some ligatures in calt.</p><p>Chinese version</p><p>CN version is disabled by default. Run python build.py with --cn flag, the CN base fonts (about 130 MB) will download from GitHub.</p><p>If you want to build CN base fonts from variable (about 35 MB), setup &quot;cn.use_static_base_font&quot;: false in <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/config.json">config.json</a> and BE PATIENT, instantiation will take about 20-30 minutes.</p><p>Narrow spacing in CN glyphs</p><p>If you think that CN glyphs spacing is tooooo large, there is a EXPERIMENTAL build option cn.narrow or flag --cn-narrow to narrow spacing in CN glyphs. You can see effect and track issues in <a href="https://github.com/subframe7536/maple-font/issues/249">#249</a></p><p>GitHub Mirror</p><p>The build script will auto download required assets from GitHub. If you have trouble downloading, please setup github_mirror in <a href="https://raw.githubusercontent.com/subframe7536/maple-font/variable/config.json">config.json</a> or $GITHUB to your environment variable. (Target URL will be https://&lt;github_mirror&gt;/&lt;user&gt;/&lt;repo&gt;/releases/download/&lt;tag&gt;/&lt;file&gt;), or just download the target .zip file and put it in the same directory as build.py.</p><p>Build Script Usage</p><p>usage: build.py [-h] [-v] [-d] [--debug] [-n] [--feat FEAT] [--apply-fea-file] [--hinted | --no-hinted] [--liga | --no-liga] [--cn-narrow] [--nerd-font | --no-nerd-font] [--cn | --no-cn] [--cn-both] [--ttf-only] [--cache] [--cn-rebuild] [--archive] ✨ Builder and optimizer for Maple Mono options: -h, --help show this help message and exit -v, --version show program&#39;s version number and exit -d, --dry Output config and exit --debug Add `Debug` suffix to family name, skip optimization Feature Options: -n, --normal Use normal preset, just like `JetBrains Mono` with slashed zero --feat FEAT Freeze font features, splited by `,` (e.g. `--feat zero,cv01,ss07,ss08`). No effect on variable format --apply-fea-file Load feature file from `source/features/{regular,italic}.fea` to variable font --hinted Use hinted font as base font in NF / CN / NF-CN (default) --no-hinted Use unhinted font as base font in NF / CN / NF-CN --liga Preserve all the ligatures (default) --no-liga Remove all the ligatures --cn-narrow Make CN characters narrow (experimental) Build Options: --nerd-font Build Nerd-Font version (default) --no-nerd-font Do not build Nerd-Font version --cn Build Chinese version --no-cn Do not build Chinese version (default) --cn-both Build both `Maple Mono CN` and `Maple Mono NF CN`. Nerd-Font version must be enabled --ttf-only Only build TTF format --cache Reuse font cache of TTF, OTF and Woff2 formats --cn-rebuild Reinstantiate CN base font --archive Build font archives with config and license. If has `--cache` flag, only archive Nerd-Font and CN formats</p><p>Credit</p><p><a href="https://github.com/JetBrains/JetBrainsMono">JetBrains Mono</a></p><p><a href="https://github.com/googlefonts/RobotoMono">Roboto Mono</a></p><p><a href="https://github.com/tonsky/FiraCode">Fira Code</a></p><p><a href="https://github.com/rubjo/victor-mono">Victor Mono</a></p><p><a href="https://github.com/eigilnikolajsen/commit-mono">Commit Mono</a></p><p><a href="https://github.com/TheRenegadeCoder/sample-programs-website">Code Sample</a></p><p><a href="https://github.com/ryanoasis/nerd-fonts">Nerd Font</a></p><p><a href="https://github.com/MuTsunTsai/fontfreeze/">Font Freeze</a></p><p><a href="https://tophix.com/font-tools/font-viewer">Font Viewer</a></p><p><a href="https://www.monolisa.dev/">Monolisa</a></p><p><a href="https://www.recursive.design/">Recursive</a></p><p>Sponser</p><p>If this font is helpful to you, please feel free to buy me a coffee</p><p>or sponser me through <a href="https://afdian.com/a/subframe7536">Afdian</a></p><p>Star History</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf7dcaf4fd5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[新规解读：人脸识别技术应用的安全新策略]]></title>
            <link>https://medium.com/@woaker.xiao/%E6%96%B0%E8%A7%84%E8%A7%A3%E8%AF%BB-%E4%BA%BA%E8%84%B8%E8%AF%86%E5%88%AB%E6%8A%80%E6%9C%AF%E5%BA%94%E7%94%A8%E7%9A%84%E5%AE%89%E5%85%A8%E6%96%B0%E7%AD%96%E7%95%A5-e7d1394624e2?source=rss-0943d9e5fb63------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7d1394624e2</guid>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[woaker xiao]]></dc:creator>
            <pubDate>Sun, 23 Mar 2025 03:09:41 GMT</pubDate>
            <atom:updated>2025-03-23T03:09:41.186Z</atom:updated>
            <content:encoded><![CDATA[<p>新规解读：人脸识别技术应用的安全新策略</p><p>近期，新出台的相关法规为人脸识别技术的应用设定了更为明确的规范与边界。本文将深入解读这些新规背后的意义，剖析其对行业发展的潜在影响，并为企业与消费者提供实用的应对策略。</p><p>3月21日，国家互联网信息办发布消息，《人脸识别技术应用安全管理办法》正式审议通过，并将于2025年6月1日起施行。这一办法的出台对相关产品有着重要意义，相关从业者需要迅速适应并调整产品策略，以确保合规并提升用户体验。以下是需要重点关注的三个层面。</p><p>人脸数据不得随便上传云端，且需遵循最短时间存储原则，用完即删。本地存储：优先采用本地存储方案，如手机或设备端加密存储。</p><p>网络传输脱敏：网络传输过程中必须脱敏处理，如生成特征码而非原图。</p><p>自动删除机制：开发自动删除机制，如考勤数据保留30天后自动清除。</p><p>年龄验证：在注册环节增加年龄验证。</p><p>家长授权：14岁以下用户强制跳转家长授权流程。</p><p>家长管理后台：开发家长管理后台，家长可查看或撤回授权。</p><p>标记所有涉及人脸的功能点。</p><p>逐项核对合规要求。</p><p>重点排查历史数据，特别是云端存储内容。</p><p>增加数据使用记录查询功能。</p><p>开发“一键删除面部数据”入口。</p><p>在设置页展示安全认证标识。</p><p>将“合规动作”转化为产品优势。</p><p>法务部：每月同步监管动态。</p><p>技术部：定期进行安全压力测试。</p><p>客服部：准备话术应对用户咨询。</p><p>新规的实施并非是对产品的束缚，恰恰相反，实则是构建用户信任的良好契机。借助清晰的告知设计，能让用户清楚知晓人脸信息的使用情况；凭借透明的数据管理，使数据存储、传输等环节公开透明；依靠贴心的权限控制，充分尊重用户的自主选择权利。唯有如此，才能在合规的前提之下，营造出更为安全且充满人文关怀的产品体验。只有精心规划、积极调整，确保产品顺利契合新规要求，才能够赢得用户的信赖，收获用户的满意。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7d1394624e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The AI Scientist: Towards Fully Automated Open-Ended Scientific Discovery ‍]]></title>
            <link>https://medium.com/@woaker.xiao/the-ai-scientist-towards-fully-automated-open-ended-scientific-discovery-e3abad8e4e74?source=rss-0943d9e5fb63------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3abad8e4e74</guid>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[woaker xiao]]></dc:creator>
            <pubDate>Sun, 23 Mar 2025 03:07:52 GMT</pubDate>
            <atom:updated>2025-03-23T03:07:52.524Z</atom:updated>
            <content:encoded><![CDATA[<p>The AI Scientist: Towards Fully Automated Open-Ended Scientific Discovery 🧑‍🔬</p><p><br>The AI Scientist: Towards Fully Automated<br>Open-Ended Scientific Discovery 🧑‍🔬</p><p>📚 <a href="https://arxiv.org/abs/2408.06292">[Paper]</a> | 📝 <a href="https://sakana.ai/ai-scientist/">[Blog Post]</a> | 📂 <a href="https://drive.google.com/drive/folders/1G7A0wTqfXVa-cpexjk0oaXakaSJwffEt">[Drive Folder]</a></p><p>One of the grand challenges of artificial intelligence is developing agents capable of conducting scientific research and discovering new knowledge. While frontier models have already been used to aid human scientists—for example, for brainstorming ideas or writing code—they still require extensive manual supervision or are heavily constrained to specific tasks.</p><p>We&#39;re excited to introduce The AI Scientist, the first comprehensive system for fully automatic scientific discovery, enabling Foundation Models such as Large Language Models (LLMs) to perform research independently.</p><p>We provide all runs and data from our paper <a href="https://drive.google.com/drive/folders/1G7A0wTqfXVa-cpexjk0oaXakaSJwffEt?usp=sharing">here</a>, where we run each base model on each template for approximately 50 ideas. We highly recommend reading through some of the <a href="https://drive.google.com/drive/folders/1Mmpz6M1FK4q8e-SewgZcUzdeD0Q2zC39?usp=sharing">Claude papers</a> to get a sense of the system&#39;s strengths and weaknesses. Here are some example papers generated by The AI Scientist 📝:</p><p><a href="https://github.com/SakanaAI/AI-Scientist/raw/main/example_papers/adaptive_dual_scale_denoising.pdf">DualScale Diffusion: Adaptive Feature Balancing for Low-Dimensional Generative Models</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/raw/main/example_papers/grid_based_noise_adaptation.pdf">Multi-scale Grid Noise Adaptation: Enhancing Diffusion Models For Low-dimensional Data</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/raw/main/example_papers/gan_diffusion.pdf">GAN-Enhanced Diffusion: Boosting Sample Quality and Diversity</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/tree/main/example_papers/dual_expert_denoiser.pdf">DualDiff: Enhancing Mode Capture in Low-dimensional Diffusion Models via Dual-expert Denoising</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/raw/main/example_papers/multi_style_adapter.pdf">StyleFusion: Adaptive Multi-style Generation in Character-Level Language Models</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/tree/main/example_papers/rl_lr_adaptation.pdf">Adaptive Learning Rates for Transformers via Q-Learning</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/tree/main/example_papers/weight_initialization_grokking.pdf">Unlocking Grokking: A Comparative Study of Weight Initialization Strategies in Transformer Models</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/tree/main/example_papers/layerwise_lr_grokking.pdf">Grokking Accelerated: Layer-wise Learning Rates for Transformer Generalization</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/tree/main/example_papers/mdl_grokking_correlation.pdf">Grokking Through Compression: Unveiling Sudden Generalization via Minimal Description Length</a></p><p><a href="https://github.com/SakanaAI/AI-Scientist/tree/main/example_papers/data_augmentation_grokking.pdf">Accelerating Mathematical Insight: Boosting Grokking Through Strategic Data Augmentation</a></p><p>Note:<br>Caution! This codebase will execute LLM-written code. There are various risks and challenges associated with this autonomy, including the use of potentially dangerous packages, web access, and potential spawning of processes. Use at your own discretion. Please make sure to <a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#containerization">containerize</a> and restrict web access appropriately.</p><p>Table of Contents</p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#introduction">Introduction</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#requirements">Requirements</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#installation">Installation</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#supported-models-and-api-keys">Supported Models and API Keys</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#setting-up-the-templates">Setting Up the Templates</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#nanogpt-template">NanoGPT Template</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#2d-diffusion-template">2D Diffusion Template</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#grokking-template">Grokking Template</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#run-ai-scientist-paper-generation-experiments">Run AI Scientist Paper Generation Experiments</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#getting-an-llm-generated-paper-review">Getting an LLM-Generated Paper Review</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#making-your-own-template">Making Your Own Template</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#community-contributed-templates">Community-Contributed Templates</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#template-resources">Template Resources</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#citing-the-ai-scientist">Citing The AI Scientist</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#frequently-asked-questions">Frequently Asked Questions</a></p><p><a href="https://raw.githubusercontent.com/SakanaAI/AI-Scientist/main/#containerization">Containerization</a></p><p>Introduction</p><p>We provide three templates, which were used in our paper, covering the following domains: NanoGPT, 2D Diffusion, and Grokking. These templates enable The AI Scientist to generate ideas and conduct experiments in these areas. We accept contributions of new templates from the community, but please note that they are not maintained by us. All other templates beyond the three provided are community contributions.</p><p>Requirements</p><p>This code is designed to run on Linux with NVIDIA GPUs using CUDA and PyTorch. Support for other GPU architectures may be possible by following the <a href="https://pytorch.org/get-started/locally/">PyTorch guidelines</a>. The current templates would likely take an infeasible amount of time on CPU-only machines. Running on other operating systems may require significant adjustments.</p><p>Installation</p><p>conda create -n ai_scientist python=3.11 conda activate ai_scientist # Install pdflatex sudo apt-get install texlive-full # Install PyPI requirements pip install -r requirements.txt</p><p>Note: Installing texlive-full can take a long time. You may need to <a href="https://askubuntu.com/questions/956006/pregenerating-context-markiv-format-this-may-take-some-time-takes-forever">hold Enter</a> during the installation.</p><p>Supported Models and API Keys</p><p>We support a wide variety of models, including open-weight and API-only models. In general, we recommend using only frontier models above the capability of the original GPT-4. To see a full list of supported models, see <a href="https://github.com/SakanaAI/AI-Scientist/raw/main/ai_scientist/llm.py">here</a>.</p><p>OpenAI API (GPT-4o, GPT-4o-mini, o1 models)</p><p>By default, this uses the OPENAI_API_KEY environment variable.</p><p>Anthropic API (Claude Sonnet 3.5)</p><p>By default, this uses the ANTHROPIC_API_KEY environment variable.</p><p>Claude Models via Bedrock</p><p>For Claude models provided by <a href="https://aws.amazon.com/bedrock/">Amazon Bedrock</a>, please install these additional packages:</p><p>pip install anthropic[bedrock]</p><p>Next, specify a set of valid <a href="https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html">AWS Credentials</a> and the target <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-regions.html">AWS Region</a>:</p><p>Set the environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME.</p><p>Claude Models via Vertex AI</p><p>For Claude models provided by <a href="https://cloud.google.com/model-garden?hl=en">Vertex AI Model Garden</a>, please install these additional packages:</p><p>pip install google-cloud-aiplatform pip install anthropic[vertex]</p><p>Next, set up valid authentication for a <a href="https://cloud.google.com/vertex-ai/docs/authentication">Google Cloud project</a>, for example by providing the region and project ID:</p><p>export CLOUD_ML_REGION=&quot;REGION&quot; # for Model Garden call export ANTHROPIC_VERTEX_PROJECT_ID=&quot;PROJECT_ID&quot; # for Model Garden call export VERTEXAI_LOCATION=&quot;REGION&quot; # for Aider/LiteLLM call export VERTEXAI_PROJECT=&quot;PROJECT_ID&quot; # for Aider/LiteLLM call</p><p>DeepSeek API (deepseek-chat, deepseek-reasoner)</p><p>By default, this uses the DEEPSEEK_API_KEY environment variable.</p><p>OpenRouter API (Llama3.1)</p><p>By default, this uses the OPENROUTER_API_KEY environment variable.</p><p>Google Gemini</p><p>We support Google Gemini models (e.g., &quot;gemini-1.5-flash&quot;, &quot;gemini-1.5-pro&quot;) via the <a href="https://pypi.org/project/google-generativeai">google-generativeai</a> Python library. By default, it uses the environment variable:</p><p>export GEMINI_API_KEY=&quot;YOUR GEMINI API KEY&quot;</p><p>Semantic Scholar API (Literature Search)</p><p>Our code can also optionally use a Semantic Scholar API Key (S2_API_KEY) for higher throughput <a href="https://www.semanticscholar.org/product/api">if you have one</a>, though it should work without it in principle. If you have problems with Semantic Scholar, you can skip the literature search and citation phases of paper generation.</p><p>Be sure to provide the key for the model used for your runs, e.g.:</p><p>export OPENAI_API_KEY=&quot;YOUR KEY HERE&quot; export S2_API_KEY=&quot;YOUR KEY HERE&quot;</p><p>OpenAlex API (Literature Search Alternative)</p><p>OpenAlex API can be used as an alternative if you do not have a Semantic Scholar API Key. OpenAlex does not require API key.</p><p>pip install pyalex export OPENALEX_MAIL_ADDRESS=&quot;YOUR EMAIL ADDRESS&quot;</p><p>And specify --engine openalex when you execute the AI Scientist code.</p><p>Note that this is experimental for those who do not have a Semantic Scholar API Key.</p><p>Setting Up the Templates</p><p>This section provides instructions for setting up each of the three templates used in our paper. Before running The AI Scientist experiments, please ensure you have completed the setup steps for the templates you are interested in.</p><p>NanoGPT Template</p><p>Description: This template investigates transformer-based autoregressive next-token prediction tasks.</p><p>Setup Steps:</p><p>Prepare the data:</p><p>python data/enwik8/prepare.py python data/shakespeare_char/prepare.py python data/text8/prepare.py</p><p>Create baseline runs (machine dependent):</p><p># Set up NanoGPT baseline run # NOTE: YOU MUST FIRST RUN THE PREPARE SCRIPTS ABOVE! cd templates/nanoGPT python experiment.py --out_dir run_0 python plot.py</p><p>2D Diffusion Template</p><p>Description: This template studies improving the performance of diffusion generative models on low-dimensional datasets.</p><p>Setup Steps:</p><p>Install dependencies:</p><p># Set up 2D Diffusion git clone https://github.com/gregversteeg/NPEET.git cd NPEET pip install . pip install scikit-learn</p><p>Create baseline runs:</p><p># Set up 2D Diffusion baseline run cd templates/2d_diffusion python experiment.py --out_dir run_0 python plot.py</p><p>Grokking Template</p><p>Description: This template investigates questions about generalization and learning speed in deep neural networks.</p><p>Setup Steps:</p><p>Install dependencies:</p><p># Set up Grokking pip install einops</p><p>Create baseline runs:</p><p># Set up Grokking baseline run cd templates/grokking python experiment.py --out_dir run_0 python plot.py</p><p>Run AI Scientist Paper Generation Experiments</p><p>Note: Please ensure the setup steps above are completed before running these experiments.</p><p>conda activate ai_scientist # Run the paper generation. python launch_scientist.py --model &quot;gpt-4o-2024-05-13&quot; --experiment nanoGPT_lite --num-ideas 2 python launch_scientist.py --model &quot;claude-3-5-sonnet-20241022&quot; --experiment nanoGPT_lite --num-ideas 2</p><p>If you have more than one GPU, use the --parallel option to parallelize ideas across multiple GPUs.</p><p>Getting an LLM-Generated Paper Review</p><p>import openai from ai_scientist.perform_review import load_paper, perform_review client = openai.OpenAI() model = &quot;gpt-4o-2024-05-13&quot; # Load paper from PDF file (raw text) paper_txt = load_paper(&quot;report.pdf&quot;) # Get the review dictionary review = perform_review( paper_txt, model, client, num_reflections=5, num_fs_examples=1, num_reviews_ensemble=5, temperature=0.1, ) # Inspect review results review[&quot;Overall&quot;] # Overall score (1-10) review[&quot;Decision&quot;] # &#39;Accept&#39; or &#39;Reject&#39; review[&quot;Weaknesses&quot;] # List of weaknesses (strings)</p><p>To run batch analysis:</p><p>cd review_iclr_bench python iclr_analysis.py --num_reviews 500 --batch_size 100 --num_fs_examples 1 --num_reflections 5 --temperature 0.1 --num_reviews_ensemble 5</p><p>Making Your Own Template</p><p>If there is an area of study you would like The AI Scientist to explore, it is straightforward to create your own templates. In general, follow the structure of the existing templates, which consist of:</p><p>experiment.py — This is the main script where the core content is. It takes an argument --out_dir, which specifies where it should create the folder and save the relevant information from the run.</p><p>plot.py — This script takes the information from the run folders and creates plots. The code should be clear and easy to edit.</p><p>prompt.json — Put information about your template here.</p><p>seed_ideas.json — Place example ideas here. You can also try to generate ideas without any examples and then pick the best one or two to put here.</p><p>latex/template.tex — We recommend using our LaTeX folder but be sure to replace the pre-loaded citations with ones that you expect to be more relevant.</p><p>The key to making new templates work is matching the base filenames and output JSONs to the existing format; everything else is free to change. You should also ensure that the template.tex file is updated to use the correct citation style / base plots for your template.</p><p>Community-Contributed Templates</p><p>We welcome community contributions in the form of new templates. While these are not maintained by us, we are delighted to highlight your templates to others. Below, we list community-contributed templates along with links to their pull requests (PRs):</p><p>Infectious Disease Modeling (seir) - <a href="https://github.com/SakanaAI/AI-Scientist/pull/137">PR #137</a></p><p>Image Classification with MobileNetV3 (mobilenetV3) - <a href="https://github.com/SakanaAI/AI-Scientist/pull/141">PR #141</a></p><p>Sketch RNN (sketch_rnn) - <a href="https://github.com/SakanaAI/AI-Scientist/pull/143">PR #143</a></p><p>AI in Quantum Chemistry (MACE) - <a href="https://github.com/SakanaAI/AI-Scientist/pull/157">PR#157</a></p><p>Earthquake Prediction (earthquake-prediction) - <a href="https://github.com/SakanaAI/AI-Scientist/pull/167">PR #167</a></p><p>Tensorial Radiance Fields (tensorf) - <a href="https://github.com/SakanaAI/AI-Scientist/pull/175">PR #175</a></p><p>This section is reserved for community contributions. Please submit a pull request to add your template to the list! Please describe the template in the PR description, and also show examples of the generated papers.</p><p>Template Resources</p><p>We provide three templates, which heavily use code from other repositories, credited below:</p><p>NanoGPT Template uses code from <a href="https://github.com/karpathy/nanoGPT">NanoGPT</a> and this <a href="https://github.com/karpathy/nanoGPT/pull/254">PR</a>.</p><p>2D Diffusion Template uses code from <a href="https://github.com/tanelp/tiny-diffusion">tiny-diffusion</a>, <a href="https://github.com/lucidrains/ema-pytorch">ema-pytorch</a>, and <a href="https://www.research.autodesk.com/publications/same-stats-different-graphs/">Datasaur</a>.</p><p>Grokking Template uses code from <a href="https://github.com/Sea-Snell/grokking">Sea-Snell/grokking</a> and <a href="https://github.com/danielmamay/grokking">danielmamay/grokking</a>.</p><p>We would like to thank the developers of the open-source models and packages for their contributions and for making their work available.</p><p>Citing The AI Scientist</p><p>If you use The AI Scientist in your research, please cite it as follows:</p><p>@article{lu2024aiscientist, title={The {AI} {S}cientist: Towards Fully Automated Open-Ended Scientific Discovery}, author={Lu, Chris and Lu, Cong and Lange, Robert Tjarko and Foerster, Jakob and Clune, Jeff and Ha, David}, journal={arXiv preprint arXiv:2408.06292}, year={2024} }</p><p>Frequently Asked Questions</p><p>We recommend reading our paper first for any questions you have on The AI Scientist.</p><p>Why am I missing files when running The AI Scientist?</p><p>Ensure you have completed all the setup and preparation steps before the main experiment script.</p><p>Why has a PDF or a review not been generated?</p><p>The AI Scientist finishes an idea with a success rate that depends on the template, the base foundation model, and the complexity of the idea. We advise referring to our main paper. The highest success rates are observed with Claude Sonnet 3.5. Reviews are best done with GPT-4o; all other models have issues with positivity bias or failure to conform to required outputs.</p><p>What is the cost of each idea generated?</p><p>Typically less than $15 per paper with Claude Sonnet 3.5. We recommend DeepSeek Coder V2 for a much more cost-effective approach. A good place to look for new models is the <a href="https://aider.chat/docs/leaderboards/">Aider leaderboard</a>.</p><p>How do I change the base conference format associated with the write-ups?</p><p>Change the base template.tex files contained within each template.</p><p>How do I run The AI Scientist for different subject fields?</p><p>Please refer to the instructions for different templates. In this current iteration, this is restricted to ideas that can be expressed in code. However, lifting this restriction would represent exciting future work! :)</p><p>How do I add support for a new foundation model?</p><p>You may modify ai_scientist/llm.py to add support for a new foundation model. We do not advise using any model that is significantly weaker than GPT-4 level for The AI Scientist.</p><p>Why do I need to run the baseline runs myself?</p><p>These appear as run_0 and should be run per machine you execute The AI Scientist on for accurate run-time comparisons due to hardware differences.</p><p>What if I have problems accessing the Semantic Scholar API?</p><p>We use the Semantic Scholar API to check ideas for novelty and collect citations for the paper write-up. You may be able to skip these phases if you don&#39;t have an API key or the API is slow to access.</p><p>Containerization</p><p>We include a <a href="https://github.com/SakanaAI/AI-Scientist/pull/21">community-contributed</a> Docker image that may assist with your containerization efforts in experimental/Dockerfile.</p><p>You can use this image like this:</p><p># Endpoint Script docker run -e OPENAI_API_KEY=$OPENAI_API_KEY -v `pwd`/templates:/app/AI-Scientist/templates &lt;AI_SCIENTIST_IMAGE&gt; \ --model gpt-4o-2024-05-13 \ --experiment 2d_diffusion \ --num-ideas 2 # Interactive docker run -it -e OPENAI_API_KEY=$OPENAI_API_KEY \ --entrypoint /bin/bash \</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3abad8e4e74" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>