Tags: run-ai/runai-model-streamer
Tags
Fix: skip empty files in next_request instead of terminating the stre… …am (#158) FilesRequestsIterator.next_request treated any empty next_chunks() result as the end of the current request; when that produced an empty request, iteration ended and every remaining queued file was silently dropped. A safetensors shard with zero tensors at the head of a fresh request therefore caused all subsequent shards to never be read. Distinguish the two cases: a finished file with no data is skipped (continue), while an unfinished file whose next chunk exceeds the remaining buffer budget still closes the request (break), preserving the existing memory-cap semantics. Fixes #157
Share Azure default credentials across clients (#134) Before this change, a new AzureDefaultCredential was created with every new AzureClient. This becomes problematic for distributed loading scenarios where you can have N processes x M worker threads per process each with their own credential instance. Specifically, this can lead to overwhelming IMDS when when all of these clients attempt to retrieve a token, resulting fataling throttling errors during model loading. AzureDefaultCredentials are thread safe and are meant to be used across threads. By statically creating a single AzureDefaultCredential per process for AzureClients to share, the credential instance will automatically guard against swarming IMDS per instance so you only end up with N concurrent IMDS token calls and greatly reduce the chance of being throttled by IMDS. It was also considered to share Blob Service clients as well across threads since they are thread safe as well. It was decided against as it would have required a larger change to be able to handle differences in client options. It may be a change we should consider in the future though to even further improve resource sharing (e.g. reusing HTTP connection pools)
PreviousNext