helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: ggml: Re-enable CUDA graphs in presence of CONT and DUP nodes

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: ggml/src/ggml-cuda/cpy.cu
patch: @@ -551,7 +551,7 @@ static void ggml_cpy_f16_f16_cuda(
         (cx, cdst, ne, ne00, ne01, ne02, nb00, nb01, nb02, nb03, ne10, ne11, ne12, nb10, nb11, nb12, nb13, cdst_indirect, graph_cpynode_index++);
 }
 
-void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, ggml_tensor * src1) {
+void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, ggml_tensor * src1, bool disable_indirection_for_this_node) {
     const int64_t ne = ggml_nelements(src0);
     GGML_ASSERT(ne == ggml_nelements(src1));
 
@@ -588,7 +588,7 @@ void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, gg
     char ** dest_ptrs_d = nullptr;
     int graph_cpynode_index = -1;
 #if defined(GGML_CUDA_USE_GRAPHS) || defined(GGML_HIP_GRAPHS)
-    if(ctx.cuda_graph->use_cpy_indirection) {
+    if(ctx.cuda_graph->use_cpy_indirection && !disable_indirection_for_this_node) {
         dest_ptrs_d = ctx.cuda_graph->dest_ptrs_d;
         graph_cpynode_index = ctx.cuda_graph->graph_cpynode_index;
     }
@@ -636,7 +636,7 @@ void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, gg
                 ggml_type_name(src0->type), ggml_type_name(src1->type));
     }
 #if defined(GGML_CUDA_USE_GRAPHS) || defined(GGML_HIP_GRAPHS)
-    if(ctx.cuda_graph->use_cpy_indirection) {
+    if(ctx.cuda_graph->use_cpy_indirection && !disable_indirection_for_this_node) {
         ctx.cuda_graph->graph_cpynode_index = graph_cpynode_index;
     }
 #endif
@@ -645,7 +645,8 @@ void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, gg
 
 void ggml_cuda_dup(ggml_backend_cuda_context & ctx, ggml_tensor * dst) {
     const ggml_tensor * src0 = dst->src[0];
-    ggml_cuda_cpy(ctx, src0, dst);
+    bool disable_indirection = true;
+    ggml_cuda_cpy(ctx, src0, dst, disable_indirection);
 }
 
 void* ggml_cuda_cpy_fn(const ggml_tensor * src0, ggml_tensor * src1) {

filename: ggml/src/ggml-cuda/cpy.cuh
patch: @@ -2,7 +2,7 @@
 
 #define CUDA_CPY_BLOCK_SIZE 64
 
-void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, ggml_tensor * src1);
+void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, ggml_tensor * src1,  bool disable_indirection = false);
 
 void ggml_cuda_dup(ggml_backend_cuda_context & ctx, ggml_tensor * dst);
 

filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -2489,7 +2489,7 @@ static bool check_node_graph_compatibility_and_refresh_copy_ops(ggml_backend_cud
 #endif
         }
 
