hsuwill000 commited on
Commit
0fcdc6e
·
verified ·
1 Parent(s): 1bd4352

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -6,7 +6,20 @@ import time
6
 
7
  import huggingface_hub as hf_hub
8
  # 初始化 OpenVINO 模型
9
- model_id = "hsuwill000/deepseek-llm-7b-chat-openvino-4bit"
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  model_path = "ov"
11
 
12
  config = ov_genai.GenerationConfig()
@@ -15,7 +28,9 @@ config.top_p = 0.9;
15
  config.top_k = 30;
16
 
17
  hf_hub.snapshot_download(model_id, local_dir=model_path)
 
18
 
 
19
  pipe = ov_genai.LLMPipeline(model_path, "CPU")
20
  #pipe.start_chat()
21
 
 
6
 
7
  import huggingface_hub as hf_hub
8
  # 初始化 OpenVINO 模型
9
+
10
+ import subprocess
11
+
12
+ subprocess.run([
13
+ "optimum-cli", "export", "openvino",
14
+ "--model", "Qwen/Qwen3-1.7B",
15
+ "--task", "text-generation-with-past",
16
+ "--weight-format", "int4",
17
+ "--quant-mode", "int4_f8e4m3",
18
+ "ov"
19
+ ])
20
+
21
+ '''
22
+ model_id = "OpenVINO/Qwen2.5-7B-Instruct-int4-ov"
23
  model_path = "ov"
24
 
25
  config = ov_genai.GenerationConfig()
 
28
  config.top_k = 30;
29
 
30
  hf_hub.snapshot_download(model_id, local_dir=model_path)
31
+ '''
32
 
33
+ model_path = "ov"
34
  pipe = ov_genai.LLMPipeline(model_path, "CPU")
35
  #pipe.start_chat()
36