Skip to content

Commit 5002a52

Browse files
committed
update
1 parent 60820f0 commit 5002a52

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

cookbook/client/tinker/self_host/sample.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
params = types.SamplingParams(
5353
max_tokens=128, # Maximum number of tokens to generate
5454
temperature=0.7,
55-
stop=['\n'] # Stop generation when a newline character is produced
5655
)
5756

5857
# Step 6: Send the sampling request to the server.

cookbook/client/twinkle/self_host/self_congnition.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
# - api_key: authentication token (loaded from environment variable)
3232
client = init_twinkle_client(base_url=base_url, api_key=api_key)
3333

34+
# List available models of the server
35+
print('Available models:')
36+
for item in client.get_server_capabilities().supported_models:
37+
print('- ' + item.model_name)
38+
3439
# Step 3: Query the server for existing training runs and their checkpoints.
3540
# This is useful for resuming a previous training session.
3641
runs = client.list_training_runs()

src/twinkle_client/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import threading
66
from typing import Any, Dict, List, Optional, Tuple
77
from twinkle import get_logger
8-
from twinkle_client.types.server import (DeleteCheckpointResponse, GetServerCapabilitiesResponse, SupportedModel)
8+
from twinkle_client.types.server import (DeleteCheckpointResponse, GetServerCapabilitiesResponse)
99
from twinkle_client.types.session import (CreateSessionRequest, CreateSessionResponse, SessionHeartbeatRequest,
1010
SessionHeartbeatResponse)
1111
from twinkle_client.types.training import (Checkpoint, Cursor, ParsedCheckpointTwinklePath, TrainingRun,

0 commit comments

Comments
 (0)