This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Export To Onnx | |
| model.to_onnx(filepath, input_sample, export_params=True) | |
| # Export to Torch Script | |
| torch.jit.save(model.to_torchscript(), "model.pt") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # radiology_eval_trial_code.py | |
| # Reproducible trial comparing independent vs combined LLM-as-judge evaluation. | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from math import log2 | |
| rng = np.random.default_rng(20250817) | |
| N = 200_000 |
OlderNewer