together 1.5.3__py3-none-any.whl → 1.5.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- together/client.py +5 -0
- together/filemanager.py +2 -1
- together/resources/code_interpreter.py +58 -0
- together/resources/finetune.py +42 -32
- together/types/__init__.py +8 -8
- together/types/code_interpreter.py +46 -0
- together/types/finetune.py +16 -10
- {together-1.5.3.dist-info → together-1.5.5.dist-info}/METADATA +1 -1
- {together-1.5.3.dist-info → together-1.5.5.dist-info}/RECORD +12 -10
- {together-1.5.3.dist-info → together-1.5.5.dist-info}/WHEEL +1 -1
- {together-1.5.3.dist-info → together-1.5.5.dist-info}/LICENSE +0 -0
- {together-1.5.3.dist-info → together-1.5.5.dist-info}/entry_points.txt +0 -0
together/client.py
CHANGED
|
@@ -7,6 +7,7 @@ from typing import Dict, TYPE_CHECKING
|
|
|
7
7
|
from together import resources
|
|
8
8
|
from together.constants import BASE_URL, MAX_RETRIES, TIMEOUT_SECS
|
|
9
9
|
from together.error import AuthenticationError
|
|
10
|
+
from together.resources.code_interpreter import CodeInterpreter
|
|
10
11
|
from together.types import TogetherClient
|
|
11
12
|
from together.utils import enforce_trailing_slash
|
|
12
13
|
from together.utils.api_helpers import get_google_colab_secret
|
|
@@ -22,6 +23,7 @@ class Together:
|
|
|
22
23
|
fine_tuning: resources.FineTuning
|
|
23
24
|
rerank: resources.Rerank
|
|
24
25
|
audio: resources.Audio
|
|
26
|
+
code_interpreter: CodeInterpreter
|
|
25
27
|
|
|
26
28
|
# client options
|
|
27
29
|
client: TogetherClient
|
|
@@ -87,6 +89,7 @@ class Together:
|
|
|
87
89
|
self.rerank = resources.Rerank(self.client)
|
|
88
90
|
self.audio = resources.Audio(self.client)
|
|
89
91
|
self.endpoints = resources.Endpoints(self.client)
|
|
92
|
+
self.code_interpreter = CodeInterpreter(self.client)
|
|
90
93
|
|
|
91
94
|
|
|
92
95
|
class AsyncTogether:
|
|
@@ -98,6 +101,7 @@ class AsyncTogether:
|
|
|
98
101
|
models: resources.AsyncModels
|
|
99
102
|
fine_tuning: resources.AsyncFineTuning
|
|
100
103
|
rerank: resources.AsyncRerank
|
|
104
|
+
code_interpreter: CodeInterpreter
|
|
101
105
|
|
|
102
106
|
# client options
|
|
103
107
|
client: TogetherClient
|
|
@@ -161,6 +165,7 @@ class AsyncTogether:
|
|
|
161
165
|
self.models = resources.AsyncModels(self.client)
|
|
162
166
|
self.fine_tuning = resources.AsyncFineTuning(self.client)
|
|
163
167
|
self.rerank = resources.AsyncRerank(self.client)
|
|
168
|
+
self.code_interpreter = CodeInterpreter(self.client)
|
|
164
169
|
|
|
165
170
|
|
|
166
171
|
Client = Together
|
together/filemanager.py
CHANGED
|
@@ -378,7 +378,8 @@ class UploadManager:
|
|
|
378
378
|
|
|
379
379
|
if not callback_response.status_code == 200:
|
|
380
380
|
raise APIError(
|
|
381
|
-
f"Error
|
|
381
|
+
f"Error during file upload: {callback_response.content.decode()}, headers: {callback_response.headers}",
|
|
382
|
+
http_status=callback_response.status_code,
|
|
382
383
|
)
|
|
383
384
|
|
|
384
385
|
response = self.callback(f"{url}/{file_id}/preprocess")
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Literal, Optional
|
|
4
|
+
|
|
5
|
+
from together.abstract import api_requestor
|
|
6
|
+
from together.together_response import TogetherResponse
|
|
7
|
+
from together.types import TogetherClient, TogetherRequest
|
|
8
|
+
from together.types.code_interpreter import ExecuteResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CodeInterpreter:
|
|
12
|
+
"""Code Interpreter resource for executing code snippets."""
|
|
13
|
+
|
|
14
|
+
def __init__(self, client: TogetherClient) -> None:
|
|
15
|
+
self._client = client
|
|
16
|
+
|
|
17
|
+
def run(
|
|
18
|
+
self,
|
|
19
|
+
code: str,
|
|
20
|
+
language: Literal["python"],
|
|
21
|
+
session_id: Optional[str] = None,
|
|
22
|
+
) -> ExecuteResponse:
|
|
23
|
+
"""Execute a code snippet.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
code (str): Code snippet to execute
|
|
27
|
+
language (str): Programming language for the code to execute. Currently only supports Python.
|
|
28
|
+
session_id (str, optional): Identifier of the current session. Used to make follow-up calls.
|
|
29
|
+
|
|
30
|
+
Returns:
|
|
31
|
+
ExecuteResponse: Object containing execution results and outputs
|
|
32
|
+
"""
|
|
33
|
+
requestor = api_requestor.APIRequestor(
|
|
34
|
+
client=self._client,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
data: Dict[str, str] = {
|
|
38
|
+
"code": code,
|
|
39
|
+
"language": language,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if session_id is not None:
|
|
43
|
+
data["session_id"] = session_id
|
|
44
|
+
|
|
45
|
+
# Use absolute URL to bypass the /v1 prefix
|
|
46
|
+
response, _, _ = requestor.request(
|
|
47
|
+
options=TogetherRequest(
|
|
48
|
+
method="POST",
|
|
49
|
+
url="/tci/execute",
|
|
50
|
+
params=data,
|
|
51
|
+
),
|
|
52
|
+
stream=False,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
assert isinstance(response, TogetherResponse)
|
|
56
|
+
|
|
57
|
+
# Return the response data directly since our types match the API structure
|
|
58
|
+
return ExecuteResponse(**response.data)
|
together/resources/finetune.py
CHANGED
|
@@ -2,7 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import re
|
|
4
4
|
from pathlib import Path
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import List, Literal
|
|
6
6
|
|
|
7
7
|
from rich import print as rprint
|
|
8
8
|
|
|
@@ -10,37 +10,38 @@ from together.abstract import api_requestor
|
|
|
10
10
|
from together.filemanager import DownloadManager
|
|
11
11
|
from together.together_response import TogetherResponse
|
|
12
12
|
from together.types import (
|
|
13
|
+
CosineLRScheduler,
|
|
14
|
+
CosineLRSchedulerArgs,
|
|
15
|
+
FinetuneCheckpoint,
|
|
13
16
|
FinetuneDownloadResult,
|
|
14
17
|
FinetuneList,
|
|
15
18
|
FinetuneListEvents,
|
|
19
|
+
FinetuneLRScheduler,
|
|
16
20
|
FinetuneRequest,
|
|
17
21
|
FinetuneResponse,
|
|
18
22
|
FinetuneTrainingLimits,
|
|
19
23
|
FullTrainingType,
|
|
24
|
+
LinearLRScheduler,
|
|
25
|
+
LinearLRSchedulerArgs,
|
|
20
26
|
LoRATrainingType,
|
|
21
27
|
TogetherClient,
|
|
22
28
|
TogetherRequest,
|
|
23
|
-
TrainingType,
|
|
24
|
-
FinetuneLRScheduler,
|
|
25
|
-
FinetuneLinearLRScheduler,
|
|
26
|
-
FinetuneCosineLRScheduler,
|
|
27
|
-
FinetuneLinearLRSchedulerArgs,
|
|
28
|
-
FinetuneCosineLRSchedulerArgs,
|
|
29
29
|
TrainingMethodDPO,
|
|
30
30
|
TrainingMethodSFT,
|
|
31
|
-
|
|
31
|
+
TrainingType,
|
|
32
32
|
)
|
|
33
33
|
from together.types.finetune import (
|
|
34
34
|
DownloadCheckpointType,
|
|
35
|
-
FinetuneEventType,
|
|
36
35
|
FinetuneEvent,
|
|
36
|
+
FinetuneEventType,
|
|
37
37
|
)
|
|
38
38
|
from together.utils import (
|
|
39
|
+
get_event_step,
|
|
39
40
|
log_warn_once,
|
|
40
41
|
normalize_key,
|
|
41
|
-
get_event_step,
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
+
|
|
44
45
|
_FT_JOB_WITH_STEP_REGEX = r"^ft-[\dabcdef-]+:\d+$"
|
|
45
46
|
|
|
46
47
|
|
|
@@ -50,7 +51,7 @@ AVAILABLE_TRAINING_METHODS = {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
|
|
53
|
-
def
|
|
54
|
+
def create_finetune_request(
|
|
54
55
|
model_limits: FinetuneTrainingLimits,
|
|
55
56
|
training_file: str,
|
|
56
57
|
model: str | None = None,
|
|
@@ -63,7 +64,7 @@ def createFinetuneRequest(
|
|
|
63
64
|
lr_scheduler_type: Literal["linear", "cosine"] = "linear",
|
|
64
65
|
min_lr_ratio: float = 0.0,
|
|
65
66
|
scheduler_num_cycles: float = 0.5,
|
|
66
|
-
warmup_ratio: float =
|
|
67
|
+
warmup_ratio: float | None = None,
|
|
67
68
|
max_grad_norm: float = 1.0,
|
|
68
69
|
weight_decay: float = 0.0,
|
|
69
70
|
lora: bool = False,
|
|
@@ -81,7 +82,6 @@ def createFinetuneRequest(
|
|
|
81
82
|
dpo_beta: float | None = None,
|
|
82
83
|
from_checkpoint: str | None = None,
|
|
83
84
|
) -> FinetuneRequest:
|
|
84
|
-
|
|
85
85
|
if model is not None and from_checkpoint is not None:
|
|
86
86
|
raise ValueError(
|
|
87
87
|
"You must specify either a model or a checkpoint to start a job from, not both"
|
|
@@ -90,6 +90,8 @@ def createFinetuneRequest(
|
|
|
90
90
|
if model is None and from_checkpoint is None:
|
|
91
91
|
raise ValueError("You must specify either a model or a checkpoint")
|
|
92
92
|
|
|
93
|
+
model_or_checkpoint = model or from_checkpoint
|
|
94
|
+
|
|
93
95
|
if batch_size == "max":
|
|
94
96
|
log_warn_once(
|
|
95
97
|
"Starting from together>=1.3.0, "
|
|
@@ -103,7 +105,9 @@ def createFinetuneRequest(
|
|
|
103
105
|
min_batch_size: int = 0
|
|
104
106
|
if lora:
|
|
105
107
|
if model_limits.lora_training is None:
|
|
106
|
-
raise ValueError(
|
|
108
|
+
raise ValueError(
|
|
109
|
+
f"LoRA adapters are not supported for the selected model ({model_or_checkpoint})."
|
|
110
|
+
)
|
|
107
111
|
lora_r = lora_r if lora_r is not None else model_limits.lora_training.max_rank
|
|
108
112
|
lora_alpha = lora_alpha if lora_alpha is not None else lora_r * 2
|
|
109
113
|
training_type = LoRATrainingType(
|
|
@@ -118,7 +122,9 @@ def createFinetuneRequest(
|
|
|
118
122
|
|
|
119
123
|
else:
|
|
120
124
|
if model_limits.full_training is None:
|
|
121
|
-
raise ValueError(
|
|
125
|
+
raise ValueError(
|
|
126
|
+
f"Full training is not supported for the selected model ({model_or_checkpoint})."
|
|
127
|
+
)
|
|
122
128
|
|
|
123
129
|
max_batch_size = model_limits.full_training.max_batch_size
|
|
124
130
|
min_batch_size = model_limits.full_training.min_batch_size
|
|
@@ -127,46 +133,50 @@ def createFinetuneRequest(
|
|
|
127
133
|
|
|
128
134
|
if batch_size > max_batch_size:
|
|
129
135
|
raise ValueError(
|
|
130
|
-
"Requested batch size is higher that the maximum allowed value."
|
|
136
|
+
f"Requested batch size of {batch_size} is higher that the maximum allowed value of {max_batch_size}."
|
|
131
137
|
)
|
|
132
138
|
|
|
133
139
|
if batch_size < min_batch_size:
|
|
134
140
|
raise ValueError(
|
|
135
|
-
"Requested batch size is lower that the minimum allowed value."
|
|
141
|
+
f"Requested batch size of {batch_size} is lower that the minimum allowed value of {min_batch_size}."
|
|
136
142
|
)
|
|
137
143
|
|
|
138
144
|
if warmup_ratio > 1 or warmup_ratio < 0:
|
|
139
|
-
raise ValueError("Warmup ratio should be between 0 and 1")
|
|
145
|
+
raise ValueError(f"Warmup ratio should be between 0 and 1 (got {warmup_ratio})")
|
|
140
146
|
|
|
141
147
|
if min_lr_ratio is not None and (min_lr_ratio > 1 or min_lr_ratio < 0):
|
|
142
|
-
raise ValueError(
|
|
148
|
+
raise ValueError(
|
|
149
|
+
f"Min learning rate ratio should be between 0 and 1 (got {min_lr_ratio})"
|
|
150
|
+
)
|
|
143
151
|
|
|
144
152
|
if max_grad_norm < 0:
|
|
145
|
-
raise ValueError(
|
|
153
|
+
raise ValueError(
|
|
154
|
+
f"Max gradient norm should be non-negative (got {max_grad_norm})"
|
|
155
|
+
)
|
|
146
156
|
|
|
147
157
|
if weight_decay is not None and (weight_decay < 0):
|
|
148
|
-
raise ValueError("Weight decay should be non-negative")
|
|
158
|
+
raise ValueError(f"Weight decay should be non-negative (got {weight_decay})")
|
|
149
159
|
|
|
150
160
|
if training_method not in AVAILABLE_TRAINING_METHODS:
|
|
151
161
|
raise ValueError(
|
|
152
162
|
f"training_method must be one of {', '.join(AVAILABLE_TRAINING_METHODS)}"
|
|
153
163
|
)
|
|
154
164
|
|
|
155
|
-
|
|
156
|
-
lrScheduler: FinetuneLRScheduler = FinetuneLRScheduler(lr_scheduler_type="linear")
|
|
157
|
-
|
|
165
|
+
lr_scheduler: FinetuneLRScheduler
|
|
158
166
|
if lr_scheduler_type == "cosine":
|
|
159
167
|
if scheduler_num_cycles <= 0.0:
|
|
160
|
-
raise ValueError(
|
|
168
|
+
raise ValueError(
|
|
169
|
+
f"Number of cycles should be greater than 0 (got {scheduler_num_cycles})"
|
|
170
|
+
)
|
|
161
171
|
|
|
162
|
-
|
|
163
|
-
lr_scheduler_args=
|
|
172
|
+
lr_scheduler = CosineLRScheduler(
|
|
173
|
+
lr_scheduler_args=CosineLRSchedulerArgs(
|
|
164
174
|
min_lr_ratio=min_lr_ratio, num_cycles=scheduler_num_cycles
|
|
165
175
|
),
|
|
166
176
|
)
|
|
167
177
|
else:
|
|
168
|
-
|
|
169
|
-
lr_scheduler_args=
|
|
178
|
+
lr_scheduler = LinearLRScheduler(
|
|
179
|
+
lr_scheduler_args=LinearLRSchedulerArgs(min_lr_ratio=min_lr_ratio),
|
|
170
180
|
)
|
|
171
181
|
|
|
172
182
|
training_method_cls: TrainingMethodSFT | TrainingMethodDPO = TrainingMethodSFT()
|
|
@@ -182,7 +192,7 @@ def createFinetuneRequest(
|
|
|
182
192
|
n_checkpoints=n_checkpoints,
|
|
183
193
|
batch_size=batch_size,
|
|
184
194
|
learning_rate=learning_rate,
|
|
185
|
-
lr_scheduler=
|
|
195
|
+
lr_scheduler=lr_scheduler,
|
|
186
196
|
warmup_ratio=warmup_ratio,
|
|
187
197
|
max_grad_norm=max_grad_norm,
|
|
188
198
|
weight_decay=weight_decay,
|
|
@@ -374,7 +384,7 @@ class FineTuning:
|
|
|
374
384
|
pass
|
|
375
385
|
model_limits = self.get_model_limits(model=model_name)
|
|
376
386
|
|
|
377
|
-
finetune_request =
|
|
387
|
+
finetune_request = create_finetune_request(
|
|
378
388
|
model_limits=model_limits,
|
|
379
389
|
training_file=training_file,
|
|
380
390
|
model=model,
|
|
@@ -762,7 +772,7 @@ class AsyncFineTuning:
|
|
|
762
772
|
pass
|
|
763
773
|
model_limits = await self.get_model_limits(model=model_name)
|
|
764
774
|
|
|
765
|
-
finetune_request =
|
|
775
|
+
finetune_request = create_finetune_request(
|
|
766
776
|
model_limits=model_limits,
|
|
767
777
|
training_file=training_file,
|
|
768
778
|
model=model,
|
together/types/__init__.py
CHANGED
|
@@ -34,11 +34,11 @@ from together.types.finetune import (
|
|
|
34
34
|
TrainingMethodDPO,
|
|
35
35
|
TrainingMethodSFT,
|
|
36
36
|
FinetuneCheckpoint,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
CosineLRScheduler,
|
|
38
|
+
CosineLRSchedulerArgs,
|
|
39
39
|
FinetuneDownloadResult,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
LinearLRScheduler,
|
|
41
|
+
LinearLRSchedulerArgs,
|
|
42
42
|
FinetuneLRScheduler,
|
|
43
43
|
FinetuneList,
|
|
44
44
|
FinetuneListEvents,
|
|
@@ -72,10 +72,10 @@ __all__ = [
|
|
|
72
72
|
"FinetuneListEvents",
|
|
73
73
|
"FinetuneDownloadResult",
|
|
74
74
|
"FinetuneLRScheduler",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
75
|
+
"LinearLRScheduler",
|
|
76
|
+
"LinearLRSchedulerArgs",
|
|
77
|
+
"CosineLRScheduler",
|
|
78
|
+
"CosineLRSchedulerArgs",
|
|
79
79
|
"FileRequest",
|
|
80
80
|
"FileResponse",
|
|
81
81
|
"FileList",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, Literal, Union
|
|
4
|
+
|
|
5
|
+
from pydantic import Field
|
|
6
|
+
|
|
7
|
+
from together.types.endpoints import TogetherJSONModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InterpreterOutput(TogetherJSONModel):
|
|
11
|
+
"""Base class for interpreter output types."""
|
|
12
|
+
|
|
13
|
+
type: Literal["stdout", "stderr", "error", "display_data", "execute_result"] = (
|
|
14
|
+
Field(description="The type of output")
|
|
15
|
+
)
|
|
16
|
+
data: Union[str, Dict[str, Any]] = Field(description="The output data")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ExecuteResponseData(TogetherJSONModel):
|
|
20
|
+
"""Data from code execution response."""
|
|
21
|
+
|
|
22
|
+
outputs: list[InterpreterOutput] = Field(
|
|
23
|
+
description="List of outputs from execution", default_factory=list
|
|
24
|
+
)
|
|
25
|
+
errors: Union[str, None] = Field(
|
|
26
|
+
description="Any errors that occurred during execution", default=None
|
|
27
|
+
)
|
|
28
|
+
session_id: str = Field(
|
|
29
|
+
description="Identifier of the current session. Used to make follow-up calls."
|
|
30
|
+
)
|
|
31
|
+
status: str = Field(description="Status of the execution", default="completed")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ExecuteResponse(TogetherJSONModel):
|
|
35
|
+
"""Response from code execution."""
|
|
36
|
+
|
|
37
|
+
data: ExecuteResponseData = Field(
|
|
38
|
+
description="The response data containing outputs and session information"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
__all__ = [
|
|
43
|
+
"InterpreterOutput",
|
|
44
|
+
"ExecuteResponseData",
|
|
45
|
+
"ExecuteResponse",
|
|
46
|
+
]
|
together/types/finetune.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from enum import Enum
|
|
4
|
-
from typing import List, Literal
|
|
4
|
+
from typing import List, Literal
|
|
5
5
|
|
|
6
|
-
from pydantic import StrictBool, Field,
|
|
6
|
+
from pydantic import StrictBool, Field, field_validator
|
|
7
7
|
|
|
8
8
|
from together.types.abstract import BaseModel
|
|
9
9
|
from together.types.common import (
|
|
@@ -176,7 +176,7 @@ class FinetuneRequest(BaseModel):
|
|
|
176
176
|
# training learning rate
|
|
177
177
|
learning_rate: float
|
|
178
178
|
# learning rate scheduler type and args
|
|
179
|
-
lr_scheduler:
|
|
179
|
+
lr_scheduler: LinearLRScheduler | CosineLRScheduler | None = None
|
|
180
180
|
# learning rate warmup ratio
|
|
181
181
|
warmup_ratio: float
|
|
182
182
|
# max gradient norm
|
|
@@ -239,7 +239,7 @@ class FinetuneResponse(BaseModel):
|
|
|
239
239
|
# training learning rate
|
|
240
240
|
learning_rate: float | None = None
|
|
241
241
|
# learning rate scheduler type and args
|
|
242
|
-
lr_scheduler:
|
|
242
|
+
lr_scheduler: LinearLRScheduler | CosineLRScheduler | EmptyLRScheduler | None = None
|
|
243
243
|
# learning rate warmup ratio
|
|
244
244
|
warmup_ratio: float | None = None
|
|
245
245
|
# max gradient norm
|
|
@@ -345,11 +345,11 @@ class FinetuneTrainingLimits(BaseModel):
|
|
|
345
345
|
lora_training: FinetuneLoraTrainingLimits | None = None
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
class
|
|
348
|
+
class LinearLRSchedulerArgs(BaseModel):
|
|
349
349
|
min_lr_ratio: float | None = 0.0
|
|
350
350
|
|
|
351
351
|
|
|
352
|
-
class
|
|
352
|
+
class CosineLRSchedulerArgs(BaseModel):
|
|
353
353
|
min_lr_ratio: float | None = 0.0
|
|
354
354
|
num_cycles: float | None = 0.5
|
|
355
355
|
|
|
@@ -358,14 +358,20 @@ class FinetuneLRScheduler(BaseModel):
|
|
|
358
358
|
lr_scheduler_type: str
|
|
359
359
|
|
|
360
360
|
|
|
361
|
-
class
|
|
361
|
+
class LinearLRScheduler(FinetuneLRScheduler):
|
|
362
362
|
lr_scheduler_type: Literal["linear"] = "linear"
|
|
363
|
-
|
|
363
|
+
lr_scheduler_args: LinearLRSchedulerArgs | None = None
|
|
364
364
|
|
|
365
365
|
|
|
366
|
-
class
|
|
366
|
+
class CosineLRScheduler(FinetuneLRScheduler):
|
|
367
367
|
lr_scheduler_type: Literal["cosine"] = "cosine"
|
|
368
|
-
|
|
368
|
+
lr_scheduler_args: CosineLRSchedulerArgs | None = None
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
# placeholder for old fine-tuning jobs with no lr_scheduler_type specified
|
|
372
|
+
class EmptyLRScheduler(FinetuneLRScheduler):
|
|
373
|
+
lr_scheduler_type: Literal[""]
|
|
374
|
+
lr_scheduler_args: None = None
|
|
369
375
|
|
|
370
376
|
|
|
371
377
|
class FinetuneCheckpoint(BaseModel):
|
|
@@ -12,10 +12,10 @@ together/cli/api/images.py,sha256=GADSeaNUHUVMtWovmccGuKc28IJ9E_v4vAEwYHJhu5o,26
|
|
|
12
12
|
together/cli/api/models.py,sha256=CXw8B1hqNkadogi58GIXhLg_dTJnvTBaE7Kq1_xQ-10,1423
|
|
13
13
|
together/cli/api/utils.py,sha256=IuqYWPnLI38_Bqd7lj8V_SnGdYc59pRmMbQmciS4FsM,1326
|
|
14
14
|
together/cli/cli.py,sha256=YCDzbXpC5is0rs2PEkUPrIhYuzdyrihQ8GVR_TlDv5s,2054
|
|
15
|
-
together/client.py,sha256=
|
|
15
|
+
together/client.py,sha256=lN_KfJs2gCdLfQ5GBrVKin-4ZL7L7UQf9wjofWQ7sXg,5682
|
|
16
16
|
together/constants.py,sha256=UDJhEylJFmdm4bedBDpvqYXBj5Or3k7z9GWtkRY_dZQ,1526
|
|
17
17
|
together/error.py,sha256=HU6247CyzCFjaxL9A0XYbXZ6fY_ebRg0FEYjI4Skogs,5515
|
|
18
|
-
together/filemanager.py,sha256=
|
|
18
|
+
together/filemanager.py,sha256=lwNIYm-BAcnUPtyE0Q_8NpRNsxMlQrpIWFVUVJBBz88,11356
|
|
19
19
|
together/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
together/legacy/base.py,sha256=ehrX1SCfRbK5OA83wL1q7-tfF-yuZOUxzjxYfFtdvvQ,727
|
|
21
21
|
together/legacy/complete.py,sha256=NRJX-vjnkg4HrgDo9LS3jFfhwfXpeGxcl24dcrLPK3A,2439
|
|
@@ -29,26 +29,28 @@ together/resources/audio/__init__.py,sha256=e7xp0Lkp_nMAHXcuFHS7dLXP_YqTPMMZIilW
|
|
|
29
29
|
together/resources/audio/speech.py,sha256=81ib_gIo-Rxoaipx2Pi9ZsKnOTjeFPwSlBrcUkyX5xk,5211
|
|
30
30
|
together/resources/chat/__init__.py,sha256=RsTptdP8MeGjcdIjze896-J27cRvCbUoMft0X2BVlQ8,617
|
|
31
31
|
together/resources/chat/completions.py,sha256=jYiNZsWa8RyEacL0VgxWj1egJ857oU4nxIY8uqGHcaU,14459
|
|
32
|
+
together/resources/code_interpreter.py,sha256=gkzBgGZ6XckrUIB_ml0ju3_ACtNT3116cqYFeupyYKM,1788
|
|
32
33
|
together/resources/completions.py,sha256=5Wa-ZjPCxRcam6CDe7KgGYlTA7yJZMmd5TrRgGCL_ug,11726
|
|
33
34
|
together/resources/embeddings.py,sha256=PTvLb82yjG_-iQOyuhsilp77Fr7gZ0o6WD2KeRnKoxs,2675
|
|
34
35
|
together/resources/endpoints.py,sha256=NNjp-wyzOotzlscGGrANhOHxQBjHTN8f5kTQTH_CLvE,17177
|
|
35
36
|
together/resources/files.py,sha256=bnPbaF25e4InBRPvHwXHXT-oSX1Z1sZRsnQW5wq82U4,4990
|
|
36
|
-
together/resources/finetune.py,sha256=
|
|
37
|
+
together/resources/finetune.py,sha256=LgU-6VvxTS-3tSpDt-rrd5MHXOnCE8irkmv7393eq-c,36373
|
|
37
38
|
together/resources/images.py,sha256=LQUjKPaFxWTqOAPnyF1Pp7Rz4NLOYhmoKwshpYiprEM,4923
|
|
38
39
|
together/resources/models.py,sha256=qgmAXv61Cq4oLxytenEZBywA8shldDHYxJ_EAu_4JWQ,3864
|
|
39
40
|
together/resources/rerank.py,sha256=3Ju_aRSyZ1s_3zCSNZnSnEJErUVmt2xa3M8z1nvejMA,3931
|
|
40
41
|
together/together_response.py,sha256=a3dgKMPDrlfKQwxYENfNt2T4l2vSZxRWMixhHSy-q3E,1308
|
|
41
|
-
together/types/__init__.py,sha256=
|
|
42
|
+
together/types/__init__.py,sha256=VgIbE2AOK9c2TQUzkbRbyRkdia2COXJXl_wxPaoxR-M,2688
|
|
42
43
|
together/types/abstract.py,sha256=1lFQI_3WjsR_t1128AeKW0aTk6EiM6Gh1J3ZuyLLPao,642
|
|
43
44
|
together/types/audio_speech.py,sha256=jlj8BZf3dkIDARF1P11fuenVLj4try8Yx4RN-EAkhOU,2609
|
|
44
45
|
together/types/chat_completions.py,sha256=ggwt1LlBXTB_hZKbtLsjg8j-gXxO8pUUQfTrxUmRXHU,5078
|
|
46
|
+
together/types/code_interpreter.py,sha256=Ali8Prv9TXqcvCMeYffWbOsTmljs8sgvWIY3-kkcQ7M,1331
|
|
45
47
|
together/types/common.py,sha256=kxZ-N9xtBsGYZBmbIWnZ0rfT3Pn8PFB7sAbp3iv96pw,1525
|
|
46
48
|
together/types/completions.py,sha256=o3FR5ixsTUj-a3pmOUzbSQg-hESVhpqrC9UD__VCqr4,2971
|
|
47
49
|
together/types/embeddings.py,sha256=J7grkYYn7xhqeKaBO2T-8XQRtHhkzYzymovtGdIUK5A,751
|
|
48
50
|
together/types/endpoints.py,sha256=EzNhHOoQ_D9fUdNQtxQPeSWiFzdFLqpNodN0YLmv_h0,4393
|
|
49
51
|
together/types/error.py,sha256=OVlCs3cx_2WhZK4JzHT8SQyRIIqKOP1AZQ4y1PydjAE,370
|
|
50
52
|
together/types/files.py,sha256=-rEUfsV6f2vZB9NrFxT4_933ubsDIUNkPB-3OlOFk4A,1954
|
|
51
|
-
together/types/finetune.py,sha256=
|
|
53
|
+
together/types/finetune.py,sha256=zEgzVwYsjS0ApbMjafcAjg6cpD-Wn6_kGRpc5qtlt0I,10601
|
|
52
54
|
together/types/images.py,sha256=xnC-FZGdZU30WSFTybfGneWxb-kj0ZGufJsgHtB8j0k,980
|
|
53
55
|
together/types/models.py,sha256=nwQIZGHKZpX9I6mK8z56VW70YC6Ry6JGsVa0s99QVxc,1055
|
|
54
56
|
together/types/rerank.py,sha256=qZfuXOn7MZ6ly8hpJ_MZ7OU_Bi1-cgYNSB20Wja8Qkk,1061
|
|
@@ -58,8 +60,8 @@ together/utils/api_helpers.py,sha256=2K0O6qeEQ2zVFvi5NBN5m2kjZJaS3-JfKFecQ7SmGaw
|
|
|
58
60
|
together/utils/files.py,sha256=rfp10qU0urtWOXXFeasFtO9xp-1KIhM3S43JxcnHmL0,16438
|
|
59
61
|
together/utils/tools.py,sha256=H2MTJhEqtBllaDvOyZehIO_IVNK3P17rSDeILtJIVag,2964
|
|
60
62
|
together/version.py,sha256=p03ivHyE0SyWU4jAnRTBi_sOwywVWoZPU4g2gzRgG-Y,126
|
|
61
|
-
together-1.5.
|
|
62
|
-
together-1.5.
|
|
63
|
-
together-1.5.
|
|
64
|
-
together-1.5.
|
|
65
|
-
together-1.5.
|
|
63
|
+
together-1.5.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
64
|
+
together-1.5.5.dist-info/METADATA,sha256=A3mwKnEnrcaDD4D8iYpKj_XfmFUf3BZziEK5qiKWXyg,14397
|
|
65
|
+
together-1.5.5.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
66
|
+
together-1.5.5.dist-info/entry_points.txt,sha256=G-b5NKW6lUUf1V1fH8IPTBb7jXnK7lhbX9H1zTEJXPs,50
|
|
67
|
+
together-1.5.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|