[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72312":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},72312,"DeepSeek-Math","deepseek-ai\u002FDeepSeek-Math","deepseek-ai","DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models","",null,"Python",3319,582,38,0,7,19,46,21,88.4,"MIT License",false,"main",[],"2026-06-12 04:01:04","\n\u003C!-- markdownlint-disable first-line-h1 -->\n\u003C!-- markdownlint-disable html -->\n\u003C!-- markdownlint-disable no-duplicate-header -->\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"images\u002Flogo.svg\" width=\"60%\" alt=\"DeepSeek LLM\" \u002F>\n\u003C\u002Fdiv>\n\u003Chr>\n\u003Cdiv align=\"center\">\n\n  \u003Ca href=\"https:\u002F\u002Fwww.deepseek.com\u002F\" target=\"_blank\">\n    \u003Cimg alt=\"Homepage\" src=\"images\u002Fbadge.svg\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fchat.deepseek.com\u002F\" target=\"_blank\">\n    \u003Cimg alt=\"Chat\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤖%20Chat-DeepSeek%20LLM-536af5?color=536af5&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdeepseek-ai\" target=\"_blank\">\n    \u003Cimg alt=\"Hugging Face\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-DeepSeek%20AI-ffc107?color=ffc107&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Freplicate.com\u002Fcjwbw\u002Fdeepseek-math-7b-base\" target=\"_parent\">\u003Cimg src=\"https:\u002F\u002Freplicate.com\u002Fcjwbw\u002Fdeepseek-math-7b-base\u002Fbadge\" alt=\"Replicate\"\u002F>\u003C\u002Fa> \n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FTc7c45Zzu5\" target=\"_blank\">\n    \u003Cimg alt=\"Discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-DeepSeek%20AI-7289da?logo=discord&logoColor=white&color=7289da\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"images\u002Fqr.jpeg\" target=\"_blank\">\n    \u003Cimg alt=\"Wechat\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWeChat-DeepSeek%20AI-brightgreen?logo=wechat&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002Fdeepseek_ai\" target=\"_blank\">\n    \u003Cimg alt=\"Twitter Follow\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTwitter-deepseek_ai-white?logo=x&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\n  \u003Ca href=\"LICENSE-CODE\">\n    \u003Cimg alt=\"Code License\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCode_License-MIT-f5de53?&color=f5de53\">\n  \u003C\u002Fa>\n  \u003Ca href=\"LICENSE-MODEL\">\n    \u003Cimg alt=\"Model License\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel_License-Model_Agreement-f5de53?&color=f5de53\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#4-model-downloads\">Model Download\u003C\u002Fa> |\n  \u003Ca href=\"#2-evaluation-results\">Evaluation Results\u003C\u002Fa> |\n  \u003Ca href=\"#5-quick-start\">Quick Start\u003C\u002Fa> |\n  \u003Ca href=\"#6-license\">License\u003C\u002Fa> |\n  \u003Ca href=\"#7-citation\">Citation\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2402.03300.pdf\">\u003Cb>Paper Link\u003C\u002Fb>👁️\u003C\u002Fa>\n\u003C\u002Fp>\n\n\n## 1. Introduction\n\nDeepSeekMath is initialized with [DeepSeek-Coder-v1.5 7B](https:\u002F\u002Fhuggingface.co\u002Fdeepseek-ai\u002Fdeepseek-coder-7b-base-v1.5) and continues pre-training on math-related tokens sourced from Common Crawl, together with natural language and code data for 500B tokens. DeepSeekMath 7B has achieved an impressive score of **51.7%** on the competition-level MATH benchmark without relying on external toolkits and voting techniques, approaching the performance level of Gemini-Ultra and GPT-4. For research purposes, we release [checkpoints](#4-model-downloads) of base, instruct, and RL models to the public.\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"images\u002Fmath.png\" alt=\"table\" width=\"70%\">\n\u003C\u002Fp>\n\n## 2. Evaluation Results\n\n### DeepSeekMath-Base 7B\n\nWe conduct a comprehensive assessment of the mathematical capabilities of DeepSeekMath-Base 7B, focusing on its ability to produce self-contained mathematical solutions without relying on external tools, solve math problems using tools, and conduct formal theorem proving. Beyond mathematics, we also provide a more general profile of the base model, including its performance of natural language understanding, reasoning, and programming skills.\n\n- **Mathematical problem solving with step-by-step reasoning**\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"images\u002Fbase_results_1.png\" alt=\"table\" width=\"70%\">\n\u003C\u002Fp>\n\n- **Mathematical problem solving with tool use**\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"images\u002Fbase_results_2.png\" alt=\"table\" width=\"50%\">\n\u003C\u002Fp>\n\n- **Natural Language Understanding, Reasoning, and Code**\n\u003Cp align=\"center\">\n\u003Cimg src=\"images\u002Fbase_results_3.png\" alt=\"table\" width=\"50%\">\n\u003C\u002Fp>\n\nThe evaluation results from the tables above can be summarized as follows:\n  - **Superior Mathematical Reasoning:** On the competition-level MATH dataset, DeepSeekMath-Base 7B outperforms existing open-source base models by more than 10% in absolute terms through few-shot chain-of-thought prompting, and also surpasses Minerva 540B.\n  - **Strong Tool Use Ability:** Continuing pre-training with DeepSeekCoder-Base-7B-v1.5 enables DeepSeekMath-Base 7B to more effectively solve and prove mathematical problems by writing programs.\n  - **Comparable Reasoning and Coding Performance:** DeepSeekMath-Base 7B achieves performance in reasoning and coding that is comparable to that of DeepSeekCoder-Base-7B-v1.5.\n\n### DeepSeekMath-Instruct and -RL  7B\n\nDeepSeekMath-Instruct 7B is a mathematically instructed tuning model derived from DeepSeekMath-Base 7B, while DeepSeekMath-RL 7B is trained on the foundation of DeepSeekMath-Instruct 7B, utilizing our proposed Group Relative Policy Optimization (GRPO) algorithm.\n\nWe evaluate mathematical performance both without and with tool use, on 4 quantitative reasoning benchmarks in English and Chinese. As shown in Table, DeepSeekMath-Instruct 7B demonstrates strong performance of step-by-step reasoning, and DeepSeekMath-RL 7B approaches an accuracy of 60% on MATH with tool use, surpassing all existing open-source models.\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"images\u002Finstruct_results.png\" alt=\"table\" width=\"50%\">\n\u003C\u002Fp>\n\n\n## 3. Data Collection\n\n- Step 1:  Select [OpenWebMath](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2310.06786.pdf), a collection of high-quality mathematical web texts, as our initial seed corpus for training a FastText model.\n- Step 2:  Use the FastText model to retrieve mathematical web pages from the deduplicated Common Crawl database.\n- Step 3:  Identify potential math-related domains through statistical analysis.\n- Step 4:  Manually annotate URLs within these identified domains that are associated with mathematical content.\n- Step 5:  Add web pages linked to these annotated URLs, but not yet collected, to the seed corpus. Jump to step 1 until four iterations.\n\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"images\u002Fdata_pipeline.png\" alt=\"table\" width=\"80%\">\n\u003C\u002Fp>\n\nAfter four iterations of data collection, we end up with **35.5M** mathematical web pages, totaling **120B** tokens. \n\n## 4. Model Downloads\n\nWe release the DeepSeekMath 7B, including base, instruct and RL models, to the public. To support a broader and more diverse range of research within both academic and commercial communities. Please **note** that the use of this model is subject to the terms outlined in [License section](#6-license). Commercial usage is permitted under these terms.\n\n### Huggingface\n\n| Model                    | Sequence Length |                           Download                           |\n| :----------------------- | :-------------: | :----------------------------------------------------------: |\n| DeepSeekMath-Base 7B     |      4096       | 🤗 [HuggingFace](https:\u002F\u002Fhuggingface.co\u002Fdeepseek-ai\u002Fdeepseek-math-7b-base) |\n| DeepSeekMath-Instruct 7B |      4096       | 🤗 [HuggingFace](https:\u002F\u002Fhuggingface.co\u002Fdeepseek-ai\u002Fdeepseek-math-7b-instruct) |\n| DeepSeekMath-RL 7B       |      4096       | 🤗 [HuggingFace](https:\u002F\u002Fhuggingface.co\u002Fdeepseek-ai\u002Fdeepseek-math-7b-rl) |\n\n## 5. Quick Start\n\nYou can directly employ [Huggingface's Transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers) for model inference.\n\n**Text Completion**\n\n```python\nimport torch\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig\n\nmodel_name = \"deepseek-ai\u002Fdeepseek-math-7b-base\"\ntokenizer = AutoTokenizer.from_pretrained(model_name)\nmodel = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map=\"auto\")\nmodel.generation_config = GenerationConfig.from_pretrained(model_name)\nmodel.generation_config.pad_token_id = model.generation_config.eos_token_id\n\ntext = \"The integral of x^2 from 0 to 2 is\"\ninputs = tokenizer(text, return_tensors=\"pt\")\noutputs = model.generate(**inputs.to(model.device), max_new_tokens=100)\n\nresult = tokenizer.decode(outputs[0], skip_special_tokens=True)\nprint(result)\n```\n\n**Chat Completion**\n\n```python\nimport torch\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig\n\nmodel_name = \"deepseek-ai\u002Fdeepseek-math-7b-instruct\"\ntokenizer = AutoTokenizer.from_pretrained(model_name)\nmodel = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map=\"auto\")\nmodel.generation_config = GenerationConfig.from_pretrained(model_name)\nmodel.generation_config.pad_token_id = model.generation_config.eos_token_id\n\nmessages = [\n    {\"role\": \"user\", \"content\": \"what is the integral of x^2 from 0 to 2?\\nPlease reason step by step, and put your final answer within \\boxed{}.\"}\n]\ninput_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors=\"pt\")\noutputs = model.generate(input_tensor.to(model.device), max_new_tokens=100)\n\nresult = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)\nprint(result)\n```\n\nAvoiding the use of the provided function `apply_chat_template`, you can also interact with our model following the sample template. Note that `messages` should be replaced by your input.\n\n```\nUser: {messages[0]['content']}\n\nAssistant: {messages[1]['content']}\u003C｜end▁of▁sentence｜>User: {messages[2]['content']}\n\nAssistant:\n```\n\n**Note:** By default (`add_special_tokens=True`), our tokenizer automatically adds a `bos_token` (`\u003C｜begin▁of▁sentence｜>`) before the input text. Additionally, since the system prompt is not compatible with this version of our models, we DO NOT RECOMMEND including the system prompt in your input.\n\n❗❗❗ **Please use chain-of-thought prompt to test DeepSeekMath-Instruct and DeepSeekMath-RL:**\n\n- English questions: **{question}\\nPlease reason step by step, and put your final answer within \\\\boxed{}.**\n\n- Chinese questions: **{question}\\n请通过逐步推理来解答问题，并把最终答案放置于\\\\boxed{}中。**\n\n\n## 6. License\nThis code repository is licensed under the MIT License. The use of DeepSeekMath models is subject to the Model License. DeepSeekMath supports commercial use.\n\nSee the [LICENSE-CODE](LICENSE-CODE) and [LICENSE-MODEL](LICENSE-MODEL) for more details.\n\n## 7. Citation\n\n```\n@misc{deepseek-math,\n  author = {Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Mingchuan Zhang, Y.K. Li, Y. Wu, Daya Guo},\n  title = {DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models},\n  journal = {CoRR},\n  volume = {abs\u002F2402.03300},\n  year = {2024},\n  url = {https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.03300},\n}\n```\n\n\n## 8. Contact\n\nIf you have any questions, please raise an issue or contact us at [service@deepseek.com](mailto:service@deepseek.com).\n","DeepSeekMath是一个专注于提升开放语言模型中数学推理能力的项目。它基于DeepSeek-Coder-v1.5 7B进行预训练，使用了来自Common Crawl的数学相关标记以及自然语言和代码数据，总训练量达到500亿个标记。该项目的核心功能包括无需外部工具包或投票技术即可在竞赛级别的MATH基准测试中取得51.7%的高分，接近Gemini-Ultra和GPT-4的表现水平。此外，为了便于研究，项目还公开发布了基础、指令调优及强化学习版本的模型检查点。DeepSeekMath特别适合需要高级数学推理能力的应用场景，如教育软件开发、自动解题系统构建等。",2,"2026-06-11 03:41:18","high_star"]