brendon-ai commited on
Commit
afb2b95
·
verified ·
1 Parent(s): a86eb4f

Update src/RAGSample.py

Browse files
Files changed (1) hide show
  1. src/RAGSample.py +5 -4
src/RAGSample.py CHANGED
@@ -391,10 +391,11 @@ Answer:
391
  "text-generation",
392
  model="microsoft/BioGPT",
393
  tokenizer="microsoft/BioGPT",
394
- max_new_tokens=100, # Reduced
395
- max_length=400, # Reduced
396
- temperature=0.2,
397
- device_map="cpu", # Force CPU if GPU memory is limited
 
398
  return_full_text=False,
399
  truncation=True,
400
  do_sample=True,
 
391
  "text-generation",
392
  model="microsoft/BioGPT",
393
  tokenizer="microsoft/BioGPT",
394
+ max_new_tokens=100, # Reduced for stability
395
+ max_length=1024, # BioGPT's context length
396
+ temperature=0.2, # Lower for more focused responses
397
+ device_map="auto",
398
+ torch_dtype=torch.float16,
399
  return_full_text=False,
400
  truncation=True,
401
  do_sample=True,