helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: fix cache inheritance

# What does this PR do?
Paged attention was broken because it is not layered yet! Needs to be in the patch!

Changed files:
filename: src/transformers/generation/continuous_batching.py
patch: @@ -32,7 +32,6 @@
 from torch.profiler import profile, schedule, tensorboard_trace_handler
 from tqdm import tqdm
 
-from ..cache_utils import Cache
 from ..configuration_utils import PretrainedConfig
 from ..generation.configuration_utils import GenerationConfig
 from ..utils.metrics import ContinuousBatchProcessorMetrics, attach_tracer, traced
@@ -153,7 +152,7 @@ def to_generation_output(self):
 
 
 @attach_tracer()
-class PagedAttentionCache(Cache):
+class PagedAttentionCache:
     def __init__(
         self,
         config: PretrainedConfig,
Repository: denoland/deno
Pull request: ci: update release template


Changed files:
filename: tools/release/release_doc_template.md
patch: @@ -35,8 +35,7 @@ Release checklist: <LINK TO THIS FORKED GIST GOES HERE>
 - [ ] Go to the "version_bump" workflow in the CLI repo's actions:
       https://github.com/denoland/deno/actions/workflows/version_bump.yml
   1. Click on the "Run workflow" button.
-  1. In the drop down, select the minor branch (`v$MINOR_VERSION`) if doing a
-     patch release or the main branch if doing a minor release.
+  1. In the drop down, select the `main` branch.
   1. For the kind of release, select either `patch` or `minor`.
   1. Run the workflow.
Repository: denoland/deno
Pull request: ci: fix features for sys_traits in deno_npm_installer

See https://github.com/denoland/deno/actions/runs/15332901764/job/43143698992.

Changed files:
filename: Cargo.lock
patch: @@ -2131,7 +2131,7 @@ dependencies = [
 
 [[package]]
 name = "deno_lib"
-version = "2.4.0"
+version = "0.23.0"
 dependencies = [
  "capacity_builder",
  "deno_error",

filename: Cargo.toml
patch: @@ -112,7 +112,7 @@ denort_helper = { version = "0.4.0", path = "./ext/rt_helper" }
 # workspace libraries
 deno_bench_util = { version = "0.200.0", path = "./bench_util" }
 deno_features = { version = "0.3.0", path = "./runtime/features" }
-deno_lib = { version = "2.4.0", path = "./cli/lib" }
+deno_lib = { version = "0.23.0", path = "./cli/lib" }
 deno_npm_cache = { version = "0.25.0", path = "./resolvers/npm_cache" }
 deno_npm_installer = { version = "0.1.0", path = "./resolvers/npm_installer" }
 deno_permissions = { version = "0.65.0", path = "./runtime/permissions" }

filename: cli/lib/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "deno_lib"
-version = "2.4.0"
+version = "0.23.0"
 authors.workspace = true
 edition.workspace = true
 license.workspace = true

filename: resolvers/npm_installer/Cargo.toml
patch: @@ -41,7 +41,7 @@ pathdiff.workspace = true
 rustc-hash.workspace = true
 serde.workspace = true
 serde_json.workspace = true
-sys_traits.workspace = true
+sys_traits = { workspace = true, features = ["real"] }
 thiserror.workspace = true
 tokio.workspace = true
 tokio-util.workspace = true
Repository: denoland/deno
Pull request: ci: fix features for nix in permissions/Cargo.toml

See https://github.com/denoland/deno/actions/runs/15331356436/job/43139395190.

Changed files:
filename: runtime/permissions/Cargo.toml
patch: @@ -37,7 +37,7 @@ winapi = { workspace = true, features = ["commapi", "knownfolders", "mswsock", "
 windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem"] }
 
 [target.'cfg(unix)'.dependencies]
-nix = { workspace = true }
+nix = { workspace = true, features = ["fs"] }
 
 [dev-dependencies]
 sys_traits = { workspace = true, features = ["real"] }
Repository: nodejs/node
Pull request: report: use uv_getrusage_thread in report

use `uv_getrusage_thread` in report.

- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes
- [x] tests and/or benchmarks are included
- [x] documentation is changed or added
- [x] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)


Changed files:
filename: src/node_report.cc
patch: @@ -680,9 +680,9 @@ static void PrintResourceUsage(JSONWriter* writer) {
     writer->json_objectend();
   }
   writer->json_objectend();
-#ifdef RUSAGE_THREAD
-  struct rusage stats;
-  if (getrusage(RUSAGE_THREAD, &stats) == 0) {
+
+  uv_rusage_t stats;
+  if (uv_getrusage_thread(&stats) == 0) {
     writer->json_objectstart("uvthreadResourceUsage");
     double user_cpu =
         stats.ru_utime.tv_sec + SEC_PER_MICROS * stats.ru_utime.tv_usec;
@@ -703,7 +703,6 @@ static void PrintResourceUsage(JSONWriter* writer) {
     writer->json_objectend();
     writer->json_objectend();
   }
-#endif  // RUSAGE_THREAD
 }
 
 static void PrintEnvironmentVariables(JSONWriter* writer) {
Repository: ggml-org/llama.cpp
Pull request: ggml-cpu: Respect cpumask settings with OpenMP

It is useful to set CPU affinity on CPUs with heterogeneous cores to force using performance cores, in order to eliminate CPU stalling caused by speed mismatch between different types of cores.

In llama.cpp there are a series of options named "--cpu-mask", "--cpu-range", etc for this purpose. But these options seem to only affect (old?) ggml internal thread pool implementation but not when using OpenMP for threading, which is now enabled by default.

This pull request adds back support for related options when using OpenMP, thus making it easier to set CPU affinity using CLI arguments.

Side note: I also think we should make a better default CPU affinity assignment. Right now the related code seems to be a bit messy. We have two functions ``cpu_get_num_physical_cores()`` and ``cpu_get_num_math()`` for almost the same purpose whilst the latter only implemented in x86 Linux. Since we do not set affinity we are relying on the OS task scheduler to do the right thing. Unfortunately at least on my machine (13700k on win11) the OS persistently uses E cores without explicit affinity settings. So I do think we should do affinity settings by default, at least on heterogeneous CPUs. This PR can serve as a basis towards that goal by allowing manual settings at first.
 

Changed files:
filename: ggml/src/ggml-cpu/ggml-cpu.c
patch: @@ -473,10 +473,10 @@ struct ggml_threadpool {
 struct ggml_compute_state {
 #ifndef GGML_USE_OPENMP
     ggml_thread_t thrd;
-    bool cpumask[GGML_MAX_N_THREADS];
     int  last_graph;
     bool pending;
 #endif
+    bool cpumask[GGML_MAX_N_THREADS];
     struct ggml_threadpool * threadpool;
     int ith;
 };
@@ -3081,7 +3081,14 @@ static struct ggml_threadpool * ggml_threadpool_new_impl(
 
     threadpool->workers = workers;
 
-#ifndef GGML_USE_OPENMP
+#ifdef GGML_USE_OPENMP
+    int32_t cpumask_iter = 0;
+
+    // Compute CPU masks for each thread
+    for (int j = 0; j < tpp->n_threads; j++) {
+        ggml_thread_cpumask_next(tpp->cpumask, workers[j].cpumask, tpp->strict_cpu, &cpumask_iter);
+    }
+#else // GGML_USE_OPENMP
     ggml_mutex_init(&threadpool->mutex);
     ggml_cond_init(&threadpool->cond);
 
@@ -3154,7 +3161,14 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
                 atomic_store_explicit(&threadpool->n_threads_cur, n_threads, memory_order_relaxed);
             }
 
-            ggml_graph_compute_thread(&threadpool->workers[omp_get_thread_num()]);
+            // Apply thread CPU mask and priority
+            int ith = omp_get_thread_num();
+
+            ggml_thread_apply_priority(threadpool->prio);
+            if (ggml_thread_cpumask_is_valid(threadpool->workers[ith].cpumask)) {
+                ggml_thread_apply_affinity(threadpool->workers[ith].cpumask);
+            }
+            ggml_graph_compute_thread(&threadpool->workers[ith]);
         }
     } else {
         atomic_store_explicit(&threadpool->n_threads_cur, 1, memory_order_relaxed);
Repository: vercel/next.js
Pull request: fix: remove boundary sentinel from RSC responses

## Summary

This PR fixes an issue where the test mode boundary sentinel was being incorrectly added to RSC (React Server Component) responses. The sentinel should only be added to HTML responses during PPR (Partial Prerendering) test mode.

## Changes

- Added check to prevent boundary sentinel insertion when the response is an RSC content type
- Added check to prevent boundary sentinel insertion when the request is an RSC request
- Correctly set the response type to 'rsc' instead of 'html' for RSC requests

## Test plan

- [x] Existing tests should pass
- [x] RSC responses should not contain the test mode boundary sentinel
- [x] HTML responses in PPR test mode should still contain the boundary sentinel as expected

Changed files:
filename: packages/next/src/build/templates/app-page.ts
patch: @@ -32,6 +32,7 @@ import {
   NEXT_ROUTER_PREFETCH_HEADER,
   NEXT_IS_PRERENDER_HEADER,
   NEXT_DID_POSTPONE_HEADER,
+  RSC_CONTENT_TYPE_HEADER,
 } from '../../client/components/app-router-headers'
 import { getBotType, isBot } from '../../shared/lib/router/utils/is-bot'
 import {
@@ -1074,11 +1075,19 @@ export async function handler(
       // If there's no postponed state, we should just serve the HTML. This
       // should also be the case for a resume request because it's completed
       // as a server render (rather than a static render).
-      if (!didPostpone || minimalMode) {
+      if (!didPostpone || minimalMode || isRSCRequest) {
         // If we're in test mode, we should add a sentinel chunk to the response
         // that's between the static and dynamic parts so we can compare the
         // chunks and add assertions.
-        if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled) {
+        if (
+          process.env.__NEXT_TEST_MODE &&
+          minimalMode &&
+          isRoutePPREnabled &&
+          // If the response body is an RSC content type of the request was for
+          // an RSC request then we shouldn't add the sentinel.
+          body.contentType !== RSC_CONTENT_TYPE_HEADER &&
+          !isRSCRequest
+        ) {
           // As we're in minimal mode, the static part would have already been
           // streamed first. The only part that this streams is the dynamic part
           // so we should FIRST stream the sentinel and THEN the dynamic part.
@@ -1088,7 +1097,7 @@ export async function handler(
         return sendRenderResult({
           req,
           res,
-          type: 'html',
+          type: isRSCRequest ? 'rsc' : 'html',
           generateEtags: nextConfig.generateEtags,
           poweredByHeader: nextConfig.poweredByHeader,
           result: body,
Repository: denoland/deno
Pull request: fix(ext/console): console.group indents two spaces

Since `DEFAULT_INDENT` is already two spaces, incrementing `indentLevel` by 2 was causing each group to indent by **four** spaces. Indenting by two spaces matches the behavior Node and Bun.


Changed files:
filename: ext/console/01_console.js
patch: @@ -3401,14 +3401,14 @@ class Console {
     if (label.length > 0) {
       this.log(...new SafeArrayIterator(label));
     }
-    this.indentLevel += 2;
+    this.indentLevel++;
   };
 
   groupCollapsed = this.group;
 
   groupEnd = () => {
     if (this.indentLevel > 0) {
-      this.indentLevel -= 2;
+      this.indentLevel--;
     }
   };
 

filename: tests/unit/console_test.ts
patch: @@ -1513,9 +1513,9 @@ Deno.test(function consoleGroup() {
     assertEquals(
       out.toString(),
       `1
-    2
-    3
-        4
+  2
+  3
+    4
 5
 6
 `,
@@ -1542,9 +1542,9 @@ Deno.test(function consoleGroupWarn() {
     assertEquals(
       both.toString(),
       `1
-    2
-        3
-    4
+  2
+    3
+  4
 5
 6
 7
Repository: nodejs/node
Pull request: src: fix build when using shared simdutf

Not sure if that's the correct fix, but that seems to unblock me.
<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: src/node_i18n.cc
patch: @@ -174,7 +174,7 @@ MaybeLocal<Object> TranscodeLatin1ToUcs2(Environment* env,
                                          const char* source,
                                          const size_t source_length,
                                          UErrorCode* status) {
-  MaybeStackBuffer<UChar> destbuf(source_length);
+  MaybeStackBuffer<char16_t> destbuf(source_length);
   auto actual_length =
       simdutf::convert_latin1_to_utf16le(source, source_length, destbuf.out());
   if (actual_length == 0) {
@@ -218,7 +218,7 @@ MaybeLocal<Object> TranscodeUcs2FromUtf8(Environment* env,
                                          UErrorCode* status) {
   size_t expected_utf16_length =
       simdutf::utf16_length_from_utf8(source, source_length);
-  MaybeStackBuffer<UChar> destbuf(expected_utf16_length);
+  MaybeStackBuffer<char16_t> destbuf(expected_utf16_length);
   auto actual_length =
       simdutf::convert_utf8_to_utf16le(source, source_length, destbuf.out());
Repository: facebook/react
Pull request: Add ReactDOMClient to ServerIntegration tests (minor fixes)

## Overview 

Branched off https://github.com/facebook/react/pull/28130

Converts to `createRoot`, with a few additional in-line conversions in each file.


Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMServerIntegrationAttributes-test.js
patch: @@ -15,6 +15,7 @@ const ReactFeatureFlags = require('shared/ReactFeatureFlags');
 
 let React;
 let ReactDOM;
+let ReactDOMClient;
 let ReactTestUtils;
 let ReactDOMServer;
 
@@ -23,12 +24,13 @@ function initModules() {
   jest.resetModules();
   React = require('react');
   ReactDOM = require('react-dom');
+  ReactDOMClient = require('react-dom/client');
   ReactDOMServer = require('react-dom/server');
   ReactTestUtils = require('react-dom/test-utils');
 
   // Make them available to the helpers.
   return {
-    ReactDOM,
+    ReactDOMClient,
     ReactDOMServer,
     ReactTestUtils,
   };
@@ -638,7 +640,12 @@ describe('ReactDOMServerIntegration', () => {
         // DOM nodes on the client side. We force it to fire early
         // so that it gets deduplicated later, and doesn't fail the test.
         expect(() => {
-          ReactDOM.render(<nonstandard />, document.createElement('div'));
+          ReactDOM.flushSync(() => {
+            const root = ReactDOMClient.createRoot(
+              document.createElement('div'),
+            );
+            root.render(<nonstandard />);
+          });
         }).toErrorDev('The tag <nonstandard> is unrecognized in this browser.');
 
         const e = await render(<nonstandard foo="bar" />);

filename: packages/react-dom/src/__tests__/ReactDOMServerIntegrationUntrustedURL-test.js
patch: @@ -15,7 +15,6 @@
 const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');
 
 let React;
-let ReactDOM;
 let ReactDOMClient;
 let ReactDOMServer;
 let ReactTestUtils;
@@ -35,15 +34,14 @@ describe('ReactDOMServerIntegration - Untrusted URLs', () => {
   function initModules() {
     jest.resetModules();
     React = require('react');
-    ReactDOM = require('react-dom');
     ReactDOMClient = require('react-dom/client');
     ReactDOMServer = require('react-dom/server');
     ReactTestUtils = require('react-dom/test-utils');
     act = require('internal-test-utils').act;
 
     // Make them available to the helpers.
     return {
-      ReactDOM,
+      ReactDOMClient,
       ReactDOMServer,
       ReactTestUtils,
     };
@@ -204,15 +202,14 @@ describe('ReactDOMServerIntegration - Untrusted URLs - disableJavaScriptURLs', (
     ReactFeatureFlags.disableJavaScriptURLs = true;
 
     React = require('react');
-    ReactDOM = require('react-dom');
     ReactDOMClient = require('react-dom/client');
     ReactDOMServer = require('react-dom/server');
     ReactTestUtils = require('react-dom/test-utils');
     act = require('internal-test-utils').act;
 
     // Make them available to the helpers.
     return {
-      ReactDOM,
+      ReactDOMClient,
       ReactDOMServer,
       ReactTestUtils,
     };
Repository: ggml-org/llama.cpp
Pull request: ggml : fix uninitialized is_on_grid in quantize_row_iq3_xxs_impl

See https://github.com/ggml-org/llama.cpp/actions/runs/17615331967/job/50046823487#step:5:87

Changed files:
filename: ggml/src/ggml-quants.c
patch: @@ -3721,6 +3721,7 @@ static void quantize_row_iq3_xxs_impl(int grid_size, const float * GGML_RESTRICT
             }
             float best = 0;
             float scale = max/(2*kMaxQ-1);
+            for (int k = 0; k < 8; ++k) is_on_grid[k] = true;
             for (int is = -15; is <= 15; ++is) {
                 float id = (2*kMaxQ-1+is*0.2f)/max;
                 float this_scale = 1/id;
Repository: facebook/react
Pull request: Add ReactDOMClient to ServerIntegrationSelect

## Overview

Branched off https://github.com/facebook/react/pull/28130

## React for count changing
### Before
These tests are weird because on main they pass, but log to the console:

```
We expected 2 warning(s), but saw 1 warning(s).
We saw these warnings:
    Warning: Expected server HTML to contain a matching <select> in <div>.
        at select
```

The other one is ignored. The `expect(console.errors).toBeCalledWith(2)` doesn't account for ignored calls, so the test passes with the two expected (the +1 is in the test utiles). The ignored warning is

```
Warning: ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. 
```

So the mismatch is in the ignored warnings. 

### After

After switching to `createRoot`, it still logs:

```
We expected 2 warning(s), but saw 1 warning(s).
We saw these warnings:
    Warning: Expected server HTML to contain a matching <select> in <div>.
        at select
```

But the test fails due to an unexpected error count. The new ignored errors are:

```
Error: Uncaught [Error: Hydration failed because the initial UI does not match what was rendered on the server.]
Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.
Error: Hydration failed because the initial UI does not match what was rendered on the server.
Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.
```

These seem to be the correct warnings to fire in `createRoot`, so the fix is to update the number of warnings we expect.



Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMServerIntegrationSelect-test.js
patch: @@ -13,21 +13,21 @@
 const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');
 
 let React;
-let ReactDOM;
+let ReactDOMClient;
 let ReactDOMServer;
 let ReactTestUtils;
 
 function initModules() {
   // Reset warning cache.
   jest.resetModules();
   React = require('react');
-  ReactDOM = require('react-dom');
+  ReactDOMClient = require('react-dom/client');
   ReactDOMServer = require('react-dom/server');
   ReactTestUtils = require('react-dom/test-utils');
 
   // Make them available to the helpers.
   return {
-    ReactDOM,
+    ReactDOMClient,
     ReactDOMServer,
     ReactTestUtils,
   };
@@ -253,7 +253,7 @@ describe('ReactDOMServerIntegrationSelect', () => {
           <option value="first">First</option>
           <option value="true">True</option>
         </select>,
-        1,
+        2,
       );
       expect(e.firstChild.selected).toBe(false);
       expect(e.lastChild.selected).toBe(true);
@@ -268,7 +268,7 @@ describe('ReactDOMServerIntegrationSelect', () => {
           <option value="first">First</option>
           <option value="undefined">Undefined</option>
         </select>,
-        1,
+        2,
       );
       expect(e.firstChild.selected).toBe(true);
       expect(e.lastChild.selected).toBe(false);
Repository: huggingface/transformers
Pull request: skip `Glm4MoeModelTest::test_torch_compile_for_training`

# What does this PR do?

We have line

> token_indices, weight_indices = torch.where(mask)


which won't work with this test.

It's skipped also in dots1 and deepseek 


Changed files:
filename: tests/models/glm4_moe/test_modeling_glm4_moe.py
patch: @@ -79,8 +79,8 @@ class Glm4MoeModelTest(CausalLMModelTest, unittest.TestCase):
     test_pruning = False
     fx_compatible = False
     model_tester_class = Glm4MoeModelTester
-    # used in `test_torch_compile_for_training`
-    _torch_compile_train_cls = Glm4MoeForCausalLM if is_torch_available() else None
+    # used in `test_torch_compile_for_training`. Skip as "Dynamic control flow in MoE"
+    _torch_compile_train_cls = None
 
 
 @require_torch_accelerator

filename: tests/test_modeling_common.py
patch: @@ -4476,7 +4476,7 @@ def test_torch_compile_for_training(self):
         if version.parse(torch.__version__) < version.parse("2.3"):
             self.skipTest(reason="This test requires torch >= 2.3 to run.")
 
-        if not hasattr(self, "_torch_compile_train_cls"):
+        if getattr(self, "_torch_compile_train_cls", None) is None:
             self.skipTest(f"{self.__class__.__name__} doesn't have the attribute `_torch_compile_train_cls`.")
 
         config, _ = self.model_tester.prepare_config_and_inputs_for_common()