helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: Contrib: add 0cc4m as codeowner for Vulkan backend


Changed files:
filename: CODEOWNERS
patch: @@ -9,3 +9,4 @@
 /ggml/src/ggml-cuda/mmvq.* @JohannesGaessler
 /ggml/src/ggml-opt.cpp @JohannesGaessler
 /ggml/src/gguf.cpp @JohannesGaessler
+/ggml/src/ggml-vulkan/ @0cc4m
Repository: facebook/react
Pull request: Remove vestigial Suspense batching logic

This code was originally added in the old ExpirationTime implementation of Suspense. The idea is that if multiple updates suspend inside the same Suspense boundary, and both of them resolve, we should render both results in the same batch, to reduce jank.

This was an incomplete idea, though. We later discovered a stronger requirement — once we show a fallback, we cannot fill in that fallback without completing _all_ the updates that were previously skipped over. Otherwise you get tearing. This was fixed by #18411, then we discovered additional related flaws that were addressed in #24685. See  those PR descriptions for additional context.

So I believe this older code is no longer necessary.

Changed files:
filename: packages/react-reconciler/src/ReactFiberWorkLoop.js
patch: @@ -1300,16 +1300,6 @@ function finishConcurrentRender(root, exitStatus, lanes) {
             // There's additional work on this root.
             break;
           }
-          const suspendedLanes = root.suspendedLanes;
-          if (!isSubsetOfLanes(suspendedLanes, lanes)) {
-            // We should prefer to render the fallback of at the last
-            // suspended level. Ping the last suspended level to try
-            // rendering it again.
-            // FIXME: What if the suspended lanes are Idle? Should not restart.
-            const eventTime = requestEventTime();
-            markRootPinged(root, suspendedLanes, eventTime);
-            break;
-          }
 
           // The render is suspended, it hasn't timed out, and there's no
           // lower priority work to do. Instead of committing the fallback
Repository: electron/electron
Pull request: fix: remove use of banned std::to_string()

#### Description of Change

