Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9e668a5

Browse files
authoredApr 12, 2024··
fix_internlm-chat-7b-8k repo name in examples (#10747)
1 parent c3fc8f4 commit 9e668a5

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed
 

‎python/llm/example/CPU/HF-Transformers-AutoModels/Model/internlm/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# InternLM
22

3-
In this directory, you will find examples on how you could apply IPEX-LLM INT4 optimizations on InternLM models. For illustration purposes, we utilize the [internlm/internlm-chat-7b-8k](https://huggingface.co/internlm/internlm-chat-7b-8k) as a reference InternLM model.
3+
In this directory, you will find examples on how you could apply IPEX-LLM INT4 optimizations on InternLM models. For illustration purposes, we utilize the [internlm/internlm-chat-7b](https://huggingface.co/internlm/internlm-chat-7b) as a reference InternLM model.
44

55
## 0. Requirements
66
To run these examples with IPEX-LLM, we have some recommended requirements for your machine, please refer to [here](../README.md#recommended-requirements) for more information.
@@ -22,7 +22,7 @@ python ./generate.py --repo-id-or-model-path REPO_ID_OR_MODEL_PATH --prompt PROM
2222
```
2323

2424
Arguments info:
25-
- `--repo-id-or-model-path REPO_ID_OR_MODEL_PATH`: argument defining the huggingface repo id for the InternLM model to be downloaded, or the path to the huggingface checkpoint folder. It is default to be `'internlm/internlm-chat-7b-8k'`.
25+
- `--repo-id-or-model-path REPO_ID_OR_MODEL_PATH`: argument defining the huggingface repo id for the InternLM model to be downloaded, or the path to the huggingface checkpoint folder. It is default to be `'internlm/internlm-chat-7b'`.
2626
- `--prompt PROMPT`: argument defining the prompt to be infered (with integrated prompt format for chat). It is default to be `'AI是什么?'`.
2727
- `--n-predict N_PREDICT`: argument defining the max number of tokens to predict. It is default to be `32`.
2828

@@ -50,7 +50,7 @@ numactl -C 0-47 -m 0 python ./generate.py
5050
```
5151

5252
#### 2.3 Sample Output
53-
#### [internlm/internlm-chat-7b-8k](https://huggingface.co/internlm/internlm-chat-7b-8k)
53+
#### [internlm/internlm-chat-7b](https://huggingface.co/internlm/internlm-chat-7b)
5454
```log
5555
Inference time: xxxx s
5656
-------------------- Prompt --------------------

‎python/llm/example/CPU/HF-Transformers-AutoModels/Model/internlm/generate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
from transformers import AutoTokenizer
2424

2525
# you could tune the prompt based on your own model,
26-
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b-8k/blob/main/modeling_internlm.py#L768
26+
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b/blob/main/modeling_internlm.py#L1053
2727
INTERNLM_PROMPT_FORMAT = "<|User|>:{prompt}\n<|Bot|>:"
2828

2929
if __name__ == '__main__':
3030
parser = argparse.ArgumentParser(description='Predict Tokens using `generate()` API for InternLM model')
31-
parser.add_argument('--repo-id-or-model-path', type=str, default="internlm/internlm-chat-7b-8k",
31+
parser.add_argument('--repo-id-or-model-path', type=str, default="internlm/internlm-chat-7b",
3232
help='The huggingface repo id for the InternLM model to be downloaded'
3333
', or the path to the huggingface checkpoint folder')
3434
parser.add_argument('--prompt', type=str, default="AI是什么?",

‎python/llm/example/CPU/HF-Transformers-AutoModels/Model/internlm2/generate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from transformers import AutoTokenizer
2323

2424
# you could tune the prompt based on your own model,
25-
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b-8k/blob/main/modeling_internlm.py#L768
25+
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b/blob/main/modeling_internlm.py#L1053
2626
INTERNLM_PROMPT_FORMAT = "<|User|>:{prompt}\n<|Bot|>:"
2727

2828
if __name__ == '__main__':

‎python/llm/example/CPU/PyTorch-Models/Model/internlm2/generate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from transformers import AutoTokenizer
2424

2525
# you could tune the prompt based on your own model,
26-
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b-8k/blob/main/modeling_internlm.py#L768
26+
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b/blob/main/modeling_internlm.py#L1053
2727
INTERNLM_PROMPT_FORMAT = "<|User|>:{prompt}\n<|Bot|>:"
2828

2929
if __name__ == '__main__':

‎python/llm/example/GPU/HF-Transformers-AutoModels/Model/internlm/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# InternLM
2-
In this directory, you will find examples on how you could apply IPEX-LLM INT4 optimizations on InternLM models on [Intel GPUs](../../../README.md). For illustration purposes, we utilize the [internlm/internlm-chat-7b-8k](https://huggingface.co/internlm/internlm-chat-7b-8k) as a reference InternLM model.
2+
In this directory, you will find examples on how you could apply IPEX-LLM INT4 optimizations on InternLM models on [Intel GPUs](../../../README.md). For illustration purposes, we utilize the [internlm/internlm-chat-7b](https://huggingface.co/internlm/internlm-chat-7b) as a reference InternLM model.
33

44
## 0. Requirements
55
To run these examples with IPEX-LLM on Intel GPUs, we have some recommended requirements for your machine, please refer to [here](../../../README.md#requirements) for more information.
@@ -100,12 +100,12 @@ python ./generate.py --repo-id-or-model-path REPO_ID_OR_MODEL_PATH --prompt PROM
100100
```
101101

102102
Arguments info:
103-
- `--repo-id-or-model-path REPO_ID_OR_MODEL_PATH`: argument defining the huggingface repo id for the InternLM model (e.g. `internlm/internlm-chat-7b-8k`) to be downloaded, or the path to the huggingface checkpoint folder. It is default to be `'internlm/internlm-chat-7b-8k'`.
103+
- `--repo-id-or-model-path REPO_ID_OR_MODEL_PATH`: argument defining the huggingface repo id for the InternLM model (e.g. `internlm/internlm-chat-7b`) to be downloaded, or the path to the huggingface checkpoint folder. It is default to be `'internlm/internlm-chat-7b'`.
104104
- `--prompt PROMPT`: argument defining the prompt to be infered (with integrated prompt format for chat). It is default to be `'AI是什么?'`.
105105
- `--n-predict N_PREDICT`: argument defining the max number of tokens to predict. It is default to be `32`.
106106

107107
#### Sample Output
108-
#### [internlm/internlm-chat-7b-8k](https://huggingface.co/internlm/internlm-chat-7b-8k)
108+
#### [internlm/internlm-chat-7b](https://huggingface.co/internlm/internlm-chat-7b)
109109
```log
110110
Inference time: xxxx s
111111
-------------------- Prompt --------------------

‎python/llm/example/GPU/HF-Transformers-AutoModels/Model/internlm/generate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
from transformers import AutoTokenizer
2323

2424
# you could tune the prompt based on your own model,
25-
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b-8k/blob/main/modeling_internlm.py#L768
25+
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b/blob/main/modeling_internlm.py#L1053
2626
INTERNLM_PROMPT_FORMAT = "<|User|>:{prompt}\n<|Bot|>:"
2727

2828
if __name__ == '__main__':
2929
parser = argparse.ArgumentParser(description='Predict Tokens using `generate()` API for InternLM model')
30-
parser.add_argument('--repo-id-or-model-path', type=str, default="internlm/internlm-chat-7b-8k",
30+
parser.add_argument('--repo-id-or-model-path', type=str, default="internlm/internlm-chat-7b",
3131
help='The huggingface repo id for the InternLM model to be downloaded'
3232
', or the path to the huggingface checkpoint folder')
3333
parser.add_argument('--prompt', type=str, default="AI是什么?",

‎python/llm/example/GPU/HF-Transformers-AutoModels/Model/internlm2/generate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import intel_extension_for_pytorch as ipex
2424

2525
# you could tune the prompt based on your own model,
26-
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b-8k/blob/main/modeling_internlm.py#L768
26+
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b/blob/main/modeling_internlm.py#L1053
2727
INTERNLM_PROMPT_FORMAT = "<|User|>:{prompt}\n<|Bot|>:"
2828

2929
if __name__ == '__main__':

‎python/llm/example/GPU/PyTorch-Models/Model/internlm2/generate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import intel_extension_for_pytorch as ipex
2424

2525
# you could tune the prompt based on your own model,
26-
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b-8k/blob/main/modeling_internlm.py#L768
26+
# here the prompt tuning refers to https://huggingface.co/internlm/internlm-chat-7b/blob/main/modeling_internlm.py#L1053
2727
INTERNLM_PROMPT_FORMAT = "<|User|>:{prompt}\n<|Bot|>:"
2828

2929
if __name__ == '__main__':

‎python/llm/portable-zip/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This portable zip includes everything you need to run an LLM with IPEX-LLM optim
1515
- ChatGLM2-6b
1616
- Baichuan-13B-Chat
1717
- Baichuan2-7B-Chat
18-
- internlm-chat-7b-8k
18+
- internlm-chat-7b
1919
- Llama-2-7b-chat-hf
2020

2121
## How to use

0 commit comments

Comments
 (0)
Please sign in to comment.