Skip to content

Instantly share code, notes, and snippets.

View aribornstein's full-sized avatar

PythicCoder aribornstein

View GitHub Profile
# Export To Onnx
model.to_onnx(filepath, input_sample, export_params=True)
# Export to Torch Script
torch.jit.save(model.to_torchscript(), "model.pt")
from autogen_core import CancellationToken
from pydantic import BaseModel
from autogen_core.models import ChatCompletionClient, CreateResult, SystemMessage, UserMessage, AssistantMessage
from autogen_core.tools import Tool
from llama_cpp import Llama
from typing import List, Dict, Any, Literal, Optional, Sequence, Union, AsyncGenerator
import json
class ComponentModel(BaseModel):
provider: str