{"id":36850,"date":"2025-01-19T20:00:14","date_gmt":"2025-01-19T12:00:14","guid":{"rendered":"https:\/\/17aitech.com\/?p=36850"},"modified":"2025-01-19T20:00:14","modified_gmt":"2025-01-19T12:00:14","slug":"%e9%99%88%e5%a4%a9%e5%a5%87%e5%9b%a2%e9%98%9fllm%e7%bb%93%e6%9e%84%e5%8c%96%e7%94%9f%e6%88%90%e6%96%b0%e5%bc%95%e6%93%8exgrammar%ef%bc%9a%e7%99%be%e5%80%8d%e5%8a%a0%e9%80%9f%e3%80%81%e8%bf%91%e9%9b%b6","status":"publish","type":"post","link":"https:\/\/17aitech.com\/?p=36850","title":{"rendered":"\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500"},"content":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2024-11-26-4\" target=\"_blank\">\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500<\/a><\/p>\n<blockquote data-author-name=\"\" data-content-utf8-length=\"29\" data-source-title=\"\" data-type=\"2\" data-url=\"\">\n<section>\n<section>\n<section>\u73b0\u5728\uff0c\u5927\u8bed\u8a00\u6a21\u578b\u7684\u7ed3\u6784\u5316\u751f\u6210\u6709\u4e86\u4e00\u4e2a\u66f4\u52a0\u9ad8\u6548\u3001\u7075\u6d3b\u7684\u5f15\u64ce\u3002<\/section>\n<\/section>\n<\/section>\n<\/blockquote>\n<section><\/section>\n<section>\u4e0d\u7ba1\u662f\u7f16\u5199\u548c\u8c03\u8bd5\u4ee3\u7801\uff0c\u8fd8\u662f\u901a\u8fc7\u51fd\u6570\u8c03\u7528\u6765\u4f7f\u7528\u5916\u90e8\u5de5\u5177\uff0c\u53c8\u6216\u662f\u63a7\u5236\u673a\u5668\u4eba\uff0c\u90fd\u514d\u4e0d\u4e86\u9700\u8981 LLM \u751f\u6210\u7ed3\u6784\u5316\u6570\u636e\uff0c\u4e5f\u5c31\u662f\u9075\u5faa\u67d0\u4e2a\u7279\u5b9a\u683c\u5f0f\uff08\u5982 JSON\u3001SQL \u7b49\uff09\u7684\u6570\u636e\u3002<\/section>\n<section><\/section>\n<section>\u4f46\u4f7f\u7528\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\uff08CFG\uff09\u6765\u8fdb\u884c\u7ea6\u675f\u89e3\u7801\u7684\u65b9\u6cd5\u5e76\u4e0d\u9ad8\u6548\u3002\u9488\u5bf9\u8fd9\u4e2a\u56f0\u96be\uff0c\u9648\u5929\u5947\u56e2\u961f\u63d0\u51fa\u4e86\u4e00\u79cd\u65b0\u7684\u89e3\u51b3\u65b9\u6848\uff1aXGrammar\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png\"><\/a><\/section>\n<section>XGrammar \u662f\u4e00\u4e2a\u5f00\u6e90\u8f6f\u4ef6\u5e93\uff0c\u53ef\u5b9e\u73b0\u9ad8\u6548\u3001\u7075\u6d3b\u4e14\u53ef\u79fb\u690d\u7684\u7ed3\u6784\u5316\u751f\u6210\u3002\u8be5\u56e2\u961f\u5728\u535a\u5ba2\u4e2d\u8868\u793a\uff1a\u300c\u6211\u4eec\u6beb\u4e0d\u59a5\u534f\u5730\u5b9e\u73b0\u4e86\u8fd9\u4e09\u4e2a\u76ee\u6807\uff0c\u5e76\u81f4\u529b\u4e8e\u4e00\u4e2a\u6838\u5fc3\u4f7f\u547d\uff1a\u5c06\u7075\u6d3b\u3001\u96f6\u5f00\u9500\u7684\u7ed3\u6784\u5316\u751f\u6210\u5e26\u5230\u4efb\u4f55\u5730\u65b9\u3002\u300d<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-85d2e6d7136022c42701c855967872c2.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-85d2e6d7136022c42701c855967872c2.png\"><\/a><\/section>\n<ul>\n<li>\n<section>\u8bba\u6587\u6807\u9898\uff1aXGrammar: Flexible and Efficient Structured Generation Engine for Large Language Models<\/section>\n<\/li>\n<li>\n<section>\u8bba\u6587\u5730\u5740\uff1ahttps:\/\/arxiv.org\/pdf\/2411.15100<\/section>\n<\/li>\n<li>\n<section>\u4ee3\u7801\u5730\u5740\uff1ahttps:\/\/github.com\/mlc-ai\/xgrammar<\/section>\n<\/li>\n<\/ul>\n<section><\/section>\n<section>\u5bf9\u4e8e\u7ed3\u6784\u5316\u751f\u6210\uff0c\u4e00\u79cd\u5e38\u7528\u65b9\u6cd5\u662f\u7ea6\u675f\u89e3\u7801\u3002\u5728\u6bcf\u4e2a\u89e3\u7801\u6b65\u9aa4\u4e2d\uff0c\u7ea6\u675f\u89e3\u7801\u90fd\u4f1a\u68c0\u67e5\u8bcd\u8868\uff0c\u5e76\u901a\u8fc7\u5c06\u65e0\u6548 token \u7684\u6982\u7387\u8bbe\u7f6e\u4e3a\u96f6\u6765\u8fc7\u6ee4\u6389\u8fdd\u53cd\u6307\u5b9a\u7ed3\u6784\u7684 token\u3002\u4e3a\u4e86\u652f\u6301\u591a\u79cd\u591a\u6837\u7684\u7ed3\u6784\u683c\u5f0f\uff0c\u9700\u8981\u4e00\u79cd\u7075\u6d3b\u7684\u673a\u5236\u6765\u6307\u5b9a\u548c\u68c0\u67e5\u8fd9\u4e9b\u7ea6\u675f\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-0e279a1ca732d89a1b64e76396240c59.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-0e279a1ca732d89a1b64e76396240c59.png\"><\/a><\/section>\n<section><em><sup>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u4f7f\u7528 JSON \u65b9\u6848\u5b9e\u73b0\u7ea6\u675f\u89e3\u7801<\/sup><\/em><\/section>\n<section><\/section>\n<section>\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\uff08CFG\uff09\u5c31\u80fd\u63d0\u4f9b\u4e00\u79cd\u901a\u7528\u65b9\u6cd5\uff0c\u5373\u901a\u8fc7\u4e00\u7ec4\u89c4\u5219\u6765\u5b9a\u4e49\u7ed3\u6784\u3002\u5176\u4e2d\u6bcf\u6761\u89c4\u5219\u90fd\u5305\u542b\u4e00\u4e2a\u5b57\u7b26\u5e8f\u5217\u6216\u5176\u4ed6\u89c4\u5219\uff0c\u5e76\u5141\u8bb8\u9012\u5f52\u7ec4\u5408\u6765\u8868\u793a\u590d\u6742\u7684\u7ed3\u6784\u3002\u76f8\u6bd4\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u7b49\u5176\u5b83\u683c\u5f0f\uff0cCFG \u7531\u4e8e\u652f\u6301\u9012\u5f52\u7ed3\u6784\uff0c\u56e0\u800c\u80fd\u63d0\u4f9b\u66f4\u5927\u7684\u7075\u6d3b\u6027\uff0c\u4f7f\u5176\u9002\u5408\u63cf\u8ff0 JSON\u3001SQL \u548c\u9886\u57df\u7279\u5b9a\u8bed\u8a00\uff08DSL\uff09\u7b49\u5e38\u89c1\u8bed\u8a00\u3002<\/section>\n<section><\/section>\n<section>\u4e0b\u56fe\u5c55\u793a\u4e86\u4e00\u4e2a\u7528\u4e8e\u6570\u7ec4\u548c\u5b57\u7b26\u4e32\u7684 CFG\uff0c\u53ef\u4ee5\u6e05\u695a\u5730\u770b\u5230\u5176\u4e2d\u7684\u9012\u5f52\u7ed3\u6784\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-3df1111115f59377301b546ccdd0c35c.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-3df1111115f59377301b546ccdd0c35c.png\"><\/a><\/section>\n<section>\u4f46\u662f\uff0c\u4e5f\u6b63\u56e0\u4e3a CFG \u5f88\u7075\u6d3b\uff0c\u6240\u4ee5\u76f4\u63a5\u5c06\u5176\u5e94\u7528\u4e8e\u7ea6\u675f\u89e3\u7801\u7684\u6548\u7387\u5e76\u4e0d\u9ad8\u3002\u9996\u5148\uff0c\u6bcf\u4e2a\u89e3\u7801\u6b65\u9aa4\u90fd\u9700\u8981\u5bf9\u8bcd\u8868\u4e2d\u6bcf\u4e2a\u53ef\u80fd\u7684 token \u89e3\u91ca CFG\uff0c\u5728 Llama 3.1 \u4e2d\uff0c\u8fd9\u4e2a\u8bcd\u8868\u7684\u5927\u5c0f\u53ef\u80fd\u9ad8\u8fbe 128k\u3002\u6b64\u5916\uff0cCFG \u89e3\u91ca\u9700\u8981\u4e00\u4e2a\u5806\u6808\u72b6\u6001\u6765\u8ddf\u8e2a\u4e4b\u524d\u5339\u914d\u7684\u9012\u5f52\u89c4\u5219\uff0c\u56e0\u6b64\u65e0\u6cd5\u63d0\u524d\u8ba1\u7b97\u548c\u7f13\u5b58\u5806\u6808\u6a21\u5f0f\u7684\u6240\u6709\u7ec4\u5408\u3002\u6700\u540e\uff0cLLM \u751f\u6210\u7ed3\u679c\u4e2d\u7684\u6bcf\u4e2a token \u90fd\u5305\u542b\u591a\u4e2a\u5b57\u7b26\uff0c\u8fd9\u4e9b\u5b57\u7b26\u53ef\u80fd\u4f1a\u8de8\u8d8a\u8bed\u6cd5\u5143\u7d20\u7684\u8fb9\u754c\uff0c\u5e76\u5728\u8fd0\u884c\u65f6\u6267\u884c\u671f\u95f4\u5bfc\u81f4\u8fdb\u4e00\u6b65\u7684\u9012\u5f52\u6216\u5806\u6808\u5f39\u51fa\u3002\u8fd9\u79cd\u672a\u5bf9\u9f50\u7684\u8fb9\u754c\u95ee\u9898\u5f88\u68d8\u624b\uff0c\u9700\u8981\u5728\u8bed\u6cd5\u6267\u884c\u671f\u95f4\u5c0f\u5fc3\u5904\u7406\u5b83\u4eec\u3002<\/section>\n<section><\/section>\n<section>XGrammar \u4fbf\u662f\u4e3a\u89e3\u51b3\u4e0a\u8ff0\u96be\u9898\u800c\u751f\u7684\uff0c\u5e76\u4e14\u6548\u679c\u5353\u8d8a\uff1a\u76f8\u6bd4\u4e8e\u4e4b\u524d\u7684 SOTA \u65b9\u6cd5\uff0cXGrammar \u53ef\u4ee5\u5c06\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\u7684\u6bcf token \u5ef6\u8fdf\u51cf\u5c11\u591a\u8fbe 100 \u500d\uff01\u6b64\u5916\uff0c\u4ed6\u4eec\u8fd8\u57fa\u4e8e Llama3.1 \u6a21\u578b\u5b9e\u9a8c\u4e86\u96c6\u6210\u4e86 XGrammar \u7684 LLM serving \u5f15\u64ce\uff1b\u5728 H100 GPU \u4e0a\uff0c\u8fd9\u80fd\u5c06\u901a\u8fc7\u7ed3\u6784\u5316\u8f93\u51fa\u5b9e\u73b0\u7aef\u5230\u7aef LLM serving \u7684\u901f\u5ea6\u63d0\u5347 80 \u500d\uff01<\/section>\n<section><\/section>\n<section>\u8be5\u56e2\u961f\u8868\u793a\uff1a\u300c\u6211\u4eec\u6b63\u5728\u5f00\u6e90 XGrammar \u5e76\u5c06\u5176\u96c6\u6210\u5230\u4e3b\u8981\u7684\u5f00\u6e90 LLM \u6846\u67b6\u4e2d\u3002\u300d<\/section>\n<section><\/section>\n<section><strong>XGrammar \u6982\u89c8<\/strong><\/section>\n<section><\/section>\n<section>\u5982\u56fe 1 \u6240\u793a\uff0cGrammar \u5229\u7528\u4e86\u5b57\u8282\u7ea7\u4e0b\u63a8\u81ea\u52a8\u673a\uff08byte-level pushdown automaton\uff09\u6765\u89e3\u91ca\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-53ecc7359ee409684e030a93c03fcbfe.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-53ecc7359ee409684e030a93c03fcbfe.png\"><\/a><\/section>\n<section>\u8fd9\u79cd\u5b57\u8282\u7ea7\u8bbe\u8ba1\u5141\u8bb8\u6bcf\u4e2a\u5b57\u7b26\u8fb9\u7f18\u5305\u542b\u4e00\u4e2a\u6216\u591a\u4e2a\u5b57\u8282\uff0c\u5904\u7406\u4e0d\u89c4\u5219\u7684 token \u8fb9\u754c\u5e76\u652f\u6301\u5305\u542b sub-UTF8 \u5b57\u7b26\u7684 token \u3002\u8be5\u81ea\u52a8\u673a\u7684\u7ed3\u6784\u7ecf\u8fc7\u4f18\u5316\u4ee5\u52a0\u5feb\u5339\u914d\u901f\u5ea6\u3002<\/section>\n<section><\/section>\n<section>\u5728\u9884\u5904\u7406\u9636\u6bb5\uff0c\u4f1a\u751f\u6210\u4e00\u4e2a\u81ea\u9002\u5e94 token \u63a9\u7801\u7f13\u5b58\uff0c\u5b83\u4f1a\u901a\u8fc7\u9884\u5148\u8ba1\u7b97\u4e0e\u4e0a\u4e0b\u6587\u65e0\u5173\u7684 token \u6765\u52a0\u5feb\u8fd0\u884c\u65f6\u7684\u63a9\u7801\u751f\u6210\u3002\u4e0a\u4e0b\u6587\u6269\u5c55\uff08context extension\uff09\u80fd\u8fdb\u4e00\u6b65\u63d0\u5347\u8fd9\u79cd\u7f13\u5b58\u7684\u6709\u6548\u6027\u3002<\/section>\n<section><\/section>\n<section>\u5728\u8fd0\u884c\u65f6\uff0ctoken \u63a9\u7801\u7f13\u5b58\u4f1a\u5feb\u901f\u751f\u6210\u5927\u90e8\u5206\u63a9\u7801\uff0c\u800c\u6301\u7eed\u6027\u6267\u884c\u5806\u6808\u4f1a\u9ad8\u6548\u5904\u7406\u5176\u4f59\u7684\u4e0a\u4e0b\u6587\u76f8\u5173 token\u3002<\/section>\n<section><\/section>\n<section>\u6b64\u5916\uff0c\u63a9\u7801\u751f\u6210\u548c LLM \u63a8\u7406\u662f\u4e92\u76f8\u91cd\u53e0\u7684\uff0c\u4ee5\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u7ea6\u675f\u89e3\u7801\u7684\u5f00\u9500\u3002\u4e00\u65e6 LLM \u5728\u63a9\u7801\u7ea6\u675f\u4e0b\u751f\u6210\u65b0 token\uff0c\u5c31\u4f1a\u4f7f\u7528\u6b64 token \u6765\u66f4\u65b0\u4e0b\u63a8\u81ea\u52a8\u673a\u7684\u5806\u6808\u72b6\u6001\uff0c\u4ee5\u8fdb\u884c\u4e0b\u4e00\u6b21\u63a9\u7801\u751f\u6210\u3002<\/section>\n<section><\/section>\n<section>\u5177\u4f53\u6765\u8bf4\uff0c\u9648\u5929\u5947\u56e2\u961f\u9996\u5148\u5f97\u5230\u4e86\u4e00\u4e2a\u89c1\u89e3\uff1a\u867d\u7136\u65e0\u6cd5\u9884\u5148\u8ba1\u7b97\u4e0b\u63a8\u81ea\u52a8\u673a\uff08PDA\uff09\u65e0\u9650\u591a\u4e2a\u72b6\u6001\u7684\u5b8c\u6574\u63a9\u7801\uff0c\u4f46\u53ef\u4ee5\u9884\u5148\u8ba1\u7b97\u63a9\u7801\u4e2d\u76f8\u5f53\u4e00\u90e8\u5206\uff08\u901a\u5e38\u8d85\u8fc7 99%\uff09\u7684 token\u3002\u56e0\u6b64\uff0c\u53ef\u5c06\u8fd9\u4e9b token \u5206\u6210\u4e24\u7c7b\uff1a<\/section>\n<ul>\n<li>\n<p>\u4e0a\u4e0b\u6587\u65e0\u5173 token\uff1a\u4ec5\u901a\u8fc7\u67e5\u770b PDA \u4e2d\u7684\u5f53\u524d\u4f4d\u7f6e\u800c\u4e0d\u662f\u5806\u6808\u5373\u53ef\u786e\u5b9a\u5176\u6709\u6548\u6027\u7684 token\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e0a\u4e0b\u6587\u76f8\u5173 token\uff1a\u5fc5\u987b\u4f7f\u7528\u6574\u4e2a\u5806\u6808\u6765\u786e\u5b9a\u5176\u6709\u6548\u6027\u7684 token\u3002<\/p>\n<\/li>\n<\/ul>\n<section>\u4e0b\u56fe\u5c55\u793a\u4e86\u4e00\u7ec4\u4e0a\u4e0b\u6587\u76f8\u5173\u548c\u65e0\u5173 token \u7684\u793a\u4f8b\u3002\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u4e0a\u4e0b\u6587\u65e0\u5173 token \u5360\u5927\u591a\u6570\u3002\u6211\u4eec\u53ef\u4ee5\u9884\u5148\u8ba1\u7b97 PDA \u4e2d\u6bcf\u4e2a\u4f4d\u7f6e\u7684\u4e0a\u4e0b\u6587\u65e0\u5173 token \u7684\u6709\u6548\u6027\uff0c\u5e76\u5c06\u5b83\u4eec\u5b58\u50a8\u5728\u81ea\u9002\u5e94 token \u63a9\u7801\u7f13\u5b58\u4e2d\u3002\u6b64\u8fc7\u7a0b\u79f0\u4e3a\u8bed\u6cd5\u7f16\u8bd1\uff08grammar compilation\uff09\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-b77e6d76ac041d150561d780816bbebb.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-b77e6d76ac041d150561d780816bbebb.png\"><\/a><\/section>\n<section>\u4e0b\u56fe\u5219\u5c55\u793a\u4e86\u81ea\u9002\u5e94\u5b58\u50a8\u683c\u5f0f\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-d7b29d3ddd499cf7ea820dcd99570b62.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-d7b29d3ddd499cf7ea820dcd99570b62.png\"><\/a><\/section>\n<section>\u5728\u8fd0\u884c\u65f6\uff0c\u9996\u5148\u68c0\u7d22\u6765\u81ea\u7f13\u5b58\u7684\u4e0a\u4e0b\u6587\u65e0\u5173 token \u7684\u6709\u6548\u6027\u3002\u7136\u540e\uff0c\u9ad8\u6548\u5730\u6267\u884c PDA \u6765\u68c0\u67e5\u5176\u4f59\u7684\u4e0a\u4e0b\u6587\u76f8\u5173 token\u3002\u901a\u8fc7\u8df3\u8fc7\u8fd0\u884c\u65f6\u68c0\u67e5\u5927\u591a\u6570 token\uff0c\u4fbf\u53ef\u4ee5\u663e\u8457\u52a0\u5feb\u63a9\u7801\u751f\u6210\u901f\u5ea6\u3002XGrammar \u6267\u884c\u65f6\u95f4\u7684\u6574\u4f53\u5de5\u4f5c\u6d41\u7a0b\u89c1\u56fe 1\u3002<\/section>\n<section><\/section>\n<section>\u6b64\u5916\uff0c\u4ed6\u4eec\u8fd8\u8bbe\u8ba1\u4e86\u4e00\u7ec4\u989d\u5916\u7684\u7b97\u6cd5\u548c\u7cfb\u7edf\u4f18\u5316\u65b9\u6cd5\uff0c\u4ee5\u8fdb\u4e00\u6b65\u63d0\u9ad8\u63a9\u7801\u751f\u6210\u901f\u5ea6\u5e76\u51cf\u5c11\u9884\u5904\u7406\u65f6\u95f4\uff0c\u5305\u62ec\u4e0a\u4e0b\u6587\u6269\u5c55\u3001\u6301\u7eed\u6027\u6267\u884c\u690e\u6808\u3001\u4e0b\u63a8\u81ea\u52a8\u673a\u7ed3\u6784\u4f18\u5316\u3001\u5e76\u884c\u5f0f\u8bed\u6cd5\u7f16\u8bd1\u3002<\/section>\n<section><\/section>\n<section><strong>\u4e0a\u4e0b\u6587\u6269\u5c55<\/strong><\/section>\n<section><\/section>\n<section>\u8be5\u56e2\u961f\u63d0\u51fa\u7684\u65b9\u6cd5\u662f\u68c0\u6d4b\u8bed\u6cd5\u4e2d\u6bcf\u4e2a\u89c4\u5219\u7684\u989d\u5916\u4e0a\u4e0b\u6587\u4fe1\u606f\uff0c\u5e76\u5c06\u5176\u7528\u4e8e\u51cf\u5c11\u4e0a\u4e0b\u6587\u76f8\u5173 token \u7684\u6570\u91cf\uff0c\u5e76\u8fdb\u4e00\u6b65\u52a0\u5feb\u8fd0\u884c\u65f6\u68c0\u67e5\u901f\u5ea6\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-de2be71787c0b8061fe7091c53844a77.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-de2be71787c0b8061fe7091c53844a77.png\"><\/a><\/section>\n<section><strong>\u6301\u7eed\u6027\u6267\u884c\u5806\u6808<\/strong><\/section>\n<section><\/section>\n<section>\u4e3a\u4e86\u52a0\u5feb\u7531\u4e8e\u591a\u79cd\u53ef\u80fd\u7684\u6269\u5c55\u8def\u5f84\u800c\u5bfc\u81f4\u7684\u62c6\u5206\u548c\u5408\u5e76\u671f\u95f4\u591a\u4e2a\u5e76\u884c\u5806\u6808\u7684\u7ef4\u62a4\u901f\u5ea6\uff0c\u4ed6\u4eec\u8bbe\u8ba1\u4e86\u4e00\u4e2a\u57fa\u4e8e\u6811\u7684\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u540c\u65f6\u7ba1\u7406\u591a\u4e2a\u5806\u6808\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-7ea845f0a86f1b862436dabc8bec8aa4.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-7ea845f0a86f1b862436dabc8bec8aa4.png\"><\/a><\/section>\n<section>\u5b83\u8fd8\u53ef\u4ee5\u5b58\u50a8\u4ee5\u524d\u7684\u72b6\u6001\u5e76\u5b9e\u73b0\u9ad8\u6548\u7684\u72b6\u6001\u56de\u6eda\uff0c\u4ece\u800c\u52a0\u5feb\u4e0a\u4e0b\u6587\u76f8\u5173 token \u7684\u8fd0\u884c\u65f6\u68c0\u67e5\u901f\u5ea6\u3002<\/section>\n<section><\/section>\n<section><strong>\u4e0b\u63a8\u81ea\u52a8\u673a\u7ed3\u6784\u4f18\u5316<\/strong><\/section>\n<section><\/section>\n<section>\u7814\u7a76\u8005\u8fdb\u884c\u4e86\u989d\u5916\u7684\u4f18\u5316\uff0c\u4ee5\u6539\u8fdb\u4e0b\u63a8\u81ea\u52a8\u673a\u7684\u7ed3\u6784\uff0c\u52a0\u5feb\u6700\u7ec8\u6267\u884c\u7684\u6548\u7387\u3002\u8fd9\u4e9b\u4f18\u5316\u501f\u9274\u4e86\u4f20\u7edf\u7684\u7f16\u8bd1\u5668\u4f18\u5316\u6982\u5ff5\uff0c\u5b83\u4eec\u5bf9\u4e8e\u9ad8\u6548\u7ea6\u675f\u89e3\u7801\u7279\u522b\u6709\u7528\u3002<\/section>\n<section><\/section>\n<section>\u4e00\u662f\u89c4\u5219\u5185\u8054\u3002\u5728\u6307\u5b9a\u7684\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\u4e2d\uff0c\u53ef\u80fd\u6709\u8bb8\u591a\u7247\u6bb5\u89c4\u5219\uff0c\u5373\u53ea\u6709\u5c11\u6570\u5143\u7d20\u7684\u89c4\u5219\uff0c\u7136\u540e\u5728\u4e0b\u63a8\u81ea\u52a8\u673a\u4e2d\u5c06\u5176\u8f6c\u6362\u4e3a\u5c0f\u7684 FSA\uff08\u6709\u9650\u72b6\u6001\u81ea\u52a8\u673a\uff09\u3002<\/section>\n<section><\/section>\n<section>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u7814\u7a76\u8005\u4e3a\u7247\u6bb5\u89c4\u5219\u5f15\u5165\u4e86\u4e00\u79cd\u81ea\u52a8\u5185\u8054\u7b56\u7565\u3002\u4ed6\u4eec\u8fed\u4ee3\u5730\u9009\u62e9\u4e0d\u5f15\u7528\u5176\u4ed6\u89c4\u5219\u7684\u89c4\u5219\u5e76\u5c06\u5b83\u4eec\u5185\u8054\u5230\u7236\u89c4\u5219\u4e2d\u3002\u4e3a\u4e86\u907f\u514d\u81ea\u52a8\u673a\u5927\u5c0f\u7684\u7206\u70b8\u5f0f\u589e\u957f\uff0c\u7814\u7a76\u8005\u5c06\u5185\u8054\u89c4\u5219\u548c\u5185\u8054\u7ed3\u679c\u7684\u5927\u5c0f\u9650\u5236\u4e3a\u5e38\u91cf\u3002\u8be5\u5185\u8054\u8fc7\u7a0b\u51e0\u4e4e\u6d88\u9664\u4e86\u7247\u6bb5\u89c4\u5219\uff0c\u4ece\u800c\u63d0\u9ad8\u4e86 token \u68c0\u67e5\u7684\u6548\u7387\u5e76\u589e\u5f3a\u4e86\u4e0a\u4e0b\u6587\u6269\u5c55\u7684\u6709\u6548\u6027\u3002<\/section>\n<section><\/section>\n<section>\u4e8c\u662f\u4e0b\u63a8\u81ea\u52a8\u673a\u8282\u70b9\u5408\u5e76\u3002\u5bf9\u4e8e\u4e0b\u63a8\u81ea\u52a8\u673a\uff0c\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u6b67\u4e49\u6765\u81ea\u5177\u6709\u76f8\u540c\u6807\u7b7e\u7684\u8282\u70b9\u7684\u591a\u4e2a\u5916\u5411\u8fb9\u3002\u5728\u5339\u914d token \u65f6\uff0c\u5982\u679c\u5230\u8fbe\u6b64\u8282\u70b9\uff0c\u5e76\u4e14\u4e0b\u4e00\u4e2a\u5b57\u7b26\u6070\u597d\u4e0e\u6807\u7b7e\u5339\u914d\uff0c\u5219\u5339\u914d\u5806\u6808\u5c06\u88ab\u62c6\u5206\u4e3a\u591a\u4e2a\u5806\u6808\uff0c\u6bcf\u4e2a\u5916\u5411\u8fb9\u4e00\u4e2a\u3002\u5806\u6808\u6570\u91cf\u589e\u591a\u4f1a\u589e\u52a0\u8ba1\u7b97\u91cf\uff0c\u8fd9\u662f\u56e0\u4e3a\u9700\u8981\u68c0\u67e5\u6bcf\u4e2a\u5806\u6808\u7684\u4e0a\u4e0b\u6587\u76f8\u5173 token \u5e76\u5408\u5e76 token \u63a9\u7801\u3002<\/section>\n<section><\/section>\n<section>\u4e3a\u4e86\u51cf\u5c11\u8fd9\u79cd\u6b67\u4e49\uff0c\u8282\u70b9\u5408\u5e76\u7b97\u6cd5\u4f1a\u5408\u5e76\u6ee1\u8db3\u4ee5\u4e0b\u4e24\u4e2a\u6761\u4ef6\u7684\u540e\u7eed\u8282\u70b9\uff0ca\uff09\u5b83\u4eec\u7531\u6765\u81ea\u540c\u4e00\u70b9\u7684\u5177\u6709\u76f8\u540c\u6807\u7b7e\u7684\u8fb9\u6307\u5411\uff0cb\uff09\u5b83\u4eec\u6ca1\u6709\u88ab\u5176\u4ed6\u8fb9\u6307\u5411\u3002<\/section>\n<section><\/section>\n<section>\u4ee5\u4e0a\u4e24\u79cd\u4f18\u5316\u4fdd\u7559\u4e86\u81ea\u52a8\u673a\u7684\u7b49\u6548\u6027\uff0c\u4f46\u51cf\u5c11\u4e86\u8282\u70b9\u548c\u8fb9\u7684\u6570\u91cf\u3002\u8fd0\u884c\u65f6\uff0c\u51cf\u5c11\u4e86\u5806\u6808\u7684\u6570\u91cf\u548c token \u68c0\u67e5\u6240\u9700\u7684\u8ba1\u7b97\u91cf\uff0c\u4ece\u800c\u52a0\u5feb\u4e86\u63a9\u7801\u7684\u751f\u6210\u8fc7\u7a0b\u3002<\/section>\n<section><\/section>\n<section><strong>\u91cd\u53e0\u63a9\u7801\u751f\u6210\u548c LLM \u63a8\u7406<\/strong><\/section>\n<section><\/section>\n<section>\u901a\u8fc7\u4e0a\u8ff0\u4f18\u5316\uff0ctoken \u63a9\u7801\u751f\u6210\u8fc7\u7a0b\u663e\u8457\u52a0\u5feb\uff0c\u4f46\u4ecd\u9700\u8981 CPU \u8ba1\u7b97\u3002\u4e3a\u4e86\u8fdb\u4e00\u6b65\u6d88\u9664\u7ea6\u675f\u89e3\u7801\u7684\u5f00\u9500\uff0c\u7814\u7a76\u8005\u5c06 mask \u751f\u6210\u8ba1\u7b97\u4e0e LLM \u63a8\u7406\u8fc7\u7a0b\u91cd\u53e0\uff0c\u5982\u4e0b\u56fe 8 \u6240\u793a\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-b04fb90235e3c191895b39176e344f98.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-b04fb90235e3c191895b39176e344f98.png\"><\/a><\/section>\n<section>\u7814\u7a76\u8005\u89c2\u5bdf\u5230\uff0cmask \u751f\u6210\u8fc7\u7a0b\u548c LLM \u63a8\u7406\u8fc7\u7a0b\u53ef\u4ee5\u91cd\u53e0\uff0c\u539f\u56e0\u5728\u4e8e mask \u751f\u6210\u53ea\u9700\u8981 CPU\uff0c\u5e76\u4e14\u53ea\u4f9d\u8d56\u4e8e\u4e4b\u524d\u751f\u6210\u7684 token\u3002LLM \u63a8\u7406\u8fc7\u7a0b\uff08\u9664\u91c7\u6837\u9636\u6bb5\u5916\uff09\u53ea\u9700\u8981 GPU\uff0c\u5e76\u4e14\u4e5f\u53ea\u4f9d\u8d56\u4e8e\u4e4b\u524d\u751f\u6210\u7684 token\u3002\u56e0\u6b64\u53ef\u4ee5\u5c06 CPU \u4e0a\u7684 mask \u751f\u6210\u8fc7\u7a0b\u4e0e GPU \u4e0a\u7684 LLM \u63a8\u7406\u8fc7\u7a0b\u5e76\u884c\u5316\u3002<\/section>\n<section><\/section>\n<section><strong>\u8bc4\u4f30\u7ed3\u679c<\/strong><\/section>\n<section><\/section>\n<section>\u7814\u7a76\u8005\u5229\u7528 12,000 \u884c\u6838\u5fc3 C++ \u4ee3\u7801\u6765\u5b9e\u73b0 XGrammar\uff0c\u5e76\u63d0\u4f9b\u4e86 Python \u6346\u7ed1\u5305\u4ee5\u65b9\u4fbf\u4e0e LLM \u63a8\u7406\u6846\u67b6\u65e0\u7f1d\u96c6\u6210\u3002\u4ed6\u4eec\u5728\u8bc4\u4f30 XGrammar \u8fc7\u7a0b\u4e2d\u56de\u7b54\u4ee5\u4e0b\u51e0\u4e2a\u95ee\u9898\uff1a<\/section>\n<ul>\n<li>\n<p>XGrammar \u80fd\u5426\u9ad8\u6548\u652f\u6301\u7ea6\u675f\u89e3\u7801\u7684\u6bcf\u4e2a\u6b65\u9aa4\uff1f<\/p>\n<\/li>\n<li>\n<p>XGrammar \u80fd\u5426\u5728 LLM serving \u4e2d\u5b9e\u73b0\u7aef\u5230\u7aef\u7ed3\u6784\u5316\u751f\u6210\u7684\u6700\u5c0f\u5f00\u9500\uff1f<\/p>\n<\/li>\n<li>\n<p>XGrammar \u80fd\u5426\u90e8\u7f72\u5728\u66f4\u5e7f\u6cdb\u7684\u5e73\u53f0\u4e0a\uff1f<\/p>\n<\/li>\n<\/ul>\n<section><strong>\u8bed\u6cd5\u5f15\u64ce\u6548\u7387<\/strong><\/section>\n<section><\/section>\n<section>\u672c\u8282\u4e2d\u8bc4\u4f30\u4e86\u8bed\u6cd5\u5f15\u64ce\u7684\u6027\u80fd\u3002\u7814\u7a76\u8005\u5728 Llama-3.1-8B Instruct \u4e0a\u8bc4\u4f30\u4e86\u4ed6\u4eec\u7684\u65b9\u6cd5\u548c\u57fa\u7ebf\uff0c\u8be5\u6a21\u578b\u80fd\u591f\u9075\u5faa\u4eba\u7c7b\u7684\u6307\u4ee4\u3002<\/section>\n<section><\/section>\n<section>\u7ed3\u679c\u5982\u4e0b\u56fe 9 \u6240\u793a\uff0c\u5728 JSON \u6a21\u5f0f\u8bbe\u7f6e\u4e2d\uff0cXGrammar \u53ef\u4ee5\u5b9e\u73b0\u9ad8\u8fbe 3 \u500d\u7684\u52a0\u901f\uff1b\u5728 JSON \u8bed\u6cd5\u7528\u4f8b\u4e0b\uff0c\u53ef\u4ee5\u5b9e\u73b0\u8d85\u8fc7 100 \u500d\u7684\u52a0\u901f\u3002\u4e0e JSON \u6a21\u5f0f\uff08\u66f4\u53d7\u9650\u5236\uff09\u76f8\u6bd4\uff0cJSON \u7684\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\u5305\u542b\u66f4\u590d\u6742\u7684\u89c4\u5219\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u5305\u542b\u9012\u5f52\u5217\u8868\u548c\u5b57\u5178\uff0c\u5bfc\u81f4\u8bed\u6cd5\u5f15\u64ce\u66f4\u96be\u6709\u6548\u5730\u6267\u884c\u5b83\u3002<\/section>\n<section><\/section>\n<section>\u5728\u8fd9\u4e24\u79cd\u60c5\u51b5\u4e0b\uff0cXGrammar \u90fd\u53ef\u4ee5\u5728\u4e0d\u5230 40 \u5fae\u79d2\u7684\u65f6\u95f4\u5185\u751f\u6210\u6bcf\u4e2a token \u7684\u63a9\u7801\uff0c\u4f7f\u5176\u6210\u4e3a\u4f4e\u5ef6\u8fdf LLM \u63a8\u7406\u7684\u7406\u60f3\u9009\u62e9\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-1ae92bb25f48ee231d77f3b99a70c9b7.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-1ae92bb25f48ee231d77f3b99a70c9b7.png\"><\/a><\/section>\n<section><strong>\u7aef\u5230\u7aef LLM \u5f15\u64ce\u8bc4\u4f30<\/strong><\/section>\n<section><\/section>\n<section>\u672c\u8282\u5728 LLM serving \u8bbe\u7f6e\u4e0b\u6765\u8bc4\u4f30 XGrammar\u3002\u7814\u7a76\u8005\u5c06 XGrammar \u96c6\u6210\u5230\u7aef\u5230\u7aef LLM \u63a8\u7406\u6846\u67b6\u4e2d\uff0c\u5e76\u4e0e\u5176\u4ed6 LLM serving \u6846\u67b6\u8fdb\u884c\u6548\u7387\u6bd4\u8f83\u3002\u540c\u65f6\uff0c\u4ed6\u4eec\u8fd8\u4e0e\u5176\u4ed6\u652f\u6301\u7ed3\u6784\u5316\u751f\u6210\u7684 LLM \u5f15\u64ce\u8fdb\u884c\u6548\u7387\u6bd4\u8f83\uff0c\u5305\u62ec\u96c6\u6210 Outlines \u7684 vLLM (v0.6.3) \u548c\u5185\u7f6e\u8bed\u6cd5\u5f15\u64ce\u7684 llama.cpp\u3002<\/section>\n<section><\/section>\n<section>\u5b9e\u9a8c\u7ed3\u679c\u5982\u4e0b\u56fe 10 \u6240\u793a\uff0cXGrammar \u5728 CFG \u548c JSON \u6a21\u5f0f\u7684\u6240\u6709\u57fa\u7ebf\u4e2d\u5b9e\u73b0\u4e86\u6700\u4f73\u7684 TTFT \u548c TPOT\u3002vLLM \u548c llama.cpp \u7684\u8ba1\u7b97\u53d7\u5230\u5176\u8bed\u6cd5\u5f15\u64ce\u66f4\u957f\u9884\u5904\u7406\u548c\u6bcf\u4e2a token \u5904\u7406\u65f6\u957f\u7684\u963b\u788d\u3002<\/section>\n<section><\/section>\n<section>\u5728\u6279\u91cf\u8f83\u5927\u7684\u60c5\u51b5\u4e0b\uff0cvLLM \u4e2d TPOT \u901f\u5ea6\u7684\u4e0b\u964d\u5c24\u4e3a\u660e\u663e\u3002\u4e0e\u73b0\u6709\u89e3\u51b3\u65b9\u6848\u76f8\u6bd4\uff0cXGrammar \u5f15\u64ce\u603b\u4f53\u4e0a\u53ef\u4ee5\u5c06\u8f93\u51fa token \u7684\u901f\u5ea6\u63d0\u9ad8 80 \u500d\u3002\u8fd9\u79cd\u52a0\u901f\u6765\u81ea XGrammar \u5e26\u6765\u7684\u6027\u80fd\u4f18\u5316\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-ce5c8250fd0f8ead465ff0b5e7a807e5.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-ce5c8250fd0f8ead465ff0b5e7a807e5.png\"><\/a><\/section>\n<section>\u7814\u7a76\u8005\u8fd8\u5728\u4e0b\u8868 1 \u4e2d\u7814\u7a76\u4e86\u8bed\u6cd5\u5904\u7406\u7684\u5f00\u9500\u95ee\u9898\u3002\u7531\u4e8e token \u63a9\u7801\u751f\u6210\u6548\u7387\u548c\u8bed\u6cd5 GPU \u91cd\u53e0\uff0c\u8bed\u6cd5\u8fc7\u7a0b\u5728 TPOT \u4e2d\u51e0\u4e4e\u4e0d\u4ea7\u751f\u4efb\u4f55\u5f00\u9500\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-8cfffd8f9b8ad702fdd6cb07c2d7d7dc.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-8cfffd8f9b8ad702fdd6cb07c2d7d7dc.png\"><\/a><\/section>\n<section><strong>\u8de8\u5e73\u53f0\u90e8\u7f72<\/strong><\/section>\n<section><\/section>\n<section>\u672c\u8282\u63a2\u8ba8\u5982\u4f55\u5c06 XGrammar \u5f15\u5165\u5404\u79cd\u5e73\u53f0\u3002\u7814\u7a76\u8005\u5229\u7528 Emscripten \u5c06 XGrammar \u7f16\u8bd1\u6210 WebAssembly \u5e76\u6784\u5efa JavaScript \u6346\u7ed1\u5305\u3002\u4ed6\u4eec\u8fdb\u4e00\u6b65\u5c06 web-binding \u4e0e\u6d4f\u89c8\u5668\u5185 LLM \u63a8\u7406\u6846\u67b6 WebLLM \u96c6\u6210\uff0c\u4ee5\u5b9e\u73b0\u7ed3\u6784\u5316\u751f\u6210\u3002<\/section>\n<section><\/section>\n<section>\u7814\u7a76\u8005\u4f7f\u7528 JSON-mode-eval \u6570\u636e\u96c6\u8bc4\u4f30\u7aef\u5230\u7aef\u6027\u80fd\uff0c\u5728\u88c5\u6709 Google Chrome \u7684 MacBook Pro M3 Max\uff08macOS 14.5\uff09\u4e0a\u4f7f\u7528 4 \u4f4d\u91cf\u5316\u6a21\u578b Llama-3.1-8B-Instruct\uff0c\u5e76\u5728\u88c5\u6709 Safari \u7684 iPhone 14 Pro Max\uff08iOS 18\uff09\u4e0a\u4f7f\u7528 Qwen2.5-0.5B-Instruct\u3002<\/section>\n<section><\/section>\n<section>\u7ed3\u679c\u5982\u4e0b\u56fe 11 \u6240\u793a\uff0c\u7814\u7a76\u8005\u6bd4\u8f83\u4e86\u4f7f\u7528 XGrammar \u8fdb\u884c\u7ed3\u6784\u5316\u751f\u6210\u548c\u975e\u7ed3\u6784\u5316\u751f\u6210\u65f6\u7684\u7b2c\u4e00\u4e2a token \u65f6\u95f4 (TTFT) \u548c\u6bcf\u4e2a\u8f93\u51fa token \u65f6\u95f4 (TPOT)\uff0c\u540c\u65f6\u786e\u4fdd\u751f\u6210\u7684 token \u6570\u91cf\u76f8\u540c\u3002\u7ed3\u679c\u8868\u660e\uff0cXGrammar \u5728\u4e24\u79cd\u8bbe\u7f6e\u4e0b\u90fd\u51e0\u4e4e\u5b9e\u73b0\u4e86\u96f6\u5f00\u9500\uff0c\u5728\u652f\u6301\u672a\u6765\u9ad8\u6027\u80fd\u7aef\u4fa7\u667a\u80fd\u4f53\u65b9\u9762\u5177\u6709\u5de8\u5927\u6f5c\u529b\u3002<\/section>\n<section><a href=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-49a2e48bcf84b6a15af9cfb500a20e0f.png\" data-fancybox=\"images\" data-fancybox=\"gallery\"><img decoding=\"async\" src=\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-49a2e48bcf84b6a15af9cfb500a20e0f.png\"><\/a><\/section>\n<section>\u66f4\u591a\u6280\u672f\u7ec6\u8282\u8bf7\u53c2\u9605\u539f\u8bba\u6587\u3002<\/section>\n<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:<a href=\"https:\/\/www.jiqizhixin.com\/articles\/2024-11-26-4\" target=\"_blank\">\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6765\u6e90\u4e8e\u4e92\u8054\u7f51:\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[27],"tags":[],"class_list":["post-36850","post","type-post","status-publish","format-standard","hentry","category-news"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500 - \u4e00\u8d77AI\u6280\u672f<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/17aitech.com\/?p=36850\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/17aitech.com\/?p=36850\",\"url\":\"https:\/\/17aitech.com\/?p=36850\",\"name\":\"\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500 - \u4e00\u8d77AI\u6280\u672f\",\"isPartOf\":{\"@id\":\"https:\/\/17aitech.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/17aitech.com\/?p=36850#primaryimage\"},\"image\":{\"@id\":\"https:\/\/17aitech.com\/?p=36850#primaryimage\"},\"thumbnailUrl\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png\",\"datePublished\":\"2025-01-19T12:00:14+00:00\",\"author\":{\"@id\":\"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d\"},\"breadcrumb\":{\"@id\":\"https:\/\/17aitech.com\/?p=36850#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/17aitech.com\/?p=36850\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/17aitech.com\/?p=36850#primaryimage\",\"url\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png\",\"contentUrl\":\"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/17aitech.com\/?p=36850#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/17aitech.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/17aitech.com\/#website\",\"url\":\"https:\/\/17aitech.com\/\",\"name\":\"\u4e00\u8d77AI\u6280\u672f\",\"description\":\"\u8ba9AI\u77e5\u8bc6\u89e6\u624b\u53ef\u53ca\",\"alternateName\":\"\u4e00\u8d77AI\u6280\u672f\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/17aitech.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d\",\"name\":\"AI\u5c0f\u52a9\u624b\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/17aitech.com\/#\/schema\/person\/image\/\",\"url\":\"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png\",\"contentUrl\":\"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png\",\"caption\":\"AI\u5c0f\u52a9\u624b\"},\"description\":\"\u8fd9\u4e2a\u4eba\u5f88\u61d2\uff0c\u4ec0\u4e48\u90fd\u6ca1\u6709\u7559\u4e0b\uff5e\",\"url\":\"https:\/\/17aitech.com\/?page_id=33738&user=3\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500 - \u4e00\u8d77AI\u6280\u672f","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/17aitech.com\/?p=36850","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/17aitech.com\/?p=36850","url":"https:\/\/17aitech.com\/?p=36850","name":"\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500 - \u4e00\u8d77AI\u6280\u672f","isPartOf":{"@id":"https:\/\/17aitech.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/17aitech.com\/?p=36850#primaryimage"},"image":{"@id":"https:\/\/17aitech.com\/?p=36850#primaryimage"},"thumbnailUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png","datePublished":"2025-01-19T12:00:14+00:00","author":{"@id":"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d"},"breadcrumb":{"@id":"https:\/\/17aitech.com\/?p=36850#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/17aitech.com\/?p=36850"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/17aitech.com\/?p=36850#primaryimage","url":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png","contentUrl":"https:\/\/17aitech.com\/wp-content\/uploads\/2024\/11\/frc-99e6804c811daab9f3189ea52b9de125.png"},{"@type":"BreadcrumbList","@id":"https:\/\/17aitech.com\/?p=36850#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/17aitech.com\/"},{"@type":"ListItem","position":2,"name":"\u9648\u5929\u5947\u56e2\u961fLLM\u7ed3\u6784\u5316\u751f\u6210\u65b0\u5f15\u64ceXGrammar\uff1a\u767e\u500d\u52a0\u901f\u3001\u8fd1\u96f6\u5f00\u9500"}]},{"@type":"WebSite","@id":"https:\/\/17aitech.com\/#website","url":"https:\/\/17aitech.com\/","name":"\u4e00\u8d77AI\u6280\u672f","description":"\u8ba9AI\u77e5\u8bc6\u89e6\u624b\u53ef\u53ca","alternateName":"\u4e00\u8d77AI\u6280\u672f","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/17aitech.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/17aitech.com\/#\/schema\/person\/60225458499e817ae0af73e67e440b9d","name":"AI\u5c0f\u52a9\u624b","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/17aitech.com\/#\/schema\/person\/image\/","url":"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png","contentUrl":"\/\/17aitech.com\/wp-content\/uploads\/2024\/04\/robot_3.png","caption":"AI\u5c0f\u52a9\u624b"},"description":"\u8fd9\u4e2a\u4eba\u5f88\u61d2\uff0c\u4ec0\u4e48\u90fd\u6ca1\u6709\u7559\u4e0b\uff5e","url":"https:\/\/17aitech.com\/?page_id=33738&user=3"}]}},"_links":{"self":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts\/36850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36850"}],"version-history":[{"count":0,"href":"https:\/\/17aitech.com\/index.php?rest_route=\/wp\/v2\/posts\/36850\/revisions"}],"wp:attachment":[{"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/17aitech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}