Selected changesmerged Nov 3, 2026
Keep overrides of the deprecated gradient checkpointing methods workingPython · 36 + / 2 −
Introduces 3 new declarations in src/transformers/modeling_utils.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/transformers/modeling_utils.py ↗ · 2 files
@@ -3129,6 +3129,19 @@ def activation_checkpointing_enable( activation_checkpointing_kwargs (dict, *optional*): Additional keyword arguments passed along to the `torch.utils.checkpoint.checkpoint` function. """+ # Subclasses and wrappers of the deprecated `gradient_checkpointing_enable` stay the entry point until v6+ if self._is_overridden("gradient_checkpointing_enable"):+ self.gradient_checkpointing_enable(+ gradient_checkpointing_kwargs=activation_checkpointing_kwargs,+ every_n_layers=every_n_layers,+ offload=offload,+ )+ else:+ self._activation_checkpointing_enable(activation_checkpointing_kwargs, every_n_layers, offload)++ def _activation_checkpointing_enable(+ self, activation_checkpointing_kwargs=None, every_n_layers: int = 1, offload: bool = False+ ): if not self.supports_gradient_checkpointing: raise ValueError(f"{self.__class__.__name__} does not support activation checkpointing.")
Implement `Duration::display_seconds`Rust · 246 + / 163 −
Introduces 8 new declarations in library/core/src/time.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
library/core/src/time.rs ↗ · 3 files
@@ -1469,184 +1521,183 @@ impl<'a> Sum<&'a Duration> for Duration { } } -#[stable(feature = "duration_debug_impl", since = "1.27.0")]-impl fmt::Debug for Duration {- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {- /// Formats a floating point number in decimal notation.- ///- /// The number is given as the `integer_part` and a fractional part.- /// The value of the fractional part is `fractional_part / divisor`. So- /// `integer_part` = 3, `fractional_part` = 12 and `divisor` = 100- /// represents the number `3.012`. Trailing zeros are omitted.- ///- /// `divisor` must not be above 100_000_000. It also should be a power- /// of 10, everything else doesn't make sense. `fractional_part` has- /// to be less than `10 * divisor`!- ///- /// A prefix and postfix may be added. The whole thing is padded- /// to the formatter's `width`, if specified.- fn fmt_decimal(- f: &mut fmt::Formatter<'_>,- integer_part: u64,- mut fractional_part: u32,- mut divisor: u32,- prefix: &str,- postfix: &str,- ) -> fmt::Result {- // Encode the fractional part into a temporary buffer. The buffer- // only need to hold 9 elements, because `fractional_part` has to- // be smaller than 10^9. The buffer is prefilled with '0' digits- // to simplify the code below.- let mut buf = [b'0'; 9];-
turbopack-node: linear IPC frame parsing with eager UTF-8 decodingTypeScript · 191 + / 73 −
Introduces 5 new declarations in turbopack/crates/turbopack-node/js/src/child_process/packet-reader.ts.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
turbopack/crates/turbopack-node/js/src/child_process/packet-reader.ts ↗ · 3 files
@@ -0,0 +1,186 @@+import { TextDecoder } from 'node:util'++type State =+ | {+ type: 'waiting'+ }+ | {+ type: 'packet'+ length: number+ }++/**+ * Decodes length-prefixed packets (a u32 big-endian byte length followed by a+ * UTF-8 JSON payload) from a stream of chunks, and hands the decoded messages+ * to `recv()` callers in order.+ */+export class PacketReader<TIncoming> {+ private state: State = { type: 'waiting' }+ // Received chunks that have not been consumed yet. We keep them as a list+ // (instead of concatenating on every chunk) so that a packet that arrives in+ // many chunks can be decoded straight from them.+ private readonly chunks: Buffer[] = []+ private bufferedLength = 0+ // Decoded packets that no `recv()` call has consumed yet. Packets are+ // decoded as soon as they are complete so that queued packets don't retain+ // the received chunks (which may be views into larger Buffers).+ private readonly packetQueue: string[] = []+ // `recv()` calls waiting for the next packet.+ private readonly recvPromiseResolveQueue: Array<+ (message: TIncoming) => void+ > = []++ /**
model : Add support for Metis-1.6 modelsC++ · 641 + / 2 −
Introduces 38 new declarations in src/models/metis16.cpp.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
src/models/metis16.cpp ↗ · 20 files
@@ -0,0 +1,401 @@+#include "models.h"++#include <cmath>++void llama_model_metis16::load_arch_hparams(llama_model_loader & ml) {+ ml.get_key(LLM_KV_SSM_CONV_KERNEL, hparams.ssm_d_conv);+ ml.get_key(LLM_KV_SSM_INNER_SIZE, hparams.ssm_d_inner);+ ml.get_key(LLM_KV_SSM_STATE_SIZE, hparams.ssm_d_state);+ ml.get_key(LLM_KV_SSM_TIME_STEP_RANK, hparams.ssm_dt_rank);+ ml.get_key(LLM_KV_SSM_GROUP_COUNT, hparams.ssm_n_group);+ ml.get_key(LLM_KV_SSM_NORM_EPS, hparams.ssm_norm_eps);++ ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps);++ ml.get_key_or_arr(LLM_KV_EXPERT_FEED_FORWARD_LENGTH, hparams.n_ff_exp_arr, hparams.n_layer_all);+ ml.get_key(LLM_KV_EXPERT_SHARED_FEED_FORWARD_LENGTH, hparams.n_ff_shexp);+ ml.get_key(LLM_KV_MOE_LATENT_SIZE, hparams.moe_latent_size);++ ml.get_key(LLM_KV_HYPER_CONNECTION_COUNT, hparams.dsv4_hc_mult);+ ml.get_key(LLM_KV_METIS_PASS_COUNT, hparams.metis_n_pass);+ ml.get_key(LLM_KV_METIS_MEMORY_LENGTH, hparams.metis_n_mem);+ ml.get_key(LLM_KV_METIS_ROUTE_LENGTH, hparams.metis_n_route);+ ml.get_key(LLM_KV_ATTENTION_PASS_LORA_RANK, hparams.metis_pass_lora_rank);+ ml.get_key(LLM_KV_METIS_CONTINUATION_LOGIT_LIMIT, hparams.metis_cont_limit);++ n_pass = hparams.metis_n_pass;+ n_stream = hparams.dsv4_hc_mult;+ n_mem = hparams.metis_n_mem;+ n_route = hparams.metis_n_route;+ cont_limit = hparams.metis_cont_limit;++ if (n_pass < 1 || hparams.n_layer() % n_pass != 0) {+ throw std::runtime_error(format("metis16: %u layers do not split into %u passes", hparams.n_layer(), n_pass));
kubectl: close files written by cluster-info dumpGo · 25 + / 12 −
Introduces 2 new declarations in staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go.
Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.
staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go ↗ · 2 files
@@ -216,47 +228,47 @@ func (o *ClusterInfoDumpOptions) Run() error { if err != nil { return err }- if err := o.PrintObj(events, setupOutputWriter(o.OutputDir, o.Out, path.Join(namespace, "events"), fileExtension)); err != nil {+ if err := o.printObj(events, path.Join(namespace, "events"), fileExtension); err != nil { return err } rcs, err := o.CoreClient.ReplicationControllers(namespace).List(context.TODO(), metav1.ListOptions{}) if err != nil { return err }- if err := o.PrintObj(rcs, setupOutputWriter(o.OutputDir, o.Out, path.Join(namespace, "replication-controllers"), fileExtension)); err != nil {+ if err := o.printObj(rcs, path.Join(namespace, "replication-controllers"), fileExtension); err != nil { return err } svcs, err := o.CoreClient.Services(namespace).List(context.TODO(), metav1.ListOptions{}) if err != nil { return err }- if err := o.PrintObj(svcs, setupOutputWriter(o.OutputDir, o.Out, path.Join(namespace, "services"), fileExtension)); err != nil {+ if err := o.printObj(svcs, path.Join(namespace, "services"), fileExtension); err != nil { return err } sets, err := o.AppsClient.DaemonSets(namespace).List(context.TODO(), metav1.ListOptions{}) if err != nil { return err }- if err := o.PrintObj(sets, setupOutputWriter(o.OutputDir, o.Out, path.Join(namespace, "daemonsets"), fileExtension)); err != nil {+ if err := o.printObj(sets, path.Join(namespace, "daemonsets"), fileExtension); err != nil { return err