You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exports the model to ``ONNX`` format using ``torch.onnx.export``.
280
+
We currently don't support exporting non-transformed models. Please refer to the ``convert_to_cloud_bertstyle`` function in the **Low-Level API** for a legacy function that supports this."
281
+
282
+
``Optional`` Args:
283
+
does not any arguments.
284
+
285
+
Returns:
286
+
:str: Path of the generated ``ONNX`` graph.
287
+
"""
288
+
281
289
# initialize the adapter model
282
290
assertself.max_num_adapters, "Please use load_adapter() to add at least one adapter; otherwise, refer to QEFFAutoModelForCausalLM for base model usage"
283
-
self.init_adapter_model()
291
+
self._init_adapter_model()
284
292
285
293
bs=constants.ONNX_EXPORT_EXAMPLE_BATCH_SIZE
286
294
seq_len=constants.ONNX_EXPORT_EXAMPLE_SEQ_LEN
@@ -338,18 +346,21 @@ def generate(
338
346
:device_id (List[int]): Ids of devices for running the qpc pass as [0] in case of normal model / [0, 1, 2, 3] in case of tensor slicing model
339
347
``optional`` Args:
340
348
:runtime (str, optional): Only ``AI_100`` runtime is supported as of now; ``ONNXRT`` and ``PyTorch`` coming soon. Defaults to "AI_100".
349
+
:prompt_to_adapter_mapping (List[str]): A list of adapter names that maps to the prompts, specifying which adapter the prompt wants to apply. "base" for base model (no adapter).
341
350
"""
342
351
ifruntime!="AI_100":
343
352
raiseValueError("Only AI_100 runtime is supported right now via generate API")
@@ -38,6 +39,7 @@ class QEffAutoPeftModelForCausalLM(QEFFBaseModel):
38
39
39
40
Args:
40
41
:model (nn.Module): PyTorch model
42
+
:finite_adapters (bool): set True to enable finite adapter mode with QEffAutoLoraModelForCausalLM class. Please refer to QEffAutoLoraModelForCausalLM for API specification.
"""Please answer the following question: James decides to run 3 sprints 3 times a week. He runs 60 meters each sprint. How many total meters does he run a week?\n\nAnswer:""",
80
61
"""The following headline is the headline of a news report. Please write the content of the news passage based on only this headline.\n\nHeadline: Harvard shrank its insect-inspired microrobot to the size of a penny\n\nContent:""",
0 commit comments