mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 02:32:40 +00:00
refine
This commit is contained in:
parent
7de832d66c
commit
7fff9434f3
1 changed files with 5 additions and 4 deletions
|
@ -13,16 +13,17 @@
|
||||||
from typing import Any, Dict, List, Mapping
|
from typing import Any, Dict, List, Mapping
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from llama_stack.providers.inline.post_training.torchtune.datasets.format_adapter import (
|
|
||||||
llama_stack_chat_to_torchtune_chat,
|
|
||||||
llama_stack_instruct_to_torchtune_instruct,
|
|
||||||
)
|
|
||||||
|
|
||||||
from torch.utils.data import Dataset
|
from torch.utils.data import Dataset
|
||||||
from torchtune.data._common import CROSS_ENTROPY_IGNORE_IDX
|
from torchtune.data._common import CROSS_ENTROPY_IGNORE_IDX
|
||||||
from torchtune.data._messages import validate_messages
|
from torchtune.data._messages import validate_messages
|
||||||
from torchtune.modules.transforms import Transform
|
from torchtune.modules.transforms import Transform
|
||||||
|
|
||||||
|
from llama_stack.providers.inline.post_training.torchtune.datasets.format_adapter import (
|
||||||
|
llama_stack_chat_to_torchtune_chat,
|
||||||
|
llama_stack_instruct_to_torchtune_instruct,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class SFTDataset(Dataset):
|
class SFTDataset(Dataset):
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue