Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions xtuner/v1/module/attention/attn_outputs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import TypedDict

import torch
from typing_extensions import TypedDict


class AttnOutputs(TypedDict, total=False):
Expand Down
2 changes: 1 addition & 1 deletion xtuner/v1/ops/attn_imp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import traceback
from functools import lru_cache
from typing import TypedDict

import torch
import torch.nn as nn
Expand All @@ -14,6 +13,7 @@
from torch.nn.attention.flex_attention import (
flex_attention as torch_flex_attention,
)
from typing_extensions import TypedDict

from transformers.models.llama.modeling_llama import repeat_kv

Expand Down
3 changes: 2 additions & 1 deletion xtuner/v1/rl/base/controller.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import math
import os
from typing import Literal, TypedDict
from typing import Literal

import ray
import torch
from ray.actor import ActorProxy
from typing_extensions import TypedDict

from xtuner.v1.data_proto.sequence_context import SequenceContext
from xtuner.v1.model.compose.base import BaseComposeConfig
Expand Down
4 changes: 2 additions & 2 deletions xtuner/v1/rl/base/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time
from itertools import chain
from pathlib import Path
from typing import Dict, Iterable, List, TypeAlias, TypedDict, cast
from typing import Dict, Iterable, List, TypeAlias, cast

import ray
import requests
Expand All @@ -16,7 +16,7 @@
from ray.actor import ActorClass, ActorProxy
from torch.distributed.device_mesh import DeviceMesh, init_device_mesh
from torch.distributed.tensor import DTensor
from typing_extensions import NotRequired
from typing_extensions import NotRequired, TypedDict

from transformers import AutoTokenizer
from xtuner.v1.config.fsdp import FSDPConfig
Expand Down
Loading