Aratako commited on
Commit
17ae551
·
verified ·
1 Parent(s): bd4a583

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -45,9 +45,7 @@ h1 {
45
 
46
  # Load the tokenizer and model
47
  tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-32B")
48
- tokenizer.add_special_tokens({
49
- 'additional_special_tokens': ['<think>', '</think>']
50
- })
51
  model = AutoModelForCausalLM.from_pretrained("unsloth/DeepSeek-R1-Distill-Qwen-32B-bnb-4bit", device_map="auto") # to("cuda:0")
52
  terminators = [
53
  tokenizer.eos_token_id,
@@ -79,7 +77,7 @@ def chat_llama3_8b(message: str,
79
  print(tokenizer.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False))
80
  print(input_ids)
81
 
82
- streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
83
 
84
  generate_kwargs = dict(
85
  input_ids= input_ids,
 
45
 
46
  # Load the tokenizer and model
47
  tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-32B")
48
+
 
 
49
  model = AutoModelForCausalLM.from_pretrained("unsloth/DeepSeek-R1-Distill-Qwen-32B-bnb-4bit", device_map="auto") # to("cuda:0")
50
  terminators = [
51
  tokenizer.eos_token_id,
 
77
  print(tokenizer.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False))
78
  print(input_ids)
79
 
80
+ streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=False)
81
 
82
  generate_kwargs = dict(
83
  input_ids= input_ids,