helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Fix casting dtype for qunatization

# What does this PR do?

This PR fixes an issue with quantized models as we changed recently how to cast the dtype of each parameters. We rely now on the model architecture and we check the dtype associated to each param. However, this won't work for model that we are going to quantize (quantization on the fly) as the architecture changed.
This impacts eetq quantization and maybe some fp8 methods also


Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -732,6 +732,8 @@ def _infer_parameter_dtype(
         if keep_in_fp32_modules is not None and keep_in_fp32_modules.search(param_name):
             casting_dtype = torch.float32
         # Then dtype that was instantiated in the meta model -- note that this respects subconfigs dtypes
+        elif hf_quantizer is not None:
+            casting_dtype = model.config._pre_quantization_dtype
         else:
             casting_dtype = old_param.dtype
     return old_param is not None and old_param.is_contiguous(), casting_dtype
@@ -754,7 +756,6 @@ def _load_state_dict_into_meta_model(
     keep_in_fp32_modules: Optional[List[str]] = None,
     unexpected_keys: Optional[List[str]] = None,  # passing `unexpected` for cleanup from quantization items
     device_mesh: Optional[torch.distributed.device_mesh.DeviceMesh] = None,
-    weights_only=True,
 ) -> Tuple[Optional[Dict], Optional[Dict]]:
     """Load parameters from `meta_state_dict` into the model. The parameters of the `meta_state_dict` are on the meta
     device in order to easily infer the shapes and dtypes that they will have. Then proper parameters are then loaded
@@ -4883,7 +4884,6 @@ def _load_pretrained_model(
                         keep_in_fp32_modules=keep_in_fp32_modules,
                         unexpected_keys=unexpected_keys,
                         device_mesh=device_mesh,
-                        weights_only=weights_only,
                     )
             else:
                 assign_params = check_support_param_buffer_assignment(model_to_load, state_dict)
Repository: nodejs/node
Pull request: doc: remove mention of ECDH-ES in crypto.diffieHellman

EC, X448 and X25519 are all ECDH, `ECDH-ES` in here might have been a reference to the JWA algorithm identifier 🤷 

Changed files:
filename: doc/api/crypto.md
patch: @@ -3563,7 +3563,7 @@ added:
 
 Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
 Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`
-(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
+(for Diffie-Hellman), `'ec'`, `'x448'`, or `'x25519'` (for ECDH).
 
 ### `crypto.hash(algorithm, data[, outputEncoding])`
Repository: facebook/react
Pull request: [Flight] Use assets API + writeToDisk instead of directly writing to disk

The writeToDisk config exists to emit a webpack-dev-server asset to disk so that the server can pick it up.


Changed files:
filename: fixtures/flight/config/webpackDevServer.config.js
patch: @@ -90,6 +90,9 @@ module.exports = function(proxy, allowedHost) {
     watchOptions: {
       ignored: ignoredFiles(paths.appSrc),
     },
+    writeToDisk: filePath => {
+      return /react-client-manifest\.json$/.test(filePath);
+    },
     https: getHttpsConfig(),
     host,
     overlay: false,

filename: fixtures/flight/server/handler.server.js
patch: @@ -10,7 +10,7 @@ module.exports = function(req, res) {
   import('../src/App.server.js').then(m => {
     const dist = process.env.NODE_ENV === 'development' ? 'dist' : 'build';
     readFile(
-      resolve(__dirname, `../${dist}/react-transport-manifest.json`),
+      resolve(__dirname, `../${dist}/react-client-manifest.json`),
       'utf8',
       (err, data) => {
         if (err) {

filename: packages/react-transport-dom-webpack/src/ReactFlightWebpackPlugin.js
patch: @@ -7,8 +7,7 @@
  * @flow
  */
 
-import {mkdirSync, writeFileSync} from 'fs';
-import {dirname, resolve, join} from 'path';
+import {join} from 'path';
 import {pathToFileURL} from 'url';
 
 import asyncLib from 'neo-async';
@@ -48,13 +47,16 @@ type Options = {
   isServer: boolean,
   clientReferences?: ClientReferencePath | $ReadOnlyArray<ClientReferencePath>,
   chunkName?: string,
+  manifestFilename?: string,
 };
 
 const PLUGIN_NAME = 'React Transport Plugin';
 
 export default class ReactFlightWebpackPlugin {
   clientReferences: $ReadOnlyArray<ClientReferencePath>;
   chunkName: string;
+  manifestFilename: string;
+
   constructor(options: Options) {
     if (!options || typeof options.isServer !== 'boolean') {
       throw new Error(
@@ -88,6 +90,8 @@ export default class ReactFlightWebpackPlugin {
     } else {
       this.chunkName = 'client[index]';
     }
+    this.manifestFilename =
+      options.manifestFilename || 'react-client-manifest.json';
   }
 
   apply(compiler: any) {
@@ -189,13 +193,14 @@ export default class ReactFlightWebpackPlugin {
         });
       });
       const output = JSON.stringify(json, null, 2);
-      const filename = resolve(
-        compiler.options.output.path,
-        'react-transport-manifest.json',
-      );
-      mkdirSync(dirname(filename), {recursive: true});
-      // TODO: Use webpack's emit API and read from the devserver.
-      writeFileSync(filename, output);
+      compilation.assets[this.manifestFilename] = {
+        source() {
+          return output;
+        },
+        size() {
+          return output.length;
+        },
+      };
     });
   }
Repository: facebook/react
Pull request: Fix failing test

Our CI is red because https://github.com/facebook/react/pull/21694 and https://github.com/facebook/react/pull/21686 were not compatible. Luckily, the fix is simple: it's to use our internal version of `act` that works in production tests. This also solves https://github.com/facebook/react/pull/21694#issuecomment-862583669 which is only the issue with the public `act`.

Changed files:
filename: packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js
patch: @@ -695,28 +695,19 @@ describe('ReactSuspense', () => {
     expect(Scheduler).toFlushAndYield(['Child 1', 'create layout']);
     expect(root).toMatchRenderedOutput('Child 1');
 
-    ReactTestRenderer.act(() => {
+    act(() => {
       _setShow(true);
     });
-    expect(Scheduler).toHaveYielded(
-      // DEV behavior differs from prod
-      // In DEV sometimes the work loop sync-flushes the commit
-      // where as in production, it schedules it behind a timeout.
-      // See shouldForceFlushFallbacksInDEV() usage
-      __DEV__
-        ? ['Child 1', 'Suspend! [Child 2]', 'Loading...', 'destroy layout']
-        : ['Child 1', 'Suspend! [Child 2]', 'Loading...'],
-    );
+    expect(Scheduler).toHaveYielded([
+      'Child 1',
+      'Suspend! [Child 2]',
+      'Loading...',
+    ]);
     jest.advanceTimersByTime(1000);
-    expect(Scheduler).toHaveYielded(
-      // DEV behavior differs from prod
-      // In DEV sometimes the work loop sync-flushes the commit
-      // where as in production, it schedules it behind a timeout.
-      // See shouldForceFlushFallbacksInDEV() usage
-      __DEV__
-        ? ['Promise resolved [Child 2]']
-        : ['destroy layout', 'Promise resolved [Child 2]'],
-    );
+    expect(Scheduler).toHaveYielded([
+      'destroy layout',
+      'Promise resolved [Child 2]',
+    ]);
     expect(Scheduler).toFlushAndYield(['Child 1', 'Child 2', 'create layout']);
     expect(root).toMatchRenderedOutput(['Child 1', 'Child 2'].join(''));
   });
Repository: ggml-org/llama.cpp
Pull request: server: fix "--grammar-file" parameter

`llama-server` treats an empty string as grammar and doesn't use the default grammar provided with `--grammar-file` on the command line ( see [server.cpp](https://github.com/ggml-org/llama.cpp/blob/master/examples/server/server.cpp#L342) ). This PR fixes `--grammar-file` parameter in `llama-server` by accepting only non-empty strings.

Changed files:
filename: examples/server/utils.hpp
patch: @@ -621,7 +621,9 @@ static json oaicompat_completion_params_parse(
 
     llama_params["chat_format"]      = static_cast<int>(chat_params.format);
     llama_params["prompt"]           = chat_params.prompt;
-    llama_params["grammar"]          = chat_params.grammar;
+    if (!chat_params.grammar.empty()) {
+        llama_params["grammar"] = chat_params.grammar;
+    }
     llama_params["grammar_lazy"]     = chat_params.grammar_lazy;
     auto grammar_triggers = json::array();
     for (const auto & trigger : chat_params.grammar_triggers) {
Repository: nodejs/node
Pull request: doc: add a note on console stream behavior

Many user reported issues show poor awareness of the nature of console streams. explicitly document that.

<!--
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: doc/api/console.md
patch: @@ -19,7 +19,11 @@ The module exports two specific components:
 
 _**Warning**_: The global console object's methods are neither consistently
 synchronous like the browser APIs they resemble, nor are they consistently
-asynchronous like all other Node.js streams. See the [note on process I/O][] for
+asynchronous like all other Node.js streams. Programs that desire to depend
+on the synchronous / asynchronous behavior of the console functions should
+first figure out the nature of console's backing stream. This is because the
+stream is dependent on the underlying platform and standard stream
+configuration of the current process. See the [note on process I/O][] for
 more information.
 
 Example using the global `console`:
Repository: denoland/deno
Pull request: fix(ext/node): support delete process.env.var

Closes https://github.com/denoland/deno/issues/23641

Changed files:
filename: ext/node/polyfills/_process/process.ts
patch: @@ -88,6 +88,10 @@ export const env: InstanceType<ObjectConstructor> & Record<string, string> =
       return true; // success
     },
     has: (_target, prop) => typeof denoEnvGet(String(prop)) === "string",
+    deleteProperty(_target, key) {
+      Deno.env.delete(String(key));
+      return true;
+    },
   });
 
 /**

filename: tests/unit_node/process_test.ts
patch: @@ -416,6 +416,9 @@ Deno.test({
     assertEquals(process.env.HELLO, "false");
     process.env.HELLO = "WORLD";
     assertEquals(process.env.HELLO, "WORLD");
+
+    delete process.env.HELLO;
+    assertEquals(process.env.HELLO, undefined);
   },
 });
Repository: denoland/deno
Pull request: ci: use -A for wpt script

Fixes CI. The wpt setup script writes to `/etc/hosts` which now needs `--allow-all`. We use the latest release for the deno binary there so it's only impacted as of the 1.43.0 release.

Changed files:
filename: .github/workflows/ci.generate.ts
patch: @@ -881,14 +881,10 @@ const ci = {
             DENO_BIN: "./target/release/deno",
           },
           run: [
-            "deno run --allow-env --allow-net --allow-read --allow-run \\",
-            "         --allow-write --unstable                         \\",
-            "         --lock=tools/deno.lock.json                      \\",
+            "deno run -A --unstable --lock=tools/deno.lock.json        \\",
             "         ./tests/wpt/wpt.ts setup",
-            "deno run --allow-env --allow-net --allow-read --allow-run \\",
-            "         --allow-write --unstable                         \\",
-            "         --lock=tools/deno.lock.json                      \\",
-            "         ./tests/wpt/wpt.ts run --quiet --release             \\",
+            "deno run -A --unstable --lock=tools/deno.lock.json        \\",
+            "         ./tests/wpt/wpt.ts run --quiet --release         \\",
             '                            --binary="$DENO_BIN"          \\',
             "                            --json=wpt.json               \\",
             "                            --wptreport=wptreport.json",

filename: .github/workflows/ci.yml
patch: @@ -538,14 +538,10 @@ jobs:
         env:
           DENO_BIN: ./target/release/deno
         run: |-
-          deno run --allow-env --allow-net --allow-read --allow-run \
-                   --allow-write --unstable                         \
-                   --lock=tools/deno.lock.json                      \
+          deno run -A --unstable --lock=tools/deno.lock.json        \
                    ./tests/wpt/wpt.ts setup
-          deno run --allow-env --allow-net --allow-read --allow-run \
-                   --allow-write --unstable                         \
-                   --lock=tools/deno.lock.json                      \
-                   ./tests/wpt/wpt.ts run --quiet --release             \
+          deno run -A --unstable --lock=tools/deno.lock.json        \
+                   ./tests/wpt/wpt.ts run --quiet --release         \
                                       --binary="$DENO_BIN"          \
                                       --json=wpt.json               \
                                       --wptreport=wptreport.json
Repository: huggingface/transformers
Pull request: Update SHA for `tj-actions/changed-files`

# What does this PR do?

Update sha for `tj-actions/changed-files`

Changed files:
filename: .github/workflows/push-important-models.yml
patch: @@ -27,7 +27,7 @@ jobs:
 
       - name: Get changed files
         id: changed-files
-        uses: tj-actions/changed-files@3f54ebb830831fc121d3263c1857cfbdc310cdb9 #v42
+        uses: tj-actions/changed-files@1c8e6069583811afb28f97afeaf8e7da80c6be5c
         with:
           files: src/transformers/models/**
 

filename: .github/workflows/self-push-caller.yml
patch: @@ -25,7 +25,7 @@ jobs:
         
         - name: Get changed files
           id: changed-files
-          uses: tj-actions/changed-files@3f54ebb830831fc121d3263c1857cfbdc310cdb9 #v42
+          uses: tj-actions/changed-files@1c8e6069583811afb28f97afeaf8e7da80c6be5c
         
         - name: Was setup changed 
           id: was_changed
Repository: denoland/deno
Pull request: fix(publish): handle variable declarations with a declare keyword

* https://github.com/denoland/deno_graph/pull/463

Closes #23613

Changed files:
filename: Cargo.lock
patch: @@ -1477,9 +1477,9 @@ dependencies = [
 
 [[package]]
 name = "deno_graph"
-version = "0.74.2"
+version = "0.74.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d828c95097ea836267c058ac912b5bd9e5c95cec11f57a32b25ac9e4bbe698fc"
+checksum = "330a02cf6b5fe78f8b7a4256dc6289d8d45fd2ec8ef7b1b2e8b4ffe1fff8284a"
 dependencies = [
  "anyhow",
  "async-trait",

filename: cli/Cargo.toml
patch: @@ -69,7 +69,7 @@ deno_config = "=0.16.3"
 deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
 deno_doc = { version = "=0.128.1", features = ["html", "syntect"] }
 deno_emit = "=0.40.2"
-deno_graph = { version = "=0.74.2", features = ["tokio_executor"] }
+deno_graph = { version = "=0.74.3", features = ["tokio_executor"] }
 deno_lint = { version = "=0.58.4", features = ["docs"] }
 deno_lockfile.workspace = true
 deno_npm = "=0.18.0"
Repository: facebook/react
Pull request: [SSR2 Fixture] Update APIs

- `react-dom/unstable-fizz` -> `react-dom/server` https://github.com/facebook/react/pull/21684
- `createRoot` -> `hydrateRoot` https://github.com/facebook/react/pull/21687

Changed files:
filename: fixtures/ssr2/package.json
patch: @@ -15,8 +15,8 @@
     "concurrently": "^5.3.0",
     "express": "^4.17.1",
     "nodemon": "^2.0.6",
-    "react": "0.0.0-cc4d24ab0",
-    "react-dom": "0.0.0-cc4d24ab0",
+    "react": "18.0.0-alpha-7ec4c5597",
+    "react-dom": "18.0.0-alpha-7ec4c5597",
     "react-error-boundary": "^3.1.3",
     "resolve": "1.12.0",
     "rimraf": "^3.0.2",

filename: fixtures/ssr2/server/render.js
patch: @@ -8,7 +8,7 @@
 
 import * as React from 'react';
 // import {renderToString} from 'react-dom/server';
-import {pipeToNodeWritable} from 'react-dom/unstable-fizz';
+import {pipeToNodeWritable} from 'react-dom/server';
 import App from '../src/App';
 import {DataProvider} from '../src/data';
 import {API_DELAY, ABORT_DELAY} from './delays';

filename: fixtures/ssr2/src/index.js
patch: @@ -6,8 +6,7 @@
  *
  */
 
-import {createRoot} from 'react-dom';
+import {hydrateRoot} from 'react-dom';
 import App from './App';
 
-const root = createRoot(document, {hydrate: true});
-root.render(<App assets={window.assetManifest} />);
+const root = hydrateRoot(document, <App assets={window.assetManifest} />);
Repository: nodejs/node
Pull request: meta: show PR/issue title on review-wanted

Ref: https://openjs-foundation.slack.com/archives/C019Y2T6STH/p1730308054959239?thread_ts=1730296053.898089&cid=C019Y2T6STH

There is already a message stating that the PR/issue needs reviews, the title should (IMO) correspond to the issue/PR.

Changed files:
filename: .github/workflows/notify-on-review-wanted.yml
patch: @@ -16,17 +16,20 @@ jobs:
     steps:
       - name: Determine PR or Issue
         id: define-message
+        env:
+          TITLE_ISSUE: ${{ github.event.issue.title }}
+          TITLE_PR: ${{ github.event.pull_request.title }}
         run: |
           if [[ -n "${{ github.event.pull_request.number }}" ]]; then
             number="${{ github.event.pull_request.number }}"
             link="https://github.com/${{ github.repository }}/pull/$number"
             echo "message=The PR (#$number) requires review from Node.js maintainers. See: $link" >> "$GITHUB_OUTPUT"
-            echo "title=${{ github.actor }} asks for attention on pull request #$number" >> "$GITHUB_OUTPUT"
+            echo "title=$TITLE_PR" >> "$GITHUB_OUTPUT"
           else
             number="${{ github.event.issue.number }}"
             link="https://github.com/${{ github.repository }}/issues/$number"
             echo "message=The issue (#$number) requires review from Node.js maintainers. See: $link" >> "$GITHUB_OUTPUT"
-            echo "title=${{ github.actor }} asks for attention on issue #$number" >> "$GITHUB_OUTPUT"
+            echo "title=$TITLE_ISSUE" >> "$GITHUB_OUTPUT"
           fi
 
       - name: Slack Notification
Repository: denoland/deno
Pull request: fix(ext/node): support multiple message listeners on MessagePort



Closes https://github.com/denoland/deno/issues/23561

Changed files:
filename: ext/node/polyfills/worker_threads.ts
patch: @@ -484,9 +484,17 @@ function webMessagePortToNodeMessagePort(port: MessagePort) {
     // deno-lint-ignore no-explicit-any
     const _listener = (ev: any) => listener(ev.data);
     if (name == "message") {
-      port.onmessage = _listener;
+      if (port.onmessage === null) {
+        port.onmessage = _listener;
+      } else {
+        port.addEventListener("message", _listener);
+      }
     } else if (name == "messageerror") {
-      port.onmessageerror = _listener;
+      if (port.onmessageerror === null) {
+        port.onmessageerror = _listener;
+      } else {
+        port.addEventListener("messageerror", _listener);
+      }
     } else if (name == "close") {
       port.addEventListener("close", _listener);
     } else {

filename: tests/unit_node/worker_threads_test.ts
patch: @@ -515,3 +515,24 @@ Deno.test({
     await worker.terminate();
   },
 });
+
+Deno.test({
+  name:
+    "[node/worker_threads] MessagePort.on all message listeners are invoked",
+  async fn() {
+    const output: string[] = [];
+    const deferred = Promise.withResolvers<void>();
+    const { port1, port2 } = new workerThreads.MessageChannel();
+    port1.on("message", (msg) => output.push(msg));
+    port1.on("message", (msg) => output.push(msg + 2));
+    port1.on("message", (msg) => {
+      output.push(msg + 3);
+      deferred.resolve();
+    });
+    port2.postMessage("hi!");
+    await deferred.promise;
+    assertEquals(output, ["hi!", "hi!2", "hi!3"]);
+    port2.close();
+    port1.close();
+  },
+});
Repository: huggingface/transformers
Pull request: fix hqq due to recent modeling changes

# What does this PR do?

This PR fixes Hqq quantizer due to recent modeling changes which make use of `load_state_dict` instead of `set_module_tensor_to_device`. The issue was that hqq had rewrote `load_state_dict` and it is causing issue with models with a bias. 

Changed files:
filename: src/transformers/quantizers/quantizer_hqq.py
patch: @@ -169,7 +169,12 @@ def check_quantized_param(
                 and tensor_name != "bias"
             )
         else:
-            return isinstance(module, torch.nn.Linear) and tensor_name == "weight"
+            # we need a special path for bias since hqq overwrote load_state_dict for this layer
+            return (
+                isinstance(module, torch.nn.Linear)
+                and tensor_name == "weight"
+                or (isinstance(module, HQQLinear) and tensor_name == "bias")
+            )
 
     def create_quantized_param(
         self,
@@ -194,6 +199,10 @@ def create_quantized_param(
         parent_module = find_parent(model, layer_name)
         node = layer_name.split(".")[-1]
 
+        if tensor_name == "bias":
+            # this should already be set
+            return
+
         # set module state_dict
         module_state_dict = {}
         for k, v in state_dict.items():

filename: tests/quantization/hqq/test_hqq.py
patch: @@ -145,6 +145,28 @@ def test_fp16_quantized_model_multipgpu(self):
         check_forward(self, hqq_runner.model)
 
 
+@slow
+@require_torch_gpu
+@require_accelerate
+@require_hqq
+class HQQTestBias(unittest.TestCase):
+    def tearDown(self):
+        cleanup()
+
+    def test_fp16_quantized_model(self):
+        """
+        Simple LLM model testing fp16 with bias
+        """
+        quant_config = HqqConfig(nbits=8, group_size=64)
+
+        hqq_runner = HQQLLMRunner(
+            model_id="facebook/opt-125m", quant_config=quant_config, compute_dtype=torch.float16, device=torch_device
+        )
+
+        check_hqqlayer(self, hqq_runner.model.model.decoder.layers[0].self_attn.v_proj)
+        check_forward(self, hqq_runner.model)
+
+
 @slow
 @require_torch_gpu
 @require_accelerate