-        if (node->op == GGML_OP_MUL_MAT_ID || node->op == GGML_OP_CONT || node->op == GGML_OP_DUP) {
+        if (node->op == GGML_OP_MUL_MAT_ID) {
             use_cuda_graph = false; // This node type is not supported by CUDA graph capture
 #ifndef NDEBUG
             GGML_LOG_DEBUG("%s: disabling CUDA graphs due to unsupported node type\n", __func__);
Repository: denoland/deno
Pull request: fix: test in presence of .npmrc

override home dir so .npmrc on the dev machine doesn't break it

Changed files:
filename: tests/specs/npm/npmrc_not_next_to_package_json/__test__.jsonc
patch: @@ -1,7 +1,8 @@
 {
   "envs": {
     "DENO_FUTURE": "1",
-    "USERPROFILE": "$DENO_DIR"
+    "USERPROFILE": "$DENO_DIR",
+    "HOME": "$DENO_DIR"
   },
   "tempDir": true,
   "args": "install -A -L debug",
Repository: nodejs/node
Pull request: build: set `node_arch` to `target_cpu` in GN

When building Node.js using the GN build, it would fail when cross-compiling, e.g.

```
./tools/gn-gen.py out/Release --target_cpu=arm64
```

becuase `node_arch` was being improperly set to `current_cpu` in every case and thus the startup snapshot wouldn't match:

https://github.com/nodejs/node/blob/eef303028f9f06a6c64c20e5b537fd6db6ac69a7/src/node_snapshotable.cc#L677-L684

<!--
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: unofficial.gni
patch: @@ -91,7 +91,7 @@ template("node_gn_build") {
     if (current_cpu == "x86") {
       node_arch = "ia32"
     } else {
-      node_arch = current_cpu
+      node_arch = target_cpu
     }
     if (target_os == "win") {
       node_platform = "win32"
Repository: huggingface/transformers
Pull request: [ForCausalLMLoss] allow users to pass shifted labels

I'm porting [DeepSpeed Ulysses sequence parallelism](https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/deepspeed-ulysses/README.md) from Megatron-Deepspeed to the HF transformers ecosphere so that everybody could use this SP implementation. I'm integrating it into [ArcticTraining](https://github.com/snowflakedb/ArcticTraining/pull/45) and then once everything is neat we can integrate it into HF Accelerate and make it available to many frameworks/users.

One of the nuances of SP implementation is that each rank computes a shard of the loss and then the loss/grads are merged together - this allows for sequence length of 1M and more.

The problem emerges when loss is computed:

In unsharded seqlen logits we end up with (shift left):
```
input_ids: [1 2 3 4 5 6 7    8   ]
labels   : [1 2 3 4 5 6 7    8   ]
shiftedl : [2 3 4 5 6 7 8 -100]
```
when sharded seqlen logits (each gpu processes half seqlen in this example) we lose label 5 once shifted:
```
input_ids: [1 2 3    4] [5 6 7    8]
labels   : [1 2 3    4] [5 6 7    8]
shiftedl : [2 3 4 -100] [6 7 8 -100]
```

so we either need the `ForCausalLMLoss` API to allow for the user to provide the padding token to replace `-100` with `5` in this case, or a much simpler solution is to just let the user do the shifting. This PR proposes the latter.

An alternative API change would be to pass `labels=shift_labels` - so no API change here, but to add a flag `are_labels_shifted=False`

So 2 ways:

1.
```
def ForCausalLMLoss(
    logits, labels, vocab_size: int, num_items_in_batch: int = None, ignore_index: int = -100, 
    shift_labels=None, **kwargs
```
2.

```
def ForCausalLMLoss(
    logits, labels, vocab_size: int, num_items_in_batch: int = None, ignore_index: int = -100, 
    are_labels_shifted=False, **kwargs
```

whatever works for you is good for me. The PR is currently made for (1).

Changed files:
filename: src/transformers/loss/loss_utils.py
patch: @@ -31,14 +31,22 @@ def fixed_cross_entropy(source, target, num_items_in_batch: int = None, ignore_i
 
 
 def ForCausalLMLoss(
-    logits, labels, vocab_size: int, num_items_in_batch: int = None, ignore_index: int = -100, **kwargs
+    logits,
+    labels,
+    vocab_size: int,
+    num_items_in_batch: int = None,
+    ignore_index: int = -100,
+    shift_labels=None,
+    **kwargs,
 ):
     # Upcast to float if we need to compute the loss to avoid potential precision issues
     logits = logits.float()
-    labels = labels.to(logits.device)
-    # Shift so that tokens < n predict n
-    labels = nn.functional.pad(labels, (0, 1), value=ignore_index)
-    shift_labels = labels[..., 1:].contiguous()
+
+    if shift_labels is None:
+        labels = labels.to(logits.device)
+        # Shift so that tokens < n predict n
+        labels = nn.functional.pad(labels, (0, 1), value=ignore_index)
+        shift_labels = labels[..., 1:].contiguous()
 
     # Flatten the tokens
     logits = logits.view(-1, vocab_size)
Repository: vercel/next.js
Pull request: test: adjust default timeouts for [waitFor]elementByCss

Adjusts the default timeouts:
- elementByCss: 5s
- waitForElementByCss: 10s

Previously, we didn't pass an explicit value, so they both defaulted to playwright's default of 60s. This is _very_ slow, and if something is slow enough to require anything in that range, i'd say it deserves to be wrapped in `retry()` or something similar anyway, so it's fine to fail here.
The upside of this is that errors because of bad selectors (or missing elements) happen faster, which is a nice thing, and might also save CI time.

i could also see an argument for making these even shorter -- e.g. the default timeout for `retry()` is 3s, so maybe `retry` should be faster than that.
https://github.com/vercel/next.js/blob/717e54b0cd914a17314c470cd10d6af2b2d75787/test/lib/next-test-utils.ts#L796-L799
but then again, `retry` doesn't factor in the time `fn` took, so these don't really conflict.

Changed files:
filename: test/e2e/app-dir/navigation/navigation.test.ts
patch: @@ -893,7 +893,7 @@ describe('app dir - navigation', () => {
         .elementByCss("[href='/metadata-await-promise/nested']")
         .click()
 
-      await waitFor(resolveMetadataDuration)
+      await waitFor(resolveMetadataDuration + 500)
 
       expect(await browser.elementById('page-content').text()).toBe('Content')
       expect(await browser.elementByCss('title').text()).toBe('Async Title')
@@ -912,9 +912,11 @@ describe('app dir - navigation', () => {
         .click()
 
       if (!isNextDev) {
-        expect(await browser.elementByCss('title').text()).toBe('Async Title')
-
-        await waitFor(resolveMetadataDuration + 500)
+        expect(
+          await browser
+            .waitForElementByCss('title', resolveMetadataDuration + 500)
+            .text()
+        ).toBe('Async Title')
       }
 
       expect(await browser.elementById('page-content').text()).toBe('Content')

filename: test/lib/browsers/playwright.ts
patch: @@ -348,7 +348,7 @@ export class Playwright extends BrowserInterface {
   }
 
   elementByCss(selector: string) {
-    return this.waitForElementByCss(selector)
+    return this.waitForElementByCss(selector, 5_000)
   }
 
   elementById(sel) {
@@ -427,7 +427,7 @@ export class Playwright extends BrowserInterface {
     )
   }
 
-  waitForElementByCss(selector, timeout?: number) {
+  waitForElementByCss(selector, timeout = 10_000) {
     return this.chain(() => {
       return page
         .waitForSelector(selector, { timeout, state: 'attached' })
Repository: electron/electron
Pull request: fix: documentation spelling errors

#### Description of Change
Fix typos only

#### Checklist

Typos only.

I was unable to run tests, since [Build Tools has Xcode issues](https://github.com/electron/build-tools/issues/514#issuecomment-2298204226)

#### Release Notes

Notes: none

Changed files:
filename: docs/api/session.md
patch: @@ -1511,7 +1511,7 @@ Returns `Promise<void>` - resolves when all data has been cleared.
 
 Clears various different types of data.
 
-This method clears more types of data and is more thourough than the
+This method clears more types of data and is more thorough than the
 `clearStorageData` method.
 
 **Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.

filename: docs/api/touch-bar-scrubber.md
patch: @@ -39,7 +39,7 @@ updates the control in the touch bar. Possible values:
 
 #### `touchBarScrubber.overlayStyle`
 
-A `string` representing the style that selected items in the scrubber should have. This style is overlayed on top
+A `string` representing the style that selected items in the scrubber should have. This style is overlaid on top
 of the scrubber item instead of being placed behind it. Updating this value immediately updates the control in the
 touch bar. Possible values:
 

filename: docs/api/web-utils.md
patch: @@ -14,7 +14,7 @@ The `webUtils` module has the following methods:
 
 Returns `string` - The file system path that this `File` object points to. In the case where the object passed in is not a `File` object an exception is thrown. In the case where the File object passed in was constructed in JS and is not backed by a file on disk an empty string is returned.
 
-This method superceded the previous augmentation to the `File` object with the `path` property.  An example is included below.
+This method superseded the previous augmentation to the `File` object with the `path` property.  An example is included below.
 
 ```js
 // Before
Repository: denoland/deno
Pull request: fix: only use maglev in DENO_FUTURE for now

let it bake for a bit before enabling by default

Changed files:
filename: cli/main.rs
patch: @@ -384,10 +384,14 @@ fn resolve_flags_and_init(
         // TODO(petamoriken): Need to check TypeScript `assert` keywords in deno_ast
         vec!["--no-harmony-import-assertions".to_string()]
       } else {
-        // If we're still in v1.X version we want to support import assertions.
-        // V8 12.6 unshipped the support by default, so force it by passing a
-        // flag.
-        vec!["--harmony-import-assertions".to_string()]
+        vec![
+          // If we're still in v1.X version we want to support import assertions.
+          // V8 12.6 unshipped the support by default, so force it by passing a
+          // flag.
+          "--harmony-import-assertions".to_string(),
+          // Verify with DENO_FUTURE for now.
+          "--no-maglev".to_string(),
+        ]
       }
     }
   };
Repository: huggingface/transformers
Pull request: Fix deepspeed loading (part 2)

# What does this PR do?



Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -3723,18 +3723,22 @@ def float(self, *args):
 
     @classmethod
     def get_init_context(cls, is_quantized: bool, _is_ds_init_called: bool):
-        if is_deepspeed_zero3_enabled() and not is_quantized and not _is_ds_init_called:
-            logger.info("Detected DeepSpeed ZeRO-3: activating zero.init() for this model")
-            init_contexts = [
-                deepspeed.zero.Init(config_dict_or_path=deepspeed_config()),
-                set_zero3_state(),
-                no_init_weights(),
-            ]
+        # With deepspeed, we cannot initialize the model on meta device
+        if is_deepspeed_zero3_enabled():
+            init_contexts = [no_init_weights()]
+            if not is_quantized and not _is_ds_init_called:
+                logger.info("Detected DeepSpeed ZeRO-3: activating zero.init() for this model")
+                init_contexts.extend(
+                    [
+                        deepspeed.zero.Init(config_dict_or_path=deepspeed_config()),
+                        set_zero3_state(),
+                    ]
+                )
+            elif is_quantized:
+                init_contexts.append(set_quantized_state())
         else:
             init_contexts = [no_init_weights(), init_empty_weights()]
 
-        if is_deepspeed_zero3_enabled() and is_quantized:
-            init_contexts.append(set_quantized_state())
         return init_contexts
 
     @classmethod
Repository: facebook/react
Pull request: DevTools: Fix passing extensionId in evaled postMessage calls

## Summary

When adding `extensionId` to postMessage calls accidentally missed a comma. Unfortunately that code wasn't syntax checked so it was missed.

This made it so fetching files with network caching from the content window failed, causing named hooks to not work.

Fixes #22591



## How did you test this change?

- yarn flow dom
- yarn test-build-devtools
- named hooks now correctly work again on fb:

**Before**
![image](https://user-images.githubusercontent.com/1271509/137995297-fe3d4efa-0995-49b5-a1ce-9363bcf03840.png)


**After**
![image](https://user-images.githubusercontent.com/1271509/137995608-0554119c-9930-4246-89b7-be9fae0a56d2.png)


Changed files:
filename: packages/react-devtools-extensions/src/main.js
patch: @@ -216,7 +216,7 @@ function createPanelIfReactLoaded() {
           chrome.devtools.inspectedWindow.eval(
             `window.postMessage({
                source: 'react-devtools-inject-backend',
-               extensionId: "${CURRENT_EXTENSION_ID}"
+               extensionId: "${CURRENT_EXTENSION_ID}",
              }, '*');`,
             function(response, evalError) {
               if (evalError) {
@@ -361,15 +361,15 @@ function createPanelIfReactLoaded() {
               chrome.runtime.onMessage.addListener(onPortMessage);
 
               chrome.devtools.inspectedWindow.eval(`
-              window.postMessage({
-                source: 'react-devtools-extension',
-                extensionId: "${CURRENT_EXTENSION_ID}"
-                payload: {
-                  type: 'fetch-file-with-cache',
-                  url: "${url}",
-                },
-              });
-            `);
+                window.postMessage({
+                  source: 'react-devtools-extension',
+                  extensionId: "${CURRENT_EXTENSION_ID}",
+                  payload: {
+                    type: 'fetch-file-with-cache',
+                    url: "${url}",
+                  },
+                }, '*');
+              `);
             };
 
             // Fetching files from the extension won't make use of the network cache
Repository: huggingface/transformers
Pull request: Hf Xet extra

Adds the extra for hf_xet

Changed files:
filename: setup.py
patch: @@ -117,6 +117,7 @@
     "fugashi>=1.0",
     "GitPython<3.1.19",
     "hf-doc-builder>=0.3.0",
+    "hf_xet",
     "huggingface-hub>=0.30.0,<1.0",
     "importlib_metadata",
     "ipadic>=1.0.0,<2.0",
@@ -283,6 +284,7 @@ def run(self):
 
 extras["torch"] = deps_list("torch", "accelerate")
 extras["accelerate"] = deps_list("accelerate")
+extras["hf_xet"] = deps_list("hf_xet")
 
 if os.name == "nt":  # windows
     extras["retrieval"] = deps_list("datasets")  # faiss is not supported on windows

filename: src/transformers/dependency_versions_table.py
patch: @@ -24,6 +24,7 @@
     "fugashi": "fugashi>=1.0",
     "GitPython": "GitPython<3.1.19",
     "hf-doc-builder": "hf-doc-builder>=0.3.0",
+    "hf_xet": "hf_xet",
     "huggingface-hub": "huggingface-hub>=0.30.0,<1.0",
     "importlib_metadata": "importlib_metadata",
     "ipadic": "ipadic>=1.0.0,<2.0",
Repository: huggingface/transformers
Pull request: Revert #37031

# What does this PR do?

https://github.com/huggingface/transformers/pull/37031 caused much much longer loading times (see https://github.com/huggingface/transformers/issues/37160) basically causing going from ~3/4 min to 10+ hours for Deepseek R1.

I'm fully reverting for now.
I think (not completely sure) the issue is actually accessing the state dict over and over again, not so much the cloning (copying). I will investigate it later to see if I can re-add the fix without time overhead.

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -761,9 +761,6 @@ def _load_state_dict_into_meta_model(
     if is_meta_state_dict:
         file_pointer = safe_open(shard_file, framework="pt", device=tensor_device)
 
-    # Used to fix the issue mentioned in #37031: when loading a model with tied weights in state_dict + `tie_word_embeddings = False`,
-    # we need to make sure they are not loaded as tied weights!
-    data_ptrs = set()
     for param_name, empty_param in state_dict.items():
         if param_name not in expected_keys:
             continue
@@ -833,14 +830,8 @@ def _load_state_dict_into_meta_model(
                 if is_fsdp_enabled():
                     param_device = "cpu" if is_local_dist_rank_0() else "meta"
 
-                # avoid tied weights
-                if param.data_ptr() in data_ptrs:
-                    param = param.clone()
-
                 _load_parameter_into_model(model, param_name, param.to(param_device))
 
-                # Add `data_ptr` of `model.state_dict()[param_name]` to avoid tied weights
-                data_ptrs.add(model.state_dict()[param_name].data_ptr())
             else:
                 hf_quantizer.create_quantized_param(
                     model, param, param_name, param_device, state_dict, unexpected_keys
Repository: electron/electron
Pull request: fix: documentation spelling errors

Backport of #43366

See that PR for details.


Notes: none

Changed files:
filename: docs/api/session.md
patch: @@ -1511,7 +1511,7 @@ Returns `Promise<void>` - resolves when all data has been cleared.
 
 Clears various different types of data.
 
-This method clears more types of data and is more thourough than the
+This method clears more types of data and is more thorough than the
 `clearStorageData` method.
 
 **Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.

filename: docs/api/touch-bar-scrubber.md
patch: @@ -39,7 +39,7 @@ updates the control in the touch bar. Possible values:
 
 #### `touchBarScrubber.overlayStyle`
 
-A `string` representing the style that selected items in the scrubber should have. This style is overlayed on top
+A `string` representing the style that selected items in the scrubber should have. This style is overlaid on top
 of the scrubber item instead of being placed behind it. Updating this value immediately updates the control in the
 touch bar. Possible values:
 

filename: docs/api/web-utils.md
patch: @@ -14,7 +14,7 @@ The `webUtils` module has the following methods:
 
 Returns `string` - The file system path that this `File` object points to. In the case where the object passed in is not a `File` object an exception is thrown. In the case where the File object passed in was constructed in JS and is not backed by a file on disk an empty string is returned.
 
-This method superceded the previous augmentation to the `File` object with the `path` property.  An example is included below.
+This method superseded the previous augmentation to the `File` object with the `path` property.  An example is included below.
 
 ```js
 // Before