fuvty commited on
Commit
7b0d224
·
1 Parent(s): 9f5092d

[minor] setup

Browse files
Files changed (1) hide show
  1. app.py +21 -7
app.py CHANGED
@@ -30,9 +30,9 @@ class ModelManager:
30
 
31
  def __init__(
32
  self,
33
- single_model_name: str = "Qwen/Qwen2.5-0.5B-Instruct",
34
- t2t_context_model: str = "Qwen/Qwen3-0.6B",
35
- t2t_answer_model: str = "Qwen/Qwen2.5-0.5B-Instruct",
36
  c2c_checkpoint_path: str = "local/checkpoints/qwen3_0.6b+qwen2.5_0.5b_Fuser",
37
  device: str = "auto"
38
  ):
@@ -502,7 +502,7 @@ D. Whether plants have interests.""",
502
  # C2C column
503
  with gr.Column():
504
  gr.Markdown("### Cache-to-Cache Communication")
505
- gr.Markdown(f"*{model_manager.c2c_base_model} → {model_manager.c2c_teacher_model}*")
506
  c2c_output = gr.Textbox(
507
  label="",
508
  lines=18,
@@ -553,7 +553,21 @@ def main():
553
  print("=" * 60)
554
 
555
  # Initialize models
556
- model_manager = ModelManager()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
557
 
558
  # Create and launch demo
559
  demo = create_demo(model_manager)
@@ -565,9 +579,9 @@ def main():
565
  demo.launch(
566
  server_name="0.0.0.0",
567
  server_port=7860,
568
- share=True,
569
  show_error=True,
570
- # ssr_mode=False
571
  )
572
 
573
 
 
30
 
31
  def __init__(
32
  self,
33
+ single_model_name: str = "Qwen/Qwen3-0.6B",
34
+ t2t_context_model: str = "Qwen/Qwen2.5-0.5B-Instruct",
35
+ t2t_answer_model: str = "Qwen/Qwen3-0.6B",
36
  c2c_checkpoint_path: str = "local/checkpoints/qwen3_0.6b+qwen2.5_0.5b_Fuser",
37
  device: str = "auto"
38
  ):
 
502
  # C2C column
503
  with gr.Column():
504
  gr.Markdown("### Cache-to-Cache Communication")
505
+ gr.Markdown(f"*{model_manager.c2c_teacher_model} → {model_manager.c2c_base_model}*")
506
  c2c_output = gr.Textbox(
507
  label="",
508
  lines=18,
 
553
  print("=" * 60)
554
 
555
  # Initialize models
556
+ # C2C-S: qwen3_0.6b+qwen2.5_0.5b_Fuser
557
+ context_model_name = "Qwen/Qwen2.5-0.5B-Instruct"
558
+ c2c_checkpoint_path = "local/checkpoints/qwen3_0.6b+qwen2.5_0.5b_Fuser"
559
+
560
+ # C2C-L: qwen3_0.6b+qwen2.5_0.5b_Fuser_large
561
+ # context_model_name = "Qwen/Qwen3-4B-Base"
562
+ # c2c_checkpoint_path = "local/checkpoints/qwen3_0.6b+qwen3_4b_base_Fuser"
563
+
564
+ answer_model_name = "Qwen/Qwen3-0.6B"
565
+ model_manager = ModelManager(
566
+ single_model_name=answer_model_name,
567
+ t2t_context_model=context_model_name,
568
+ t2t_answer_model=answer_model_name,
569
+ c2c_checkpoint_path=c2c_checkpoint_path
570
+ )
571
 
572
  # Create and launch demo
573
  demo = create_demo(model_manager)
 
579
  demo.launch(
580
  server_name="0.0.0.0",
581
  server_port=7860,
582
+ share=False,
583
  show_error=True,
584
+ ssr_mode=False
585
  )
586
 
587