text_engine.py 656 B

1234567891011121314151617181920
  1. from app.engines.base import BaseEngine
  2. class TextEngine(BaseEngine):
  3. """Training engine for LLaMA, Qwen, and other text-only LLMs."""
  4. async def load_model(self, model_id: str, **kwargs):
  5. raise NotImplementedError
  6. def get_peft_config(self, method: str, params: dict):
  7. raise NotImplementedError
  8. async def preprocess_dataset(self, dataset_path: str, output_path: str, **kwargs):
  9. raise NotImplementedError
  10. async def train(self, job_id: str, dataset_path: str, peft_config, training_args: dict):
  11. raise NotImplementedError
  12. def get_model_info(self, model_id: str):
  13. raise NotImplementedError