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
FinQwen_pytorch
Commits
aeef6b6a
Commit
aeef6b6a
authored
Jul 04, 2024
by
wanglch
Browse files
Update finqwen_inference.py
parent
47566627
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
finqwen_inference.py
finqwen_inference.py
+2
-2
No files found.
finqwen_inference.py
View file @
aeef6b6a
...
...
@@ -2,7 +2,7 @@ from modelscope import AutoModelForCausalLM, AutoTokenizer
from
modelscope
import
GenerationConfig
import
os
os
.
environ
[
"
CUDA
_VISIBLE_DEVICES"
]
=
"0,1,2,3"
os
.
environ
[
"
HIP
_VISIBLE_DEVICES"
]
=
"0,1,2,3"
model_dir
=
'/home/wanglch/projects/FinQwen/Tongyi-Finance-14B-Chat'
...
...
@@ -21,4 +21,4 @@ model.generation_config = GenerationConfig.from_pretrained(model_dir, trust_remo
response
,
history
=
model
.
chat
(
tokenizer
,
"请解释一下资产负债率"
,
history
=
None
)
print
(
response
)
# 资产负债率是一个财务比率,用来衡量一个企业的负债水平。它是用一个企业负债总额除以其资产总额的百分比来表示的。它的计算公式是:资产负债率 = 负债总额 / 资产总额。它能够反映一个企业的财务状况,以及它是否具有足够的资产来抵偿其债务。
\ No newline at end of file
# 资产负债率是一个财务比率,用来衡量一个企业的负债水平。它是用一个企业负债总额除以其资产总额的百分比来表示的。它的计算公式是:资产负债率 = 负债总额 / 资产总额。它能够反映一个企业的财务状况,以及它是否具有足够的资产来抵偿其债务。
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