Use `base::NumberToString()` instead of `std::to_string()` since the latter is [banned](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md#std_sto_i_l_ul_ll_ull_f_d_ld_to_string_banned).

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none.

Changed files:
filename: shell/browser/notifications/win/windows_toast_notification.cc
patch: @@ -664,8 +664,8 @@ IFACEMETHODIMP ToastEventHandler::Invoke(
     winui::Notifications::IToastFailedEventArgs* e) {
   HRESULT error;
   e->get_ErrorCode(&error);
-  std::string errorMessage =
-      "Notification failed. HRESULT:" + std::to_string(error);
+  std::string errorMessage = base::StrCat(
+      {"Notification failed. HRESULT:", base::NumberToString(error)});
   content::GetUIThreadTaskRunner({})->PostTask(
       FROM_HERE, base::BindOnce(&Notification::NotificationFailed,
                                 notification_, errorMessage));
Repository: denoland/deno
Pull request: fix(ext/websocket): don't throw exception when sending to closed socket

[The WebSocket specification for the `send` function](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send) says:

> The browser will throw an exception if you call `send()` when the connection is in the `CONNECTING` state. If you call `send()` when the connection is in the `CLOSING` or `CLOSED` states, the browser will silently discard the data.

and:

> ### Exceptions
> 
> `InvalidStateError` [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException)
> 
> Thrown if [`WebSocket.readyState`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/readyState) is `CONNECTING`.

This pull request fixes the current behavior to match the specification. Also, I believe it fixes #17586.

Changed files:
filename: ext/websocket/01_websocket.js
patch: @@ -330,10 +330,14 @@ class WebSocket extends EventTarget {
     webidl.requiredArguments(arguments.length, 1, prefix);
     data = webidl.converters.WebSocketSend(data, prefix, "Argument 1");
 
-    if (this[_readyState] !== OPEN) {
+    if (this[_readyState] === CONNECTING) {
       throw new DOMException("'readyState' not OPEN", "InvalidStateError");
     }
 
+    if (this[_readyState] !== OPEN) {
+      return;
+    }
+
     if (this[_sendQueue].length === 0) {
       // Fast path if the send queue is empty, for example when only synchronous
       // data is being sent.

filename: tests/unit/websocket_test.ts
patch: @@ -806,3 +806,18 @@ Deno.test("Close connection", async () => {
   await server.finished;
   conn.close();
 });
+
+Deno.test("send to a closed socket", async () => {
+  const { promise, resolve } = Promise.withResolvers<void>();
+  const ws = new WebSocket("ws://localhost:4242");
+  const blob = new Blob(["foo"]);
+  ws.onerror = () => fail();
+  ws.onopen = () => {
+    ws.close();
+    ws.send(blob);
+  };
+  ws.onclose = () => {
+    resolve();
+  };
+  await promise;
+});

filename: tests/wpt/runner/expectation.json
patch: @@ -11303,10 +11303,10 @@
           "006.html?default": true,
           "006.html?wpt_flags=h2": false,
           "006.html?wss": false,
-          "007.html?default": false,
+          "007.html?default": true,
           "007.html?wpt_flags=h2": false,
           "007.html?wss": false,
-          "008.html?default": false,
+          "008.html?default": true,
           "008.html?wss": false,
           "009.html?default": {
             "ignore": true
Repository: vercel/next.js
Pull request: [metadata] fix nonce prop for hoist script

### What

Only render `nonce` prop on icon hoist script when it's presented

Changed files:
filename: packages/next/src/server/app-render/metadata-insertion/create-server-inserted-metadata.tsx
patch: @@ -15,6 +15,6 @@ export function createServerInsertedMetadata(nonce: string | undefined) {
     }
 
     inserted = true
-    return `<script nonce="${nonce}">${REINSERT_ICON_SCRIPT}</script>`
+    return `<script ${nonce ? `nonce="${nonce}"` : ''}>${REINSERT_ICON_SCRIPT}</script>`
   }
 }
Repository: denoland/deno
Pull request: fix(cli): remove extraneous comma in task --eval help

Remove extraneous comma in `--eval` help text on `deno task` subcommand.

Changed files:
filename: cli/args/flags.rs
patch: @@ -3083,7 +3083,7 @@ Evaluate a task from string
         Arg::new("eval")
           .long("eval")
           .help(
-            "Evaluate the passed value as if, it was a task in a configuration file",
+            "Evaluate the passed value as if it was a task in a configuration file",
           ).action(ArgAction::SetTrue)
       )
       .arg(node_modules_dir_arg())
Repository: huggingface/transformers
Pull request: tests/roformer: fix couple roformer tests on gpus

Fix "RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu" error running the following roformer tests on GPUs (CUDA or XPU):

```
tests/models/roformer/test_modeling_roformer.py::RoFormerSinusoidalPositionalEmbeddingTest::test_basic
tests/models/roformer/test_modeling_roformer.py::RoFormerSelfAttentionRotaryPositionEmbeddingTest::test_apply_rotary_position_embeddings
```

CC: @ydshieh @amyeroberts 

Changed files:
filename: tests/models/roformer/test_modeling_roformer.py
patch: @@ -513,8 +513,9 @@ class RoFormerSinusoidalPositionalEmbeddingTest(unittest.TestCase):
 
     def test_basic(self):
         input_ids = torch.tensor([[4, 10]], dtype=torch.long, device=torch_device)
-        emb1 = RoFormerSinusoidalPositionalEmbedding(num_positions=6, embedding_dim=6).to(torch_device)
+        emb1 = RoFormerSinusoidalPositionalEmbedding(num_positions=6, embedding_dim=6)
         emb1._init_weight()
+        emb1 = emb1.to(torch_device)
         emb = emb1(input_ids.shape)
         desired_weights = torch.tensor(
             [[0.0000, 0.0000, 0.0000, 1.0000, 1.0000, 1.0000], [0.8415, 0.0464, 0.0022, 0.5403, 0.9989, 1.0000]]
@@ -554,8 +555,9 @@ def test_apply_rotary_position_embeddings(self):
         key_layer = (
             -torch.arange(2 * 12 * 16 * 64, dtype=torch.float, device=torch_device).reshape(2, 12, 16, 64) / 100
         ).to(torch_device)
-        embed_positions = RoFormerSinusoidalPositionalEmbedding(num_positions=32, embedding_dim=64).to(torch_device)
+        embed_positions = RoFormerSinusoidalPositionalEmbedding(num_positions=32, embedding_dim=64)
         embed_positions._init_weight()
+        embed_positions = embed_positions.to(torch_device)
         sinusoidal_pos = embed_positions([2, 16, 768])[None, None, :, :]
 
         query_layer, key_layer = RoFormerSelfAttention.apply_rotary_position_embeddings(
Repository: facebook/react
Pull request: CHANGELOG.md Change parentheses position

<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->
hi there!

It's a small change, but it contains my desire to make the React document a little more perfect.

## Summary

Change the position of the parentheses in the document below.
- ./CHANGELOG.md
<!--
 Explain the **motivation** for making this change. What existing problem does the pull request solve?
-->



## How did you test this change?

It's just a commit to modify a few characters, but it can create a more complete react document.

<!--
  Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
  How exactly did you verify that your PR solves the issue you wanted to solve?
  If you leave this empty, your PR will very likely be closed.
-->


Changed files:
filename: CHANGELOG.md
patch: @@ -17,7 +17,7 @@
 
 ### Server Components (Experimental)
 
-* Add support for `useId()` inside Server Components. ([@gnoff](https://github.com/gnoff)) in [#24172](https://github.com/facebook/react/pull/24172)
+* Add support for `useId()` inside Server Components. ([@gnoff](https://github.com/gnoff) in [#24172](https://github.com/facebook/react/pull/24172))
 
 ## 18.1.0 (April 26, 2022)
Repository: ggml-org/llama.cpp
Pull request: sync : ggml


Changed files:
filename: scripts/sync-ggml.last
patch: @@ -1 +1 @@
-d62df60a07ba3deeb85e5cfc9b1ee07645ff35e2
+3323219cd3cc050e5c7133cd4fc1e50d1f590faf
Repository: ggml-org/llama.cpp
Pull request: graph : fix graph reuse reset of params

fix #14759

Forgot to reset the graph params.

Changed files:
filename: src/llama-graph.cpp
patch: @@ -428,6 +428,8 @@ void llm_graph_result::reset() {
     t_embd        = nullptr;
     t_embd_pooled = nullptr;
 
+    params = {};
+
     inputs.clear();
 
     buf_compute_meta.resize(ggml_tensor_overhead()*max_nodes + ggml_graph_overhead_custom(max_nodes, false));
Repository: vercel/next.js
Pull request: remove unique metadata prop from initial RSC payload

This value is used as a key to re-mount `head` on subsequent client navigations, but as far as I can tell, it's not needed for the initial RSC payload that seeds these pages. 

In its current form, these random IDs get serialized as part of the RSC payload, leading to non-deterministic HTML outputs. 

Fixes #77810

Changed files:
filename: packages/next/src/server/app-render/app-render.tsx
patch: @@ -521,7 +521,6 @@ async function generateDynamicRSCPayload(
             />
             {/* Adding requestId as react key to make metadata remount for each render */}
             <ViewportTree key={getFlightViewportKey(requestId)} />
-            {/* Not add requestId as react key to ensure segment prefetch could result consistently if nothing changed */}
             <MetadataTree key={getFlightMetadataKey(requestId)} />
           </React.Fragment>
         ),
@@ -862,8 +861,7 @@ async function getRSCPayload(
         statusCode={ctx.res.statusCode}
         isPossibleServerAction={ctx.isPossibleServerAction}
       />
-      <ViewportTree key={getFlightViewportKey(ctx.requestId)} />
-      {/* Not add requestId as react key to ensure segment prefetch could result consistently if nothing changed */}
+      <ViewportTree />
       <MetadataTree />
     </React.Fragment>
   )
@@ -931,7 +929,6 @@ async function getErrorRSCPayload(
       ViewportBoundary,
     },
     url,
-    requestId,
     workStore,
   } = ctx
 
@@ -950,22 +947,18 @@ async function getErrorRSCPayload(
     serveStreamingMetadata: serveStreamingMetadata,
   })
 
-  // {/* Adding requestId as react key to make metadata remount for each render */}
-  const metadata = <MetadataTree key={getFlightMetadataKey(requestId)} />
-
   const initialHead = (
     <React.Fragment key={flightDataPathHeadKey}>
       <NonIndex
         pagePath={ctx.pagePath}
         statusCode={ctx.res.statusCode}
         isPossibleServerAction={ctx.isPossibleServerAction}
       />
-      {/* Adding requestId as react key to make metadata remount for each render */}
-      <ViewportTree key={getFlightViewportKey(requestId)} />
+      <ViewportTree />
       {process.env.NODE_ENV === 'development' && (
         <meta name="next-error" content="not-found" />
       )}
-      {metadata}
+      <MetadataTree />
     </React.Fragment>
   )
Repository: huggingface/transformers
Pull request: [Dinov2] Enable device_map="auto" support

This PR adds support for `device_map="auto"` to the Dinov2 model by defining `_no_split_modules = ["Dinov2Layer"]`, which enables inference across multiple devices using Accelerate and Transformers.

### ✔️ Summary

- Adds `_no_split_modules = ["Dinov2Layer"]` to `Dinov2PreTrainedModel`
- Includes a test `test_model_parallelism` for multi-GPU `device_map="auto"` behavior using a dummy input

### 🔬 Why this matters

Large models like Dinov2 can now be used efficiently on limited memory setups using Transformers' `device_map` feature.

Closes #29786


Changed files:
filename: src/transformers/models/dinov2/modeling_dinov2.py
patch: @@ -491,7 +491,7 @@ class Dinov2PreTrainedModel(PreTrainedModel):
     base_model_prefix = "dinov2"
     main_input_name = "pixel_values"
     supports_gradient_checkpointing = True
-    _no_split_modules = ["Dinov2SwiGLUFFN"]
+    _no_split_modules = ["Dinov2Layer"]
     _supports_sdpa = True
     _supports_flash_attn_2 = True
     _supports_flex_attn = True

filename: src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py
patch: @@ -509,7 +509,7 @@ class Dinov2WithRegistersPreTrainedModel(PreTrainedModel):
     base_model_prefix = "dinov2_with_registers"
     main_input_name = "pixel_values"
     supports_gradient_checkpointing = True
-    _no_split_modules = ["Dinov2WithRegistersSwiGLUFFN"]
+    _no_split_modules = ["Dinov2WithRegistersLayer"]
     _supports_sdpa = True
     _supports_flash_attn_2 = True
     _supports_flex_attn = True
Repository: denoland/deno
Pull request: fix(task): update --filter flag description

`--recursive` is now implied by `--filter`.

Changed files:
filename: cli/args/flags.rs
patch: @@ -3073,7 +3073,7 @@ Evaluate a task from string
         Arg::new("filter")
         .long("filter")
         .short('f')
-        .help("Filter members of the workspace by name - should be used with --recursive")
+        .help("Filter members of the workspace by name, implies --recursive flag")
         .value_parser(value_parser!(String)),
       )
       .arg(
Repository: nodejs/node
Pull request: test: more common.mustNotCall in net

common.mustCall and common.mustNotCall are always better than empty callbacks when ensuring correctness

Changed files:
filename: test/parallel/test-net-eaddrinuse.js
patch: @@ -24,10 +24,8 @@ const common = require('../common');
 const assert = require('assert');
 const net = require('net');
 
-const server1 = net.createServer(function(socket) {
-});
-const server2 = net.createServer(function(socket) {
-});
+const server1 = net.createServer(common.mustNotCall());
+const server2 = net.createServer(common.mustNotCall());
 server1.listen(0, common.mustCall(function() {
   server2.on('error', function(error) {
     assert.strictEqual(error.message.includes('EADDRINUSE'), true);

filename: test/parallel/test-net-listen-close-server.js
patch: @@ -23,8 +23,7 @@
 const common = require('../common');
 const net = require('net');
 
-const server = net.createServer(function(socket) {
-});
+const server = net.createServer(common.mustNotCall());
 server.listen(0, common.mustNotCall());
 server.on('error', common.mustNotCall());
 server.close();

filename: test/parallel/test-net-listen-error.js
patch: @@ -23,7 +23,6 @@
 const common = require('../common');
 const net = require('net');
 
-const server = net.createServer(function(socket) {
-});
+const server = net.createServer(common.mustNotCall());
 server.listen(1, '1.1.1.1', common.mustNotCall()); // EACCES or EADDRNOTAVAIL
 server.on('error', common.mustCall());

filename: test/parallel/test-tls-close-error.js
patch: @@ -11,8 +11,7 @@ const fixtures = require('../common/fixtures');
 const server = tls.createServer({
   key: fixtures.readKey('agent1-key.pem'),
   cert: fixtures.readKey('agent1-cert.pem')
-}, function(c) {
-}).listen(0, common.mustCall(function() {
+}, common.mustNotCall()).listen(0, common.mustCall(function() {
   const c = tls.connect(this.address().port, common.mustNotCall());
 
   c.on('error', common.mustCall());

filename: test/parallel/test-tls-handshake-error.js
patch: @@ -14,8 +14,7 @@ const server = tls.createServer({
   key: fixtures.readKey('agent1-key.pem'),
   cert: fixtures.readKey('agent1-cert.pem'),
   rejectUnauthorized: true
-}, function(c) {
-}).listen(0, common.mustCall(function() {
+}, common.mustNotCall()).listen(0, common.mustCall(function() {
   assert.throws(() => {
     tls.connect({
       port: this.address().port,
Repository: facebook/react
Pull request: [react-www] remove forked bundle

*NOTE:* re-apply of 645ae2686b157c9f80193e1ada75b7e00ef49acf now that www is updated.

The `enableNewReconciler` was gone with 420f0b7fa1fcc609fc7b438c4599d0f76fab4bc0, this removes the bundle config.

Changed files:
filename: dangerfile.js
patch: @@ -46,7 +46,6 @@ const CRITICAL_ARTIFACT_PATHS = new Set([
   'oss-experimental/react-dom/cjs/react-dom.production.min.js',
   'facebook-www/ReactDOM-prod.classic.js',
   'facebook-www/ReactDOM-prod.modern.js',
-  'facebook-www/ReactDOMForked-prod.classic.js',
 ]);
 
 const kilobyteFormatter = new Intl.NumberFormat('en', {

filename: scripts/rollup/bundles.js
patch: @@ -163,17 +163,6 @@ const bundles = [
     externals: ['react'],
   },
 
-  /******* React DOM - www - Uses forked reconciler *******/
-  {
-    moduleType: RENDERER,
-    bundleTypes: [FB_WWW_DEV, FB_WWW_PROD, FB_WWW_PROFILING],
-    entry: 'react-dom',
-    global: 'ReactDOMForked',
-    minifyWithProdErrorCodes: true,
-    wrapWithModuleBoundaries: true,
-    externals: ['react'],
-  },
-
   /******* Test Utils *******/
   {
     moduleType: RENDERER_UTILS,
Repository: ggml-org/llama.cpp
Pull request: parallel : add option for different RNG seeds

Add option to `llama-parallel` to set different RNG seeds.

Changed files:
filename: examples/parallel/parallel.cpp
patch: @@ -184,6 +184,9 @@ int main(int argc, char ** argv) {
     // extra text to insert in each client's prompt in order to make it larger
     const int32_t n_junk = std::max(1, params.n_junk);
 
+    // signed seed, use negative values to indicate different seeds for the different clients
+    const int32_t & sseed = params.sampling.seed;
+
     // init llama.cpp
     llama_backend_init();
     llama_numa_init(params.numa);
@@ -219,12 +222,21 @@ int main(int argc, char ** argv) {
 
     const int n_ctx = llama_n_ctx(ctx);
 
+    if (sseed >= 0) {
+        LOG_INF("%s: initializing all samplers with the same RNG seed: %d (use a negative seed to have different seeds)\n", __func__, sseed);
+    } else {
+        LOG_INF("%s: initializing samplers with different RNG seeds, starting from %d\n", __func__, sseed);
+    }
+
     std::vector<client> clients(n_clients);
     for (size_t i = 0; i < clients.size(); ++i) {
         auto & client = clients[i];
         client.id = i;
         client.smpl = common_sampler_init(model, params.sampling);
-        //params.sampling.seed++;
+
+        if (sseed < 0) {
+            params.sampling.seed--;
+        }
     }
 
     std::vector<llama_token> tokens_system;
Repository: ggml-org/llama.cpp
Pull request: graph : avoid huge warm-up graphs for MoE models

Just hot loading the experts for matrix multiplication is enough to heat-up the caches. No need to add extra `GGML_OP_ADD` nodes for aggregating the results.

Changed files:
filename: src/llama-context.cpp
patch: @@ -1312,7 +1312,7 @@ uint32_t llama_context::output_reserve(int32_t n_outputs) {
 //
 
 uint32_t llama_context::graph_max_nodes() const {
-    return std::max<uint32_t>(65536u, 5u*model.n_tensors());
+    return std::max<uint32_t>(1024u, 8u*model.n_tensors());
 }
 
 llm_graph_result * llama_context::get_gf_res_reserve() const {

filename: src/llama-graph.cpp
patch: @@ -906,8 +906,11 @@ ggml_tensor * llm_graph_context::build_moe_ffn(
     }
 
     // aggregate experts
+    // note: here we explicitly use hparams.n_expert_used instead of n_expert_used
+    //       to avoid potentially a large number of add nodes during warmup
+    //       ref: https://github.com/ggml-org/llama.cpp/pull/14753
     ggml_tensor * moe_out = nullptr;
-    for (int i = 0; i < n_expert_used; ++i) {
+    for (uint32_t i = 0; i < hparams.n_expert_used; ++i) {
         ggml_tensor * cur_expert = ggml_view_2d(ctx0, experts, n_embd, n_tokens,
                 experts->nb[2], i*experts->nb[1]);
 
@@ -918,7 +921,7 @@ ggml_tensor * llm_graph_context::build_moe_ffn(
         }
     }
 
-    if (n_expert_used == 1) {
+    if (hparams.n_expert_used == 1) {
         // avoid returning a non-contiguous tensor
         moe_out = ggml_cont(ctx0, moe_out);
     }