Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
GLM-4V_pytorch
Commits
38e073f0
Commit
38e073f0
authored
Jun 19, 2024
by
wanglch
Browse files
Update README.md
parent
1b1f5e2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
README.md
README.md
+5
-6
No files found.
README.md
View file @
38e073f0
...
...
@@ -111,20 +111,19 @@ sh lora_finetune_multi.sh
## 推理
若要执行推理需要将本仓库修改后的
[
visual.py
](
visual.py
)
替换模型文件中的
**visual.py**
文件
,并替换模型路径
。
若要执行推理需要将本仓库修改后的
[
visual.py
](
visual.py
)
替换模型文件中的
**visual.py**
文件。
`tokenizer = AutoTokenizer.from_pretrained("/home/wanglch/projects/GLM-4V/glm-4v-b", trust_remote_code=True)`
### 单机单卡
`tokenizer = AutoTokenizer.from_pretrained("/home/wanglch/projects/GLM-4V/glm-4v-9b", trust_remote_code=True)`
`model = AutoModelForCausalLM.from_pretrained(
"/home/wanglch/projects/GLM-4V/glm-4v-b",
"/home/wanglch/projects/GLM-4V/glm-4v-
9
b",
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
trust_remote_code=True
).to(device).eval()`
### 单机单卡
```
python glm-4v_inference.py
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment