-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DH-5033/ the new endpoints for finetuning (#267)
* DH-5033/ the new endpoints for finetuning * DH-5033/new endpoints for finetuning * DH-5033/ finalized llm finetuning with openai * DH-5033/adding the documents for finetuning * DH-5033/update the docs * DH-5033/add alias
- Loading branch information
1 parent
fabbc14
commit 5cd4429
Showing
11 changed files
with
877 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
from dataherald.config import Component | ||
from dataherald.types import Finetuning | ||
|
||
|
||
class FinetuningModel(Component, ABC): | ||
def __init__(self, storage): | ||
self.storage = storage | ||
|
||
@abstractmethod | ||
def count_tokens(self, messages: dict) -> int: | ||
pass | ||
|
||
@abstractmethod | ||
def create_fintuning_dataset(self): | ||
pass | ||
|
||
@abstractmethod | ||
def create_fine_tuning_job(self): | ||
pass | ||
|
||
@abstractmethod | ||
def retrieve_finetuning_job(self) -> Finetuning: | ||
pass | ||
|
||
@abstractmethod | ||
def cancel_finetuning_job(self) -> Finetuning: | ||
pass |
Oops, something went wrong.