Content-Length: 282792 | pFad | http://github.com/InternLM/InternLM/commit/051011405f73598df1312e31530a3a8ff1d19d42

28 [Feat] Add deep thinking demo (#820) · InternLM/InternLM@0510114 · GitHub
Skip to content

Commit

Permalink
[Feat] Add deep thinking demo (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
braisedpork1964 authored Jan 15, 2025
1 parent b49ebba commit 0510114
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 52 deletions.
6 changes: 3 additions & 3 deletions chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

English | [简体中文](./README_zh-CN.md)

This document briefly shows how to use [Transformers](#import-from-transformers), [ModelScope](#import-from-modelscope), and [Web demos](#dialogue) to conduct inference with InternLM2.5-Chat.
This document briefly shows how to use [Transformers](#import-from-transformers), [ModelScope](#import-from-modelscope), and [Web demos](#dialogue) to conduct inference with InternLM3-Instruct.

You can also know more about the [chatml format](./chat_format.md) and how to use [LMDeploy for inference and model serving](./lmdeploy.md).

Expand Down Expand Up @@ -79,6 +79,6 @@ pip install transformers>=4.48
streamlit run ./chat/web_demo.py
```

The effect is similar to below:
It supports switching between different inference modes and comparing their responses.

![demo](https://github.com/InternLM/InternLM/assets/9102141/11b60ee0-47e4-42c0-8278-3051b2f17fe4)
![demo](https://github.com/user-attachments/assets/4953befa-343f-499d-b289-048d982439f3)
10 changes: 7 additions & 3 deletions chat/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
[English](./README.md) | 简体中文

本文介绍采用 [Transformers](#import-from-transformers)[ModelScope](#import-from-modelscope)[Web demos](#dialogue)
InternLM2.5-Chat 进行推理。
InternLM3-Instruct 进行推理。

你还可以进一步了解 InternLM2.5-Chat 采用的[对话格式](./chat_format_zh-CN.md),以及如何[用 LMDeploy 进行推理或部署服务](./lmdeploy_zh-CN.md),或者尝试用 [OpenAOE](./openaoe.md) 与多个模型对话。
你还可以进一步了解 InternLM3-Instruct 采用的[对话格式](./chat_format_zh-CN.md),以及如何[用 LMDeploy 进行推理或部署服务](./lmdeploy_zh-CN.md),或者尝试用 [OpenAOE](./openaoe.md) 与多个模型对话。

## 通过 Transformers 加载

Expand Down Expand Up @@ -39,7 +39,7 @@ response = tokenizer.batch_decode(generated_ids)[0]

### 通过 ModelScope 加载

通过以下的代码从 ModelScope 加载 InternLM2.5-Chat 模型 (可修改模型名称替换不同的模型)
通过以下的代码从 ModelScope 加载 InternLM3-Instruct 模型 (可修改模型名称替换不同的模型)

```python
import torch
Expand Down Expand Up @@ -76,3 +76,7 @@ pip install streamlit
pip install transformers>=4.48
streamlit run ./web_demo.py
```

支持切换不同推理模式,并比较它们的回复

![demo](https://github.com/user-attachments/assets/952e250d-22a6-4544-b8e3-9c21c746d3c7)
Loading

0 comments on commit 0510114

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/InternLM/InternLM/commit/051011405f73598df1312e31530a3a8ff1d19d42

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy