helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: bot for pr notifications

Going to take some testing to get this right

Changed files:
filename: .github/workflows/discord_notify.yml
patch: @@ -0,0 +1,22 @@
+name: Discord Notify
+
+on:
+  pull_request:
+    types: [ labeled ]
+    
+jobs:
+  notify:
+      if: ${{ github.event.label.name == 'React Core Team' }}
+      runs-on: ubuntu-latest
+      steps:
+        - name: Discord Webhook Action
+          uses: tsickert/discord-webhook@v6.0.0
+          with:
+              webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
+              embed-author-name: ${{ github.event.pull_request.user.login }}
+              embed-author-url: ${{ github.event.pull_request.user.html_url }}
+              embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
+              embed-title: '#${{ github.event.number }}: ${{ github.event.pull_request.title }}'
+              embed-description: ${{ github.event.pull_request.body }}
+              embed-url: ${{ github.event.pull_request.html_url }}
+            
\ No newline at end of file
Repository: facebook/react
Pull request: Fix notify target, add lines


Changed files:
filename: .github/workflows/discord_notify.yml
patch: @@ -1,22 +1,21 @@
 name: Discord Notify
 
 on:
-  pull_request:
+  pull_request_target:
     types: [ labeled ]
-    
+
 jobs:
   notify:
-      if: ${{ github.event.label.name == 'React Core Team' }}
-      runs-on: ubuntu-latest
-      steps:
-        - name: Discord Webhook Action
-          uses: tsickert/discord-webhook@v6.0.0
-          with:
-              webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
-              embed-author-name: ${{ github.event.pull_request.user.login }}
-              embed-author-url: ${{ github.event.pull_request.user.html_url }}
-              embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
-              embed-title: '#${{ github.event.number }}: ${{ github.event.pull_request.title }}'
-              embed-description: ${{ github.event.pull_request.body }}
-              embed-url: ${{ github.event.pull_request.html_url }}
-            
\ No newline at end of file
+    if: ${{ github.event.label.name == 'React Core Team' }}
+    runs-on: ubuntu-latest
+    steps:
+      - name: Discord Webhook Action
+        uses: tsickert/discord-webhook@v6.0.0
+        with:
+          webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
+          embed-author-name: ${{ github.event.pull_request.user.login }}
+          embed-author-url: ${{ github.event.pull_request.user.html_url }}
+          embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
+          embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
+          embed-description: ${{ github.event.pull_request.body }}
+          embed-url: ${{ github.event.pull_request.html_url }}
\ No newline at end of file
Repository: vercel/next.js
Pull request: Turbopack: add size_hint and len for Chunk iterator

### What?

add a size hint to the Chunk iterator to allow optimizations

Changed files:
filename: turbopack/crates/turbo-tasks/src/util.rs
patch: @@ -356,6 +356,17 @@ impl<T> Iterator for Chunk<T> {
             None
         }
     }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        let len = self.len();
+        (len, Some(len))
+    }
+}
+
+impl<T> ExactSizeIterator for Chunk<T> {
+    fn len(&self) -> usize {
+        self.end - self.index
+    }
 }
 
 impl<T> Drop for Chunk<T> {
Repository: ggml-org/llama.cpp
Pull request: Add build instruction to use Vulkan backend on macOS

It might sound weird but someone might need to use Vulkan on Mac (possibly in the absence of Linux machine while requiring Vulkan development). So I tried to fill in this missing part of documentation.

Changed files:
filename: docs/build.md
patch: @@ -495,6 +495,37 @@ Finally, after finishing your build, you should be able to do something like thi
 # ggml_vulkan: Using Intel(R) Graphics (ADL GT2) | uma: 1 | fp16: 1 | warp size: 32
 ```
 
+### For Mac users:
+
+Generally, follow LunarG's [Getting Started with the MacOS Vulkan SDK](https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html) guide for installation and setup of the Vulkan SDK. There are two options of Vulkan drivers on macOS, both of which implement translation layers to map Vulkan to Metal. They can be hot-swapped by setting the `VK_ICD_FILENAMES` environment variable to point to the respective ICD JSON file.
+
+Check the box for "KosmicKrisp" during the LunarG Vulkan SDK installation.
+
+Set environment variable for the LunarG Vulkan SDK after installation (and optionally add to your shell profile for persistence):
+```bash
+source /path/to/vulkan-sdk/setup-env.sh
+```
+
+#### Using MoltenVK
+
+MoltenVK is the default Vulkan driver installed with the LunarG Vulkan SDK on macOS, so you can use the above environment variable settings as is.
+
+#### Using KosmicKrisp
+
+Override the environment variable for KosmicKrisp:
+```bash
+export VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/libkosmickrisp_icd.json
+export VK_DRIVER_FILES=$VULKAN_SDK/share/vulkan/icd.d/libkosmickrisp_icd.json
+```
+
+#### Build
+
+This is the only step different from [above](#common-steps) instructions.
+```bash
+cmake -B build -DGGML_VULKAN=1 -DGGML_METAL=OFF
+cmake --build build --config Release
+```
+
 ## CANN
 This provides NPU acceleration using the AI cores of your Ascend NPU. And [CANN](https://www.hiascend.com/en/software/cann) is a hierarchical APIs to help you to quickly build AI applications and service based on Ascend NPU.
Repository: vuejs/vue
Pull request: Update CONTRIBUTING.md's jdfiddle template, and vue's version inside ISSUE_TEMPLATE.md

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->


Changed files:
filename: .github/CONTRIBUTING.md
patch: @@ -22,7 +22,7 @@ Hi! I’m really excited that you are interested in contributing to Vue.js. Befo
 
 - It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed.
 
-- It is recommended that you make a JSFiddle/JSBin/Codepen to demonstrate your issue. You could start with [this template](http://jsfiddle.net/5sH6A/) that already includes the latest version of Vue.
+- It is recommended that you make a JSFiddle/JSBin/Codepen to demonstrate your issue. You could start with [this template](http://jsfiddle.net/df4Lnuw6/) that already includes the latest version of Vue.
 
 - For bugs that involves build setups, you can create a reproduction repository with steps in the README.
 

filename: .github/ISSUE_TEMPLATE.md
patch: @@ -35,10 +35,11 @@ Remove the template from below and provide thoughtful commentary *and code sampl
 
 <!-- BUG REPORT TEMPLATE -->
 ### Vue.js version
-2.0.0-rc.1
+2.0.2
 
 ### Reproduction Link
 <!-- A minimal JSBin, JSFiddle, Codepen, or a GitHub repository that can reproduce the bug. -->
+<!-- You could start with this template: http://jsfiddle.net/df4Lnuw6/ -->
 
 ### Steps to reproduce
Repository: ggml-org/llama.cpp
Pull request: cuda : fix "V is K view" check for non-unified KV cache

#19057 

We weren't handling the case where both V and K are views of the same data with the same offset different from 0. This happens with split KV cache (e.g. `--parallel 4 --no-kv-unified`) and causes the flash attention to fall back to the CPU in such cases.

Changed files:
filename: common/arg.cpp
patch: @@ -1295,9 +1295,10 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
     ).set_env("LLAMA_ARG_CACHE_RAM").set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_CLI}));
     add_opt(common_arg(
         {"-kvu", "--kv-unified"},
+        {"-no-kvu", "--no-kv-unified"},
         "use single unified KV buffer shared across all sequences (default: enabled if number of slots is auto)",
-        [](common_params & params) {
-            params.kv_unified = true;
+        [](common_params & params, bool value) {
+            params.kv_unified = value;
         }
     ).set_env("LLAMA_ARG_KV_UNIFIED").set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_BATCHED}));
     add_opt(common_arg(

filename: ggml/src/ggml-cuda/fattn-common.cuh
patch: @@ -789,7 +789,7 @@ void launch_fattn(
     const ggml_tensor * K = dst->src[1];
     const ggml_tensor * V = dst->src[2];
 
-    const bool V_is_K_view = V->view_src && V->view_offs == 0 && (V->view_src == K || V->view_src == K->view_src);
+    const bool V_is_K_view = V->view_src && (V->view_src == K || (V->view_src == K->view_src && V->view_offs == K->view_offs));
 
     const ggml_tensor * mask  = dst->src[3];
     const ggml_tensor * sinks = dst->src[4];

filename: ggml/src/ggml-cuda/fattn.cu
patch: @@ -310,7 +310,7 @@ static best_fattn_kernel ggml_cuda_get_best_fattn_kernel(const int device, const
         }
     }
 
-    const bool V_is_K_view = V->view_src && V->view_offs == 0 && (V->view_src == K || V->view_src == K->view_src);
+    const bool V_is_K_view = V->view_src && (V->view_src == K || (V->view_src == K->view_src && V->view_offs == K->view_offs));
 
     const int cc = ggml_cuda_info().devices[device].cc;
Repository: ollama/ollama
Pull request: Disable paging for journalctl

Users using `journalctl` to get logs for issue logging sometimes don't realize that paging is causing information to be missed.

Changed files:
filename: docs/troubleshooting.md
patch: @@ -9,7 +9,7 @@ cat ~/.ollama/logs/server.log
 On **Linux** systems with systemd, the logs can be found with this command:
 
 ```shell
-journalctl -u ollama
+journalctl -u ollama --no-pager
 ```
 
 When you run Ollama in a **container**, the logs go to stdout/stderr in the container:
Repository: nodejs/node
Pull request: http: lazy allocate cookies array

<!--
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: lib/_http_outgoing.js
patch: @@ -673,20 +673,22 @@ OutgoingMessage.prototype.setHeaders = function setHeaders(headers) {
   // We also cannot safely split by comma.
   // To avoid setHeader overwriting the previous value we push
   // set-cookie values in array and set them all at once.
-  const cookies = [];
+  let cookies = null;
 
   for (const { 0: key, 1: value } of headers) {
     if (key === 'set-cookie') {
       if (ArrayIsArray(value)) {
+        cookies ??= [];
         cookies.push(...value);
       } else {
+        cookies ??= [];
         cookies.push(value);
       }
       continue;
     }
     this.setHeader(key, value);
   }
-  if (cookies.length) {
+  if (cookies != null) {
     this.setHeader('set-cookie', cookies);
   }
Repository: ollama/ollama
Pull request: Add Gemma 2 2b


Changed files:
filename: README.md
patch: @@ -54,6 +54,7 @@ Here are some example models that can be downloaded:
 | Llama 3.1          | 405B       | 231GB | `ollama run llama3.1:405b`     |
 | Phi 3 Mini         | 3.8B       | 2.3GB | `ollama run phi3`              |
 | Phi 3 Medium       | 14B        | 7.9GB | `ollama run phi3:medium`       |
+| Gemma 2            | 2B         | 1.6GB | `ollama run gemma2:2b`         |
 | Gemma 2            | 9B         | 5.5GB | `ollama run gemma2`            |
 | Gemma 2            | 27B        | 16GB  | `ollama run gemma2:27b`        |
 | Mistral            | 7B         | 4.1GB | `ollama run mistral`           |
Repository: huggingface/transformers
Pull request: [`CI`] Skip `EfficientLoFTR` test

As per title, added a fixme @yonigozlan 

This is hotfix (as it blocks CI) but tbh we should not inherit from other classes, i.e. SuperGlue. Not sure how many of these cases are still hidden.

Changed files:
filename: tests/models/efficientloftr/test_image_processing_efficientloftr.py
patch: @@ -128,3 +128,8 @@ def test_fast_is_faster_than_slow(self):
         self.assertLessEqual(
             fast_time, slow_time * 1.2, "Fast processor should not be significantly slower than slow processor"
         )
+
+    # TODO: FIXME @yonigozlan
+    @unittest.skip(reason="failing after #42018")
+    def test_post_processing_keypoint_matching_with_padded_match_indices(self):
+        pass
Repository: electron/electron
Pull request: fix: unexpected `openExternal` dialog on macOS Tahoe

Backport of #48502

See that PR for details.


Notes: Fixed an issue where `shell.openExternal` caused an unexpected dialog to open when there was no app suitable to open the url.

Changed files:
filename: shell/common/platform_util_mac.mm
patch: @@ -148,6 +148,12 @@ void OpenExternal(const GURL& url,
     return;
   }
 
+  // Check this to prevent system dialog from popping up on macOS Tahoe.
+  if (![[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:ns_url]) {
+    std::move(callback).Run("No application found to open URL");
+    return;
+  }
+
   NSWorkspaceOpenConfiguration* configuration =
       [NSWorkspaceOpenConfiguration configuration];
   configuration.activates = options.activate;

filename: spec/api-shell-spec.ts
patch: @@ -82,6 +82,11 @@ describe('shell module', () => {
       ]);
     });
 
+    ifit(process.platform === 'darwin')('throws when there is no application registered to open the URL', async () => {
+      const url = `unknownscheme-${Date.now()}://test`;
+      await expect(shell.openExternal(url)).to.eventually.be.rejectedWith(/No application found to open URL/);
+    });
+
     it('opens an external link in the renderer', async () => {
       const { url, requestReceived } = await urlOpened();
       const w = new BrowserWindow({ show: false, webPreferences: { sandbox: false, contextIsolation: false, nodeIntegration: true } });
Repository: vuejs/vue
Pull request: typo fix

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->


Changed files:
filename: src/platforms/web/runtime/components/transition.js
patch: @@ -22,7 +22,7 @@ export const transitionProps = {
 }
 
 // in case the child is also an abstract component, e.g. <keep-alive>
-// we want to recrusively retrieve the real component to be rendered
+// we want to recursively retrieve the real component to be rendered
 function getRealChild (vnode: ?VNode): ?VNode {
   const compOptions = vnode && vnode.componentOptions
   if (compOptions && compOptions.Ctor.options.abstract) {
Repository: huggingface/transformers
Pull request: [loading] Use fewer threads by default for much better performances

# What does this PR do?

As per the title.
After a lot of experimentation and reading on the subject, having fewer threads is much more performant than 16 for our loading pipeline (I/O bound operations). This is because otherwise they compete too much with each others.

For example, on a 45B parameters models, the following snippet:

```python
from transformers import AutoModelForCausalLM
import torch
import time

model_id = "mistralai/Mixtral-8x7B-v0.1"
device = "auto"

torch.cuda.synchronize()
t0 = time.time()
model = AutoModelForCausalLM.from_pretrained(model_id, device_map=device, dtype=torch.float16)
torch.cuda.synchronize()
dt = time.time() - t0
print(f"Took {dt:.2f} s")
```

takes about `51.07 s` on `main` vs `20.98 s` on this branch, on our cluster (H100 gpus)

So having fewer threads actually goes more than 2x faster!! 
For completeness, if we try using `GLOBAL_WORKERS = 1` (i.e. no parallelism), then it takes about `30.02 s`. Using `8` is still too much and gives `27.58 s`.
So 4 seem to be the sweet spot.

NOTE FOR THE FUTURE:
The benchmark uses fp16, which is not the native dtype of the checkpoint (bf16), so an additional copy to cast is needed. When loading in bf16, using 4 or 16 threads leads to ~15s for both. So it seems that 4 is anyway the best default here, but the bottleneck is maybe not I/O bound -> depending on whether `tensor.to(dtype, device)` performs the dtype casting on cpu or on the device where it's sent (not sure of the operation order), it may be cpu-bound

Changed files:
filename: src/transformers/core_model_loading.py
patch: @@ -359,7 +359,10 @@ def convert(self, layer_name: str, config=None, quantizer=None, missing_keys: Op
         return collected_tensors, misc
 
 
-GLOBAL_WORKERS = min(16, (os.cpu_count() or 8) * 2)  # NVMe: 8-16; HDD/NFS: 2-4
+# For I/O bound operations (i.e. here reading files), it is better to have fewer threads, e.g. 4 is a good default.
+# Having too many is actually harming performances quite a lot, i.e. using 16 can sometimes lead to taking TWICE
+# as much time to load the same model
+GLOBAL_WORKERS = min(4, os.cpu_count() or 4)
 
 
 def _materialize_copy(tensor, device=None, dtype=None):
Repository: vercel/next.js
Pull request: [next-upgrade] Force install of dev dependencies

When `NODE_ENV=production` is set, `install` will default to installing production dependencies. However, we need all dependencies to be present after we upgraded Next.js. `--production=false` is not implemented by every package manager (e.g. later Yarn versions)

`NODE_ENV=production` may be set from the parent process e.g. in the upcoming `next upgrade`.

Changed files:
filename: packages/next-codemod/lib/handle-package.ts
patch: @@ -123,6 +123,13 @@ export function runInstallation(
   try {
     execa.sync(packageManager, ['install'], {
       cwd: options.cwd,
+      env: {
+        ...process.env,
+        // In case NODE_ENV=production is set, we still want dev dependencies to
+        // be installed. Otherwise we won't be able to check for peer dependencies.
+        // --production=false is not implemented by every package manager.
+        NODE_ENV: 'development',
+      },
       stdio: 'inherit',
       shell: true,
     })
Repository: nodejs/node
Pull request: doc: remove Corepack documentation page

Following up on https://github.com/nodejs/node/pull/57635, let's remove the page. Adding dont-land labels as a cautionary step to avoid 404 in case there are links in the wild to that page. Landing it on 24.x should be fine as long as it lands before 24.0.0.

<!--
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/corepack.md
patch: @@ -1,20 +0,0 @@
-# Corepack
-
-<!-- introduced_in=v14.19.0 -->
-
-<!-- type=misc -->
-
-<!-- YAML
-added:
-  - v16.9.0
-  - v14.19.0
--->
-
-> Stability: 1 - Experimental
-
-**Corepack will no longer be distributed starting with Node.js v25.**
-
-Users currently depending on the bundled `corepack` executable from Node.js
-can switch to using the userland-provided [corepack][] module.
-
-[corepack]: https://github.com/nodejs/corepack

filename: test/doctool/test-make-doc.mjs
patch: @@ -45,7 +45,7 @@ const linkedHtmls = [...new Set(links)].map((link) => link.match(re)[1])
 const expectedJsons = linkedHtmls
                        .map((name) => name.replace('.html', '.json'));
 const expectedDocs = linkedHtmls.concat(expectedJsons);
-const renamedDocs = ['corepack.json', 'corepack.html', 'policy.json', 'policy.html'];
+const renamedDocs = ['policy.json', 'policy.html'];
 const skipedDocs = ['quic.json', 'quic.html'];
 
 // Test that all the relative links in the TOC match to the actual documents.
Repository: ggml-org/llama.cpp
Pull request: server : adjust spec tests to generate up to 16 tokens

On DGX Spark these tests have bee failing because after about 60 tokens the generation starts to deviate which is expected due to the variable batch size. Limiting this to 16 tokens should make things more resilient to small numerical differences between spec and no-spec.

Changed files:
filename: tools/server/tests/unit/test_speculative.py
patch: @@ -30,6 +30,7 @@ def test_with_and_without_draft():
         "prompt": "I believe the meaning of life is",
         "temperature": 0.0,
         "top_k": 1,
+        "n_predict": 16,
     })
     assert res.status_code == 200
     content_no_draft = res.body["content"]
@@ -42,6 +43,7 @@ def test_with_and_without_draft():
         "prompt": "I believe the meaning of life is",
         "temperature": 0.0,
         "top_k": 1,
+        "n_predict": 16,
     })
     assert res.status_code == 200
     content_draft = res.body["content"]
@@ -68,6 +70,7 @@ def test_different_draft_min_draft_max():
             "prompt": "I believe the meaning of life is",
             "temperature": 0.0,
             "top_k": 1,
+            "n_predict": 16,
         })
         assert res.status_code == 200
         if last_content is not None: