helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: tools: clarify README linter error message

There was some confusion when landing https://github.com/nodejs/node/pull/59157 when the handle and the link doesn't match and the error message wasn't very clear about what's going on.

<!--
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: tools/lint-readme-lists.mjs
patch: @@ -6,7 +6,7 @@ import assert from 'node:assert';
 import { open } from 'node:fs/promises';
 import { argv } from 'node:process';
 
-const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/\1\) -$/;
+const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/(.+)\) -$/;
 const memberInfoLine = /^ {2}\*\*[^*]+\*\* <<[^@]+@.+\.[a-z]+>>( \(\w+(\/[^)/]+)+\))?( - \[Support me\]\(.+\))?$/;
 
 const lists = {
@@ -59,9 +59,11 @@ for await (const line of readme.readLines()) {
       );
     }
 
-    if (!ghHandleLine.test(line)) {
-      throw new Error(`${currentGithubHandle} is not formatted correctly (README.md:${lineNumber})`);
+    const match = line.match(ghHandleLine);
+    if (!match) {
+      throw new Error(`${line} should match ${ghHandleLine} (README.md:${lineNumber})`);
     }
+    assert.strictEqual(match[1], match[2], `GitHub handle does not match the URL (README.md:${lineNumber})`);
 
     if (
       currentList === 'TSC voting members' ||
Repository: huggingface/transformers
Pull request: [test] Fix test_eager_matches_sdpa incorrectly skipped

# What does this PR do?

After the introduction of `TransformersKwargs`, test_eager_matches_sdpa is incorrectly in the output_attentions case because the current `"output_attentions" in inspect.signature(model_sdpa.forward).parameters` is not enough to find `"output_attentions"` in typed kwargs.

Moreover, it seems to me that `GenericForTokenClassification` should also benefit from `TransformersKwargs` kwargs typing.

Changed files:
filename: src/transformers/modeling_layers.py
patch: @@ -262,7 +262,7 @@ def forward(
         inputs_embeds: Optional[torch.FloatTensor] = None,
         labels: Optional[torch.LongTensor] = None,
         use_cache: Optional[bool] = None,
-        **kwargs,
+        **kwargs: Unpack[TransformersKwargs],
     ) -> TokenClassifierOutput:
         outputs: BaseModelOutputWithPast = getattr(self, self.base_model_prefix)(
             input_ids,

filename: tests/test_modeling_common.py
patch: @@ -230,6 +230,20 @@ def _test_eager_matches_sdpa_inference(
 
     set_model_tester_for_less_flaky_test(self)
 
+    def _can_output_attn(model):
+        parameters = inspect.signature(model.forward).parameters
+        if "output_attentions" in parameters:
+            return True
+
+        kwargs_param = parameters.get("kwargs")
+        if kwargs_param is not None:
+            try:
+                annotation = kwargs_param.annotation.__args__
+                return "output_attentions" in annotation[0].__annotations__
+            except AttributeError:
+                return False
+        return False
+
     for model_class in self.all_model_classes:
         config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
         set_config_for_less_flaky_test(config)
@@ -263,7 +277,7 @@ def _test_eager_matches_sdpa_inference(
         set_model_for_less_flaky_test(model_eager)
         set_model_for_less_flaky_test(model_sdpa)
 
-        can_output_attn = "output_attentions" in inspect.signature(model_sdpa.forward).parameters
+        can_output_attn = _can_output_attn(model_sdpa)
         if not (self.has_attentions and can_output_attn) and output_attentions:
             self.skipTest(reason="Model does not support output_attentions")
 
@@ -370,7 +384,7 @@ def _test_eager_matches_sdpa_inference(
                 if "attention_mask" in inspect.signature(model_eager.forward).parameters:
                     processed_inputs["attention_mask"] = dummy_attention_mask
 
-                if self.has_attentions and "output_attentions" in inspect.signature(model_sdpa.forward).parameters:
+                if self.has_attentions and _can_output_attn(model_sdpa):
                     processed_inputs["output_attentions"] = output_attentions
             if "bool_masked_pos" in inspect.signature(model_eager.forward).parameters:
                 dummy_mask = torch.ones((self.model_tester.num_masks,))
Repository: ollama/ollama
Pull request: Add semantic kernel to Readme

We just released support for Ollama in the Python version of Semantic Kernel, this links directly there. Would love to move this to a package approach instead of using a http request, but that can be done once your work on that is completed as mentioned here #1857.

Changed files:
filename: README.md
patch: @@ -300,6 +300,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Ollama for Dart](https://github.com/breitburg/dart-ollama)
 - [Ollama for Laravel](https://github.com/cloudstudio/ollama-laravel)
 - [LangChainDart](https://github.com/davidmigloz/langchain_dart)
+- [Semantic Kernel - Python](https://github.com/microsoft/semantic-kernel/tree/main/python/semantic_kernel/connectors/ai/ollama)
 
 ### Mobile
Repository: electron/electron
Pull request: fix: crash on macOS dialog after `window-all-closed`

Backport of #46927

See that PR for details.


Notes: Fixed a crash that could occur when opening some dialogs as windows are closing on macOS.

Changed files:
filename: shell/browser/ui/cocoa/electron_ns_window.mm
patch: @@ -218,7 +218,7 @@ - (void)rotateWithEvent:(NSEvent*)event {
 }
 
 - (NSRect)contentRectForFrameRect:(NSRect)frameRect {
-  if (shell_->has_frame())
+  if (shell_ && shell_->has_frame())
     return [super contentRectForFrameRect:frameRect];
   else
     return frameRect;
Repository: ggml-org/llama.cpp
Pull request: vulkan: disable async for older Intel devices

Workaround/fix for #17302.

Changed files:
filename: ggml/src/ggml-vulkan/ggml-vulkan.cpp
patch: @@ -513,6 +513,7 @@ struct vk_device_struct {
     vk_queue compute_queue;
     vk_queue transfer_queue;
     bool single_queue;
+    bool support_async;
     uint32_t subgroup_size;
     uint32_t shader_core_count;
     bool uma;
@@ -4273,6 +4274,16 @@ static vk_device ggml_vk_get_device(size_t idx) {
         device->vendor_id = device->properties.vendorID;
         device->driver_id = driver_props.driverID;
 
+        // Implementing the async backend interfaces seems broken on older Intel HW,
+        // see https://github.com/ggml-org/llama.cpp/issues/17302.
+        device->support_async = (device->vendor_id != VK_VENDOR_ID_INTEL ||
+                                 std::string(device->properties.deviceName.data()).find("(DG1)") == std::string::npos) &&
+                                getenv("GGML_VK_DISABLE_ASYNC") == nullptr;
+
+        if (!device->support_async) {
+            GGML_LOG_DEBUG("ggml_vulkan: WARNING: Async execution disabled on certain Intel devices.\n");
+        }
+
         const char* GGML_VK_FORCE_MAX_ALLOCATION_SIZE = getenv("GGML_VK_FORCE_MAX_ALLOCATION_SIZE");
 
         if (GGML_VK_FORCE_MAX_ALLOCATION_SIZE != nullptr) {
@@ -13187,6 +13198,10 @@ static ggml_status ggml_backend_vk_graph_compute(ggml_backend_t backend, ggml_cg
         ctx->device->perf_logger->print_timings();
     }
 
+    if (!ctx->device->support_async) {
+        ggml_vk_synchronize(ctx);
+    }
+
     return GGML_STATUS_SUCCESS;
 
     UNUSED(backend);
@@ -13480,6 +13495,10 @@ ggml_backend_t ggml_backend_vk_init(size_t dev_num) {
         /* .context = */ ctx,
     };
 
+    if (!ctx->device->support_async) {
+        vk_backend->iface.get_tensor_async = nullptr;
+    }
+
     return vk_backend;
 }
Repository: vercel/next.js
Pull request: Fix index data route for adapter build-complete

Fixes another case caught by testing ensuring we normalize the `_next/data` filename correctly for `index`.

Changed files:
filename: packages/next/src/build/adapter/build-complete.ts
patch: @@ -851,7 +851,10 @@ export async function handleBuildComplete({
         outputs.prerenders.push(initialOutput)
 
         if (dataRoute) {
-          let dataFilePath = path.join(pagesDistDir, `${route}.json`)
+          let dataFilePath = path.join(
+            pagesDistDir,
+            `${route === '/' ? 'index' : route}.json`
+          )
 
           if (isAppPage) {
             // When experimental PPR is enabled, we expect that the data
Repository: ollama/ollama
Pull request: fix gpu_test.go Error (same type) uint64->uint32

When running the test suite on linux with a cuda build I get the following error without this commit:

```log
--- FAIL: TestBasicGetGPUInfo (0.06s)
    gpu_test.go:21: 
                Error Trace:    /build/ollama-cuda/src/ollama/gpu/gpu_test.go:21
                Error:          Elements should be the same type
                Test:           TestBasicGetGPUInfo
FAIL
FAIL    github.com/jmorganca/ollama/gpu 0.078s
```

This was due to a type mismatch between `GetGPUInfo()` and the corresponding `TestBasicGetGPUInfo()` test. This simple commit fixes it on the test side and now I get the following test output:

```log
ok      github.com/jmorganca/ollama/gpu 0.090s
```

(my first line of go btw.)

Changed files:
filename: gpu/gpu_test.go
patch: @@ -18,7 +18,7 @@ func TestBasicGetGPUInfo(t *testing.T) {
 	case "linux", "windows":
 		assert.Greater(t, info.TotalMemory, uint64(0))
 		assert.Greater(t, info.FreeMemory, uint64(0))
-		assert.Greater(t, info.DeviceCount, uint64(0))
+		assert.Greater(t, info.DeviceCount, uint32(0))
 	default:
 		return
 	}
Repository: nodejs/node
Pull request: benchmark: small lint fix on _cli.js

as titled

Changed files:
filename: benchmark/_cli.js
patch: @@ -140,8 +140,8 @@ CLI.prototype.getCpuCoreSetting = function() {
   const isValid = /^(\d+(-\d+)?)(,\d+(-\d+)?)*$/.test(value);
   if (!isValid) {
     throw new Error(`
-        Invalid CPUSET format: "${value}". Please use a single core number (e.g., "0"), 
-        a range of cores (e.g., "0-3"), or a list of cores/ranges 
+        Invalid CPUSET format: "${value}". Please use a single core number (e.g., "0"),
+        a range of cores (e.g., "0-3"), or a list of cores/ranges
         (e.g., "0,2,4" or "0-2,4").\n\n${this.usage}
     `);
   }
Repository: denoland/deno
Pull request: test: ignore flaky wpt test


Changed files:
filename: tests/wpt/runner/expectation.json
patch: @@ -15012,9 +15012,9 @@
         "ctor-undefined.html": false,
         "terminate.html": true,
         "use-base-url.html": false,
-        "same-origin.html": [
-          "non-parsable URL"
-        ]
+        "same-origin.html": {
+          "ignore": true
+        }
       },
       "SharedWorker": {
         "Infinity-arguments.html": false,
Repository: vercel/next.js
Pull request: Remove leading underscore for unhandledRejection envvar


Changed files:
filename: packages/next/src/server/node-environment-extensions/unhandled-rejection.tsx
patch: @@ -30,7 +30,7 @@ const MODE:
   | '0'
   | ''
   | string
-  | undefined = process.env.__NEXT_USE_UNHANDLED_REJECTION_FILTER
+  | undefined = process.env.NEXT_USE_UNHANDLED_REJECTION_FILTER
 
 let ENABLE_UHR_FILTER = false
 let DEBUG_UHR_FILTER = false
@@ -53,7 +53,7 @@ switch (MODE) {
   default:
     if (typeof MODE === 'string') {
       console.error(
-        `__NEXT_USE_UNHANDLED_REJECTION_FILTER has an unrecognized value: ${JSON.stringify(MODE)}. Use "enabled", "disabled", or "debug" or omit the environment variable altogether`
+        `NEXT_USE_UNHANDLED_REJECTION_FILTER has an unrecognized value: ${JSON.stringify(MODE)}. Use "enabled", "disabled", or "debug" or omit the environment variable altogether`
       )
     }
 }

filename: test/e2e/app-dir/cache-components-errors/cache-components-errors.test.ts
patch: @@ -11,7 +11,7 @@ describe('Cache Components Errors', () => {
     skipStart: !isNextDev,
     skipDeployment: true,
     env: {
-      __NEXT_USE_UNHANDLED_REJECTION_FILTER: 'enabled',
+      NEXT_USE_UNHANDLED_REJECTION_FILTER: 'enabled',
     },
   })
   const isRspack = !!process.env.NEXT_RSPACK
Repository: ollama/ollama
Pull request: Increase minimum CUDA memory allocation overhead and fix minimum overhead for multi-gpu

Fixes https://github.com/jmorganca/ollama/issues/1887

Changed files:
filename: gpu/gpu.go
patch: @@ -184,10 +184,11 @@ func getCPUMem() (memInfo, error) {
 func CheckVRAM() (int64, error) {
 	gpuInfo := GetGPUInfo()
 	if gpuInfo.FreeMemory > 0 && (gpuInfo.Library == "cuda" || gpuInfo.Library == "rocm") {
-		// leave 10% or 384Mi of VRAM free for unaccounted for overhead
-		overhead := gpuInfo.FreeMemory * uint64(gpuInfo.DeviceCount) / 10
-		if overhead < 384*1024*1024 {
-			overhead = 384 * 1024 * 1024
+		// leave 10% or 512MiB of VRAM free per GPU to handle unaccounted for overhead
+		overhead := gpuInfo.FreeMemory / 10
+		gpus := uint64(gpuInfo.DeviceCount)
+		if overhead < gpus*512*1024*1024 {
+			overhead = gpus * 512 * 1024 * 1024
 		}
 		return int64(gpuInfo.FreeMemory - overhead), nil
 	}

filename: llm/llm.go
patch: @@ -95,20 +95,26 @@ func New(workDir, model string, adapters, projectors []string, opts api.Options)
 				break
 			}
 
-			// no offloading required
-			if requiredTotal <= available {
-				break
-			}
-
-			// requiredAlloc is always loaded for the CUDA runner, so don't load it if it won't fit
-			if requiredAlloc > available {
+			// alloc buffer and kv cache is allocated as a fixed amount on the main gpu
+			// TODO: find the largest GPU and only reserve memory there
+			avgAvailable := available / int64(info.DeviceCount)
+			if requiredAlloc > avgAvailable {
 				log.Printf("not enough vram available, falling back to CPU only")
 				library = "cpu"
 				opts.NumGPU = 0
 				break
 			}
 
-			available -= requiredAlloc
+			// we don't know which GPU will be used, so estimate
+			// the scratch buffer space on all of them
+			// TODO: allocate less layers to the GPU with the scratch buffer
+			// and more to the others (based on their available memory)
+			available -= requiredAlloc * int64(info.DeviceCount)
+
+			// no offloading required
+			if requiredModel+requiredKv <= available {
+				break
+			}
 
 			// fill remaining vram with layers
 			log.Println("splitting", available, "of available memory bytes into layers")
Repository: electron/electron
Pull request: fix: allowed dialog file types with one filter

Backport of #46900

See that PR for details.


Notes: Fixed an issue where filters wouldn't apply in the specific case only one was passed.

Changed files:
filename: shell/browser/ui/file_dialog_mac.mm
patch: @@ -131,10 +131,6 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
     [file_types_list addObject:content_types_set];
   }
 
-  // Don't add file format picker.
-  if ([file_types_list count] <= 1)
-    return;
-
   NSArray* content_types = [file_types_list objectAtIndex:0];
 
   __block BOOL allowAllFiles = NO;
@@ -148,6 +144,10 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
 
   [dialog setAllowedContentTypes:allowAllFiles ? @[] : content_types];
 
+  // Don't add file format picker.
+  if ([file_types_list count] <= 1)
+    return;
+
   // Add file format picker.
   ElectronAccessoryView* accessoryView = [[ElectronAccessoryView alloc]
       initWithFrame:NSMakeRect(0.0, 0.0, 200, 32.0)];
Repository: vercel/next.js
Pull request: Fix type for unhandled rejection handler process.removeListener


Changed files:
filename: packages/next/src/server/node-environment-extensions/unhandled-rejection.tsx
patch: @@ -221,7 +221,7 @@ function installUnhandledRejectionFilter(): void {
       }
       // For other events, use the original method
       return originalProcessRemoveListener.call(process, event, listener)
-    } as typeof process.off
+    } as typeof process.removeListener
   )
 
   // If the process.on is referentially process.addListener then share the patched version as well
Repository: nodejs/node
Pull request: benchmark: drop misc/punycode benchmark

punycode has been deprecated and icu.toASCII
method does not exist. This benchmark file
has been failing for a while.

Changed files:
filename: benchmark/misc/punycode.js
patch: @@ -1,79 +0,0 @@
-'use strict';
-
-const common = require('../common.js');
-let icu;
-try {
-  icu = common.binding('icu');
-} catch {
-  // Continue regardless of error.
-}
-const punycode = require('punycode');
-
-const bench = common.createBenchmark(main, {
-  method: ['punycode'].concat(icu !== undefined ? ['icu'] : []),
-  n: [1024],
-  val: [
-    'افغانستا.icom.museum',
-    'الجزائر.icom.museum',
-    'österreich.icom.museum',
-    'বাংলাদেশ.icom.museum',
-    'беларусь.icom.museum',
-    'belgië.icom.museum',
-    'българия.icom.museum',
-    'تشادر.icom.museum',
-    '中国.icom.museum',
-    'القمر.icom.museum',
-    'κυπρος.icom.museum',
-    'českárepublika.icom.museum',
-    'مصر.icom.museum',
-    'ελλάδα.icom.museum',
-    'magyarország.icom.museum',
-    'ísland.icom.museum',
-    'भारत.icom.museum',
-    'ايران.icom.museum',
-    'éire.icom.museum',
-    'איקו״ם.ישראל.museum',
-    '日本.icom.museum',
-    'الأردن.icom.museum',
-  ],
-});
-
-function usingPunycode(val) {
-  punycode.toUnicode(punycode.toASCII(val));
-}
-
-function usingICU(val) {
-  icu.toUnicode(icu.toASCII(val));
-}
-
-function runPunycode(n, val) {
-  for (let i = 0; i < n; i++)
-    usingPunycode(val);
-  bench.start();
-  for (let i = 0; i < n; i++)
-    usingPunycode(val);
-  bench.end(n);
-}
-
-function runICU(n, val) {
-  bench.start();
-  for (let i = 0; i < n; i++)
-    usingICU(val);
-  bench.end(n);
-}
-
-function main({ n, val, method }) {
-  switch (method) {
-    case 'punycode':
-      runPunycode(n, val);
-      break;
-    case 'icu':
-      if (icu !== undefined) {
-        runICU(n, val);
-        break;
-      }
-      // fallthrough
-    default:
-      throw new Error(`Unexpected method "${method}"`);
-  }
-}
Repository: denoland/deno
Pull request: ci: increase node compat test timeout on Mac Intel

It appears that Mac Intel runners are slower than before and multiple tests fail to
complete in 10s. This PR increases timeout on Mac Intel to 20s.

Changed files:
filename: tests/node_compat/run_all_test_unmodified.ts
patch: @@ -28,7 +28,9 @@ const testSuitePath = new URL(import.meta.resolve("./runner/suite/"));
 const testDirUrl = new URL("runner/suite/test/", import.meta.url).href;
 const IS_CI = !!Deno.env.get("CI");
 // The timeout ms for single test execution. If a single test didn't finish in this timeout milliseconds, the test is considered as failure
-const TIMEOUT = IS_CI ? 10_000 : 5000;
+const TIMEOUT = IS_CI
+  ? Deno.build.os === "darwin" && Deno.build.arch === "x86_64" ? 20_000 : 10_000
+  : 5000;
 
 // The metadata of the test report
 export type TestReportMetadata = {
Repository: ollama/ollama
Pull request: Update submodule to `6efb8eb30e7025b168f3fda3ff83b9b386428ad6`


Changed files:
filename: llm/ext_server/ext_server.cpp
patch: @@ -111,6 +111,10 @@ void llama_server_stop() {
   // TODO - too verbose, remove once things are solid
   LOG_TEE("requesting llama server shutdown\n");
   ext_server_running = false;
+
+  // unblocks the update_slots() loop so it can clean up and exit
+  llama->request_cancel(0);
+
   ext_server_thread.join();
   delete llama;
   llama = NULL;

filename: llm/llama.cpp
patch: @@ -1 +1 @@
-Subproject commit 328b83de23b33240e28f4e74900d1d06726f5eb1
+Subproject commit 6efb8eb30e7025b168f3fda3ff83b9b386428ad6
Repository: ggml-org/llama.cpp
Pull request: Add Unsloth exporting to GGUF in tools

Hey! Just wanted to see if it's possible to add Unsloth under the <tools> section! Appreciate it immensely!

Changed files:
filename: README.md
patch: @@ -242,6 +242,7 @@ Instructions for adding support for new models: [HOWTO-add-model.md](docs/develo
 - [crashr/gppm](https://github.com/crashr/gppm) – launch llama.cpp instances utilizing NVIDIA Tesla P40 or P100 GPUs with reduced idle power consumption
 - [gpustack/gguf-parser](https://github.com/gpustack/gguf-parser-go/tree/main/cmd/gguf-parser) - review/check the GGUF file and estimate the memory usage
 - [Styled Lines](https://marketplace.unity.com/packages/tools/generative-ai/styled-lines-llama-cpp-model-292902) (proprietary licensed, async wrapper of inference part for game development in Unity3d with pre-built Mobile and Web platform wrappers and a model example)
+- [unslothai/unsloth](https://github.com/unslothai/unsloth) – 🦥 exports/saves fine-tuned and trained models to GGUF (Apache-2.0)
 
 </details>
Repository: facebook/react
Pull request: Don't allow blank issues

We're getting a ton of issues filed using the blank template, for example these airline support tickets: https://github.com/facebook/react/issues/29678


I think someone somewhere is linking to our issues with pre-filled content. This fixes it by forcing a template to be used.

Changed files:
filename: .github/ISSUE_TEMPLATE/config.yml
patch: @@ -1,3 +1,4 @@
+blank_issues_enabled: false
 contact_links:
     - name: 📃 Documentation Issue
       url: https://github.com/reactjs/react.dev/issues/new/choose