Imsachinsingh00 commited on
Commit
88c84bb
·
1 Parent(s): d89669b

deepseek R1

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -21,11 +21,9 @@ def load_model():
21
  "deepseek-ai/DeepSeek-R1",
22
  trust_remote_code=True
23
  )
24
- # 2. Remove unsupported fp8 quantization
25
  if hasattr(config, "quantization_config"):
26
- config.quantization_config = None
27
 
28
- # 3. Load tokenizer and model with patched config
29
  tokenizer = AutoTokenizer.from_pretrained(
30
  "deepseek-ai/DeepSeek-R1",
31
  trust_remote_code=True
@@ -36,6 +34,7 @@ def load_model():
36
  config=config
37
  )
38
 
 
39
  # 4. Build the text-generation pipeline
40
  gen = pipeline(
41
  "text-generation",
 
21
  "deepseek-ai/DeepSeek-R1",
22
  trust_remote_code=True
23
  )
 
24
  if hasattr(config, "quantization_config"):
25
+ config.quantization_config = {} # ← use {} instead of None
26
 
 
27
  tokenizer = AutoTokenizer.from_pretrained(
28
  "deepseek-ai/DeepSeek-R1",
29
  trust_remote_code=True
 
34
  config=config
35
  )
36
 
37
+
38
  # 4. Build the text-generation pipeline
39
  gen = pipeline(
40
  "text-generation",