PCTEJA
PCTEJA
## Description For OpenAI-style traffic the cache write count is inferred: `cache_write_tokens` is the same tokens as `uncached_input_tokens`, not an additional bucket. `CostTracker.record_tokens` knows this and zeroes inferred writes (`write_eff...
## Description `CostTracker.stats()` and `CostTracker.totals()` in `headroom/proxy/cost.py` recompute input cost from the per-model aggregates and always call `_get_cache_prices(model)` with the default `long_context=False`. The aggregates keep no per-tier split for sent/cache...
## Description `CostTracker.stats()` and `CostTracker.totals()` in `headroom/proxy/cost.py` recompute input cost from the per-model aggregates. Once any request for a model supplied an API usage breakdown, the recompute prices only the...
## Description `restore_frozen_prefix` in `headroom/cache/prefix_tracker.py` forces the frozen prefix of the transformed messages back to the client's originals in cache mode. It handles a transform dropping prefix messages only when...
Found on main (439bba079891ecd766900e8ce80ee961b94ef132, 5.24.0.dev0), in `src/transformers/image_utils.py:1025-1031`: ```python def validate_kwargs(valid_processor_keys: list[str], captured_kwargs: list[str]): unused_keys = set(captured_kwargs).difference(set(valid_processor_keys)) if unused_keys: unused_key_str = ", ".join(unused_keys) # TODO raise a warning here instead of...
Found on main (439bba079891ecd766900e8ce80ee961b94ef132, 5.24.0.dev0), in `src/transformers/generation/configuration_utils.py`. The code promises removals that never happened, and the arguments are still live — not just parsed and ignored. For example `dola_layers` still...
Found on main (439bba079891ecd766900e8ce80ee961b94ef132, 5.24.0.dev0), in `src/transformers/pipelines/base.py:249-277`. When `pipeline()` is given a dtype, it tries `model_class.from_pretrained(model, **kwargs)`, and on `OSError / ValueError / TypeError / RuntimeError` it retries with `dtype=torch.float32`....
Found on main (439bba079891ecd766900e8ce80ee961b94ef132, 5.24.0.dev0), in `src/transformers/tokenization_utils_base.py:1717-1722`: ```python remote_files = [] if not is_local and not local_files_only: try: remote_files = hf_api().list_repo_files(pretrained_model_name_or_path, revision=revision) except Exception: remote_files = [] ``` A bare...
Found on main (439bba079891ecd766900e8ce80ee961b94ef132, 5.24.0.dev0), in `src/transformers/generation/continuous_batching/offloading_manager.py`. In `restore_scheduled_requests`, the ordering is: 1. lines 257-267: pop the bookkeeping entry (`self._request_id_to_cpu_blocks.pop(...)`), free the CPU blocks (they can now be handed to...
Found on main (439bba079891ecd766900e8ce80ee961b94ef132, 5.24.0.dev0). Several conversion scripts download a checkpoint from the Hub and then unpickle it with a plain `torch.load()`, with no `weights_only=True` and no `check_torch_load_is_safe()`: - `src/transformers/models/d_fine/convert_d_fine_original_pytorch_checkpoint_to_hf.py:159`...