Creates an LLM engine from the provided engine arguments. Args: engine_args (EngineArgs): Engine arguments object. Returns: LLMEngine: Instance of the LLMEngine class.
(cls, engine_args: EngineArgs)
| 64 | |
| 65 | @classmethod |
| 66 | def from_engine_args(cls, engine_args: EngineArgs): |
| 67 | """ |
| 68 | Creates an LLM engine from the provided engine arguments. |
| 69 | |
| 70 | Args: |
| 71 | engine_args (EngineArgs): Engine arguments object. |
| 72 | |
| 73 | Returns: |
| 74 | LLMEngine: Instance of the LLMEngine class. |
| 75 | """ |
| 76 | # Create the engine configs. |
| 77 | config = engine_args.create_engine_config() |
| 78 | # Create the LLMEngine. |
| 79 | return cls(cfg=config) |
| 80 | |
| 81 | def __init__(self, cfg): |
| 82 | """ |