File size: 12,302 Bytes
08bbbe9
 
 
 
 
 
 
 
 
 
 
 
 
4b65d4d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
```CODE: 
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="ByteDance-Seed/Stable-DiffCoder-8B-Instruct", trust_remote_code=True)
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
```

ERROR: 
Traceback (most recent call last):
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
    yield
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_transports/default.py", line 250, in handle_request
    resp = self._pool.handle_request(req)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
    raise exc from None
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
    response = connection.handle_request(
        pool_request.request
    )
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 103, in handle_request
    return self._connection.handle_request(request)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_sync/http11.py", line 136, in handle_request
    raise exc
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_sync/http11.py", line 106, in handle_request
    ) = self._receive_response_headers(**kwargs)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_sync/http11.py", line 177, in _receive_response_headers
    event = self._receive_event(timeout=timeout)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_sync/http11.py", line 217, in _receive_event
    data = self._network_stream.read(
        self.READ_NUM_BYTES, timeout=timeout
    )
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_backends/sync.py", line 126, in read
    with map_exceptions(exc_map):
         ~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ReadTimeout: The read operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/ByteDance-Seed_Stable-DiffCoder-8B-Instruct_0n4qxnm.py", line 26, in <module>
    pipe = pipeline("text-generation", model="ByteDance-Seed/Stable-DiffCoder-8B-Instruct", trust_remote_code=True)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/__init__.py", line 836, in pipeline
    model = load_model(
        adapter_path if adapter_path is not None else model,
    ...<4 lines>...
        **model_kwargs,
    )
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/base.py", line 232, in load_model
    model = model_class.from_pretrained(model, **kwargs)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 365, in from_pretrained
    return model_class.from_pretrained(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/modeling_utils.py", line 4038, in from_pretrained
    checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        pretrained_model_name_or_path=pretrained_model_name_or_path,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
        transformers_explicit_filename=getattr(config, "transformers_weights", None),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/modeling_utils.py", line 760, in _get_resolved_checkpoint_files
    checkpoint_files, sharded_metadata = get_checkpoint_shard_files(
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        pretrained_model_name_or_path,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
        _commit_hash=commit_hash,
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/utils/hub.py", line 869, in get_checkpoint_shard_files
    cached_filenames = cached_files(
        pretrained_model_name_or_path,
    ...<9 lines>...
        _commit_hash=_commit_hash,
    )
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/utils/hub.py", line 507, in cached_files
    raise e
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/utils/hub.py", line 433, in cached_files
    snapshot_download(
    ~~~~~~~~~~~~~~~~~^
        path_or_repo_id,
        ^^^^^^^^^^^^^^^^
    ...<8 lines>...
        local_files_only=local_files_only,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/_snapshot_download.py", line 449, in snapshot_download
    thread_map(
    ~~~~~~~~~~^
        _inner_hf_hub_download,
        ^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
        tqdm_class=tqdm_class,
        ^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
    return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/tqdm/std.py", line 1181, in __iter__
    for obj in iterable:
               ^^^^^^^^
  File "/usr/lib/python3.13/concurrent/futures/_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/concurrent/futures/_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/_snapshot_download.py", line 429, in _inner_hf_hub_download
    hf_hub_download(  # type: ignore
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
        repo_id,
        ^^^^^^^^
    ...<14 lines>...
        dry_run=dry_run,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1024, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
        # Destination
    ...<15 lines>...
        dry_run=dry_run,
    )
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1240, in _hf_hub_download_to_cache_dir
    _download_to_tmp_and_move(
    ~~~~~~~~~~~~~~~~~~~~~~~~~^
        incomplete_path=Path(blob_path + ".incomplete"),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<8 lines>...
        tqdm_class=tqdm_class,
        ^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1864, in _download_to_tmp_and_move
    xet_get(
    ~~~~~~~^
        incomplete_path=incomplete_path,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
        tqdm_class=tqdm_class,
        ^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 552, in xet_get
    connection_info = refresh_xet_connection_info(file_data=xet_file_data, headers=headers)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/utils/_xet.py", line 122, in refresh_xet_connection_info
    return _fetch_xet_connection_info_with_url(file_data.refresh_route, headers)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/huggingface_hub/utils/_xet.py", line 203, in _fetch_xet_connection_info_with_url
    resp = get_session().get(headers=headers, url=url, params=params)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_client.py", line 1053, in get
    return self.request(
           ~~~~~~~~~~~~^
        "GET",
        ^^^^^^
    ...<7 lines>...
        extensions=extensions,
        ^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_client.py", line 825, in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_client.py", line 914, in send
    response = self._send_handling_auth(
        request,
    ...<2 lines>...
        history=[],
    )
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_client.py", line 942, in _send_handling_auth
    response = self._send_handling_redirects(
        request,
        follow_redirects=follow_redirects,
        history=history,
    )
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
    response = self._send_single_request(request)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_client.py", line 1014, in _send_single_request
    response = transport.handle_request(request)
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_transports/default.py", line 249, in handle_request
    with map_httpcore_exceptions():
         ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadTimeout: The read operation timed out