helloadhavan/github_issues huggingface dataset:
Repository: ollama/ollama
Pull request: gpu: Group GPU Library sets by variant

The recent cuda variant changes uncovered a bug in ByLibrary which failed to group by common variant for GPU types.

New unit test fails without the 1 line fix, and passes with.

Fixes #6479 

Changed files:
filename: gpu/gpu_test.go
patch: @@ -32,4 +32,29 @@ func TestCPUMemInfo(t *testing.T) {
 	}
 }
 
+func TestByLibrary(t *testing.T) {
+	type testCase struct {
+		input  []GpuInfo
+		expect int
+	}
+
+	testCases := map[string]*testCase{
+		"empty":                    {input: []GpuInfo{}, expect: 0},
+		"cpu":                      {input: []GpuInfo{{Library: "cpu"}}, expect: 1},
+		"cpu + GPU":                {input: []GpuInfo{{Library: "cpu"}, {Library: "cuda"}}, expect: 2},
+		"cpu + 2 GPU no variant":   {input: []GpuInfo{{Library: "cpu"}, {Library: "cuda"}, {Library: "cuda"}}, expect: 2},
+		"cpu + 2 GPU same variant": {input: []GpuInfo{{Library: "cpu"}, {Library: "cuda", Variant: "v11"}, {Library: "cuda", Variant: "v11"}}, expect: 2},
+		"cpu + 2 GPU diff variant": {input: []GpuInfo{{Library: "cpu"}, {Library: "cuda", Variant: "v11"}, {Library: "cuda", Variant: "v12"}}, expect: 3},
+	}
+
+	for k, v := range testCases {
+		t.Run(k, func(t *testing.T) {
+			resp := (GpuInfoList)(v.input).ByLibrary()
+			if len(resp) != v.expect {
+				t.Fatalf("expected length %d, got %d => %+v", v.expect, len(resp), resp)
+			}
+		})
+	}
+}
+
 // TODO - add some logic to figure out card type through other means and actually verify we got back what we expected

filename: gpu/types.go
patch: @@ -94,7 +94,7 @@ func (l GpuInfoList) ByLibrary() []GpuInfoList {
 			}
 		}
 		if !found {
-			libs = append(libs, info.Library)
+			libs = append(libs, requested)
 			resp = append(resp, []GpuInfo{info})
 		}
 	}
Repository: vuejs/vue
Pull request: Don't cast empty string to Boolean if prop types include String and Boolean (fix #4538)

Additional info in issue  #4538

Changed files:
filename: src/core/util/props.js
patch: @@ -21,10 +21,10 @@ export function validateProp (
   const absent = !hasOwn(propsData, key)
   let value = propsData[key]
   // handle boolean props
-  if (isBooleanType(prop.type)) {
+  if (isType(Boolean, prop.type)) {
     if (absent && !hasOwn(prop, 'default')) {
       value = false
-    } else if (value === '' || value === hyphenate(key)) {
+    } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {
       value = true
     }
   }
@@ -168,12 +168,12 @@ function getType (fn) {
   return match && match[1]
 }
 
-function isBooleanType (fn) {
+function isType (type, fn) {
   if (!Array.isArray(fn)) {
-    return getType(fn) === 'Boolean'
+    return getType(fn) === getType(type)
   }
   for (let i = 0, len = fn.length; i < len; i++) {
-    if (getType(fn[i]) === 'Boolean') {
+    if (getType(fn[i]) === getType(type)) {
       return true
     }
   }
Repository: ggml-org/llama.cpp
Pull request: vulkan: disable coopmat1 flash attention on Nvidia Turing

See https://github.com/ggml-org/llama.cpp/pull/19075#issuecomment-3820716090

Changed files:
filename: ggml/src/ggml-vulkan/ggml-vulkan.cpp
patch: @@ -254,6 +254,7 @@ enum vk_device_architecture {
     AMD_RDNA3,
     INTEL_XE2,
     NVIDIA_PRE_TURING,
+    NVIDIA_TURING,
 };
 
 static vk_device_architecture get_device_architecture(const vk::PhysicalDevice& device) {
@@ -336,18 +337,34 @@ static vk_device_architecture get_device_architecture(const vk::PhysicalDevice&
         const std::vector<vk::ExtensionProperties> ext_props = device.enumerateDeviceExtensionProperties();
 
         bool cooperative_matrix = false;
+        bool sm_builtins = false;
 
         // Detect "pre-turing" based on lack of coopmat support.
         for (const auto& properties : ext_props) {
             if (strcmp("VK_KHR_cooperative_matrix", properties.extensionName) == 0) {
                 cooperative_matrix = true;
-                break;
+            } else if (strcmp("VK_NV_shader_sm_builtins", properties.extensionName) == 0) {
+                sm_builtins = true;
             }
         }
 
         if (!cooperative_matrix) {
             return vk_device_architecture::NVIDIA_PRE_TURING;
         }
+
+        if (sm_builtins) {
+            vk::PhysicalDeviceProperties2 props2;
+            vk::PhysicalDeviceShaderSMBuiltinsPropertiesNV sm_props;
+
+            props2.pNext = &sm_props;
+
+            device.getProperties2(&props2);
+
+            // Turing has 32, following architectures have 48
+            if (sm_props.shaderWarpsPerSM == 32) {
+                return vk_device_architecture::NVIDIA_TURING;
+            }
+        }
     }
     return vk_device_architecture::OTHER;
 }
@@ -8460,6 +8477,11 @@ static void ggml_vk_flash_attn(ggml_backend_vk_context * ctx, vk_context& subctx
     FaCodePath path = ctx->device->coopmat2 ? FA_COOPMAT2 :
                       ctx->device->coopmat1_fa_support ? FA_COOPMAT1 : FA_SCALAR;
 
+    if (path == FA_COOPMAT1 && ctx->device->architecture == vk_device_architecture::NVIDIA_TURING) {
+        // Nvidia compiler bug, see https://github.com/ggml-org/llama.cpp/pull/19075#issuecomment-3820716090
+        path = FA_SCALAR;
+    }
+
     if (path == FA_COOPMAT1) {
         const bool coopmat_shape_supported = (dst->op_params[3] == GGML_PREC_F32 && ctx->device->coopmat_support_16x16x16_f32acc) ||
                                              (dst->op_params[3] != GGML_PREC_F32 && ctx->device->coopmat_support_16x16x16_f16acc);
Repository: huggingface/transformers
Pull request: replace source_keys and target_keys

# What does this PR do?

This PR replaces `source_keys` to `source_patterns` and `target_keys` to `target_patterns`. @Cyrilvallez  forgot to update those probably because the PR was merged quite recently. Pls merge this direct as the CI is struggling

Changed files:
filename: src/transformers/quantizers/quantizer_bnb_4bit.py
patch: @@ -306,7 +306,7 @@ def get_weight_conversions(self):
         if self.pre_quantized:
             return [
                 WeightConverter(
-                    source_keys=[
+                    source_patterns=[
                         "weight.nested_absmax",
                         "weight.nested_quant_map",
                         "weight.quant_map",
@@ -315,7 +315,7 @@ def get_weight_conversions(self):
                         "weight.quant_state.bitsandbytes__fp4",
                         "weight",
                     ],
-                    target_keys="weight",
+                    target_patterns="weight",
                     operations=[Bnb4bitDeserialize(self)],
                 )
             ]

filename: src/transformers/quantizers/quantizer_bnb_8bit.py
patch: @@ -254,8 +254,8 @@ def get_weight_conversions(self):
         if self.pre_quantized:
             return [
                 WeightConverter(
-                    source_keys=["SCB", "weight_format", "weight"],
-                    target_keys="weight",
+                    source_patterns=["SCB", "weight_format", "weight"],
+                    target_patterns="weight",
                     operations=[Bnb8bitDeserialize(self)],
                 )
             ]

filename: src/transformers/quantizers/quantizer_mxfp4.py
patch: @@ -443,16 +443,16 @@ def get_weight_conversions(self):
             if self.quantization_config.dequantize:
                 return [
                     WeightConverter(
-                        source_keys=["_blocks", "_scales"],
-                        target_keys="",
+                        source_patterns=["_blocks", "_scales"],
+                        target_patterns="",
                         operations=[Mxfp4Dequantize(self)],
                     )
                 ]
             else:
                 return [
                     WeightConverter(
-                        source_keys=["_blocks", "_scales"],
-                        target_keys="",
+                        source_patterns=["_blocks", "_scales"],
+                        target_patterns="",
                         operations=[Mxfp4Deserialize(self)],
                     )
                 ]
Repository: facebook/react
Pull request: [ci] Try to parallelize devtools builds


Building DevTools is currently the long pole for the runtime CI job. Let's see if we can get the overall runtime for runtime build and test down by speeding this one step up.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32266).
* #32267
* __->__ #32266

Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -501,6 +501,9 @@ jobs:
     name: Build DevTools and process artifacts
     needs: build_and_lint
     runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        browser: [chrome, firefox, edge]
     steps:
       - uses: actions/checkout@v4
         with:
@@ -525,27 +528,22 @@ jobs:
           pattern: _build_*
           path: build
           merge-multiple: true
-      - run: ./scripts/ci/pack_and_store_devtools_artifacts.sh
+      - run: ./scripts/ci/pack_and_store_devtools_artifacts.sh ${{ matrix.browser }}
         env:
           RELEASE_CHANNEL: experimental
       - name: Display structure of build
         run: ls -R build
       - name: Archive devtools build
         uses: actions/upload-artifact@v4
         with:
-          name: react-devtools
+          name: react-devtools-${{ matrix.browser }}
           path: build/devtools.tgz
       # Simplifies getting the extension for local testing
-      - name: Archive chrome extension
-        uses: actions/upload-artifact@v4
-        with:
-          name: react-devtools-chrome-extension
-          path: build/devtools/chrome-extension.zip
-      - name: Archive firefox extension
+      - name: Archive ${{ matrix.browser }} extension
         uses: actions/upload-artifact@v4
         with:
-          name: react-devtools-firefox-extension
-          path: build/devtools/firefox-extension.zip
+          name: react-devtools-${{ matrix.browser }}-extension
+          path: build/devtools/${{ matrix.browser }}-extension.zip
 
   run_devtools_e2e_tests:
     name: Run DevTools e2e tests

filename: scripts/ci/pack_and_store_devtools_artifacts.sh
patch: @@ -17,10 +17,16 @@ npm pack
 mv ./react-devtools-inline*.tgz ../../build/devtools/
 
 cd ../react-devtools-extensions
-yarn build
-mv ./chrome/build/ReactDevTools.zip ../../build/devtools/chrome-extension.zip
-mv ./firefox/build/ReactDevTools.zip ../../build/devtools/firefox-extension.zip
+if [[ -n "$1" ]]; then
+  yarn build:$1
+  mv ./$1/build/ReactDevTools.zip ../../build/devtools/$1-extension.zip
+else
+  yarn build
+  for browser in chrome firefox edge; do
+    mv ./$browser/build/ReactDevTools.zip ../../build/devtools/$browser-extension.zip
+  done
+fi
 
 # Compress all DevTools artifacts into a single tarball for easy download
 cd ../../build/devtools
-tar -zcvf ../devtools.tgz .
\ No newline at end of file
+tar -zcvf ../devtools.tgz .
Repository: facebook/react
Pull request: [ci] Only install chromium for flight fixtures


I noticed we only use chromium in fixtures/flight, so let's specifically only install that browser in ci.


Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -476,9 +476,7 @@ jobs:
           fi
       - name: Playwright install deps
         working-directory: fixtures/flight
-        run: |
-          npx playwright install
-          sudo npx playwright install-deps
+        run: npx playwright install --with-deps chromium
       - name: Run tests
         working-directory: fixtures/flight
         run: yarn test
Repository: vuejs/vue
Pull request: update dom prop for option.value (fix #4494)

fix #4494 

Changed files:
filename: src/platforms/web/runtime/modules/dom-props.js
patch: @@ -2,6 +2,9 @@
 
 import { extend, toNumber } from 'shared/util'
 
+// check platforms/web/util/attrs.js acceptValue
+declare type acceptValueElm = HTMLInputElement | HTMLSelectElement | HTMLOptionElement
+
 function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
   if (!oldVnode.data.domProps && !vnode.data.domProps) {
     return
@@ -35,10 +38,7 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
       elm._value = cur
       // avoid resetting cursor position when value is the same
       const strCur = cur == null ? '' : String(cur)
-      if (!elm.composing && (
-        (document.activeElement !== elm && elm.value !== strCur) ||
-        isValueChanged(vnode, strCur)
-      )) {
+      if (needUpdateValue(elm, vnode, strCur)) {
         elm.value = strCur
       }
     } else {
@@ -47,7 +47,20 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
   }
 }
 
-function isValueChanged (vnode: VNodeWithData, newVal: string): boolean {
+function needUpdateValue (elm: acceptValueElm, vnode: VNodeWithData, checkVal: string): boolean {
+  // inputing
+  if (elm.composing) return false
+  if (elm.tagName.toLowerCase() === 'option') return true
+  if (isDirty(elm, checkVal)) return true
+  if (isInputChanged(vnode, checkVal)) return true
+  return false
+}
+
+function isDirty (elm: acceptValueElm, checkVal: string): boolean {
+  return document.activeElement !== elm && elm.value !== checkVal
+}
+
+function isInputChanged (vnode: VNodeWithData, newVal: string): boolean {
   const value = vnode.elm.value
   const modifiers = vnode.elm._vModifiers // injected by v-model runtime
   if ((modifiers && modifiers.number) || vnode.elm.type === 'number') {

filename: test/unit/features/directives/bind.spec.js
patch: @@ -248,6 +248,17 @@ describe('Directive v-bind', () => {
     expect('v-bind without argument expects an Object or Array value').toHaveBeenWarned()
   })
 
+  it('set value for option element', () => {
+    const vm = new Vue({
+      template: '<select><option :value="val">val</option></select>',
+      data: {
+        val: 'val'
+      }
+    }).$mount()
+    // check value attribute
+    expect(vm.$el.options[0].getAttribute('value')).toBe('val')
+  })
+
   // a vdom patch edge case where the user has several un-keyed elements of the
   // same tag next to each other, and toggling them.
   it('properly update for toggling un-keyed children', done => {
Repository: ollama/ollama
Pull request: update faq

clarify https proxy faq

related #4834 
related #1337 

Changed files:
filename: docs/faq.md
patch: @@ -111,7 +111,10 @@ On Windows, Ollama inherits your user and system environment variables.
 
 ## How do I use Ollama behind a proxy?
 
-Ollama is compatible with proxy servers if `HTTP_PROXY` or `HTTPS_PROXY` are configured. When using either variables, ensure it is set where `ollama serve` can access the values. When using `HTTPS_PROXY`, ensure the proxy certificate is installed as a system certificate. Refer to the section above for how to use environment variables on your platform.
+Ollama pulls models from the Internet and may require a proxy server to access the models. Use `HTTPS_PROXY` to redirect outbound requests through the proxy. Ensure the proxy certificate is installed as a system certificate. Refer to the section above for how to use environment variables on your platform.
+
+> [!NOTE]
+> Avoid setting `HTTP_PROXY`. Ollama does not use HTTP for model pulls, only HTTPS. Setting `HTTP_PROXY` may interrupt client connections to the server.
 
 ### How do I use Ollama behind a proxy in Docker?
 
@@ -276,4 +279,4 @@ Note: Windows with Radeon GPUs currently default to 1 model maximum due to limit
 
 ## How does Ollama load models on multiple GPUs?
 
-Installing multiple GPUs of the same brand can be a great way to increase your available VRAM to load larger models.  When you load a new model, Ollama evaluates the required VRAM for the model against what is currently available.  If the model will entirely fit on any single GPU, Ollama will load the model on that GPU.  This typically provides the best performance as it reduces the amount of data transfering across the PCI bus during inference.  If the model does not fit entirely on one GPU, then it will be spread across all the available GPUs.
\ No newline at end of file
+Installing multiple GPUs of the same brand can be a great way to increase your available VRAM to load larger models.  When you load a new model, Ollama evaluates the required VRAM for the model against what is currently available.  If the model will entirely fit on any single GPU, Ollama will load the model on that GPU.  This typically provides the best performance as it reduces the amount of data transfering across the PCI bus during inference.  If the model does not fit entirely on one GPU, then it will be spread across all the available GPUs.
Repository: huggingface/transformers
Pull request: Fix T5 tests: use generation_config for generation parameters

- Update T5 integration tests to use `model.generation_config` instead of  `model.config` for generation parameters. Updated `use_task_specific_params()` to properly separate generation and config parameters, and fixed affected 
tests to comply with the new generation configuration system. 

Fix : 
`test_small_generation`
`test_summarization`
`test_translation_en_to_de` 
`test_translation_en_to_fr` 
`test_translation_en_to_ro` 


- Update expectation for `meta-llama/Llama-2-7b-hf` on rocm 

Fix: 
`test_model_7b_logits_bf16`

Changed files:
filename: tests/models/llama/test_modeling_llama.py
patch: @@ -117,7 +117,7 @@ def test_model_7b_logits_bf16(self):
             ("xpu", 3): torch.tensor([[-6.5208, -4.1218, -4.9377, -3.2536,  0.8127, -2.9811,  1.2918, -3.3848]]),
             ("cuda", 7): torch.tensor([[-6.5061, -4.1147, -4.9669, -3.2038, 0.8069, -2.9694, 1.2864, -3.3786]]),
             ("cuda", 8): torch.tensor([[-6.5208, -4.1218, -4.9377, -3.2536,  0.8127, -2.9811,  1.2918, -3.3848]]),
-            ("rocm", (9, 4)): torch.tensor([[-6.5094, -4.1329, -4.9754, -3.5042,  0.8082, -2.9443,  1.2830, -3.3539]]),
+            ("rocm", (9, 4)): torch.tensor([[-6.5067, -4.1154, -4.9819, -3.1408,  0.8117, -2.9435,  1.2883, -3.3221]]),
         })
 
         expected_mean = expected_means.get_expectation().to(torch_device)

filename: tests/models/t5/test_modeling_t5.py
patch: @@ -47,6 +47,7 @@
     from transformers import (
         AutoTokenizer,
         ByT5Tokenizer,
+        GenerationConfig,
         T5EncoderModel,
         T5ForConditionalGeneration,
         T5ForQuestionAnswering,
@@ -932,7 +933,17 @@ def is_pipeline_test_to_skip(
 
 
 def use_task_specific_params(model, task):
-    model.config.update(model.config.task_specific_params[task])
+    task_params = model.config.task_specific_params[task]
+
+    # Get all valid GenerationConfig attributes
+    temp_config = GenerationConfig()
+    generation_config_attrs = set(temp_config.to_dict().keys())
+
+    for key, value in task_params.items():
+        if key in generation_config_attrs:
+            setattr(model.generation_config, key, value)
+        else:
+            setattr(model.config, key, value)
 
 
 @require_torch
@@ -1032,14 +1043,11 @@ def test_torch_quant(self):
     @slow
     def test_small_generation(self):
         model = T5ForConditionalGeneration.from_pretrained("google-t5/t5-small").to(torch_device)
-        model.config.max_length = 8
-        model.config.num_beams = 1
-        model.config.do_sample = False
         tokenizer = T5Tokenizer.from_pretrained("google-t5/t5-small")
 
         input_ids = tokenizer("summarize: Hello there", return_tensors="pt").input_ids.to(torch_device)
 
-        sequences = model.generate(input_ids)
+        sequences = model.generate(input_ids, max_length=8, num_beams=1, do_sample=False)
 
         output_str = tokenizer.batch_decode(sequences, skip_special_tokens=True)[0]
         self.assertTrue(output_str == "Hello there!")
Repository: vercel/next.js
Pull request: Revert "Turbopack: add bundle-analyzer to versioning and add dependen…

…cy (#86355)"

This reverts commit 5b97f1f7b51dddfc1df42e0bd03730f90ebc9337.

Investigating if it fixes broken publishes.

Changed files:
filename: apps/bundle-analyzer/package.json
patch: @@ -1,6 +1,6 @@
 {
   "name": "@next/bundle-analyzer-ui",
-  "version": "16.0.2-canary.27",
+  "version": "16.0.2-canary.16",
   "private": true,
   "scripts": {
     "build": "cross-env NEXT_TEST_NATIVE_DIR=no next build --no-mangling",

filename: lerna.json
patch: @@ -2,8 +2,7 @@
   "npmClient": "pnpm",
   "useWorkspaces": true,
   "packages": [
-    "packages/*",
-    "apps/bundle-analyzer"
+    "packages/*"
   ],
   "command": {
     "version": {

filename: packages/next/package.json
patch: @@ -162,7 +162,6 @@
     "@modelcontextprotocol/sdk": "1.18.1",
     "@mswjs/interceptors": "0.23.0",
     "@napi-rs/triples": "1.2.0",
-    "@next/bundle-analyzer-ui": "16.0.2-canary.27",
     "@next/font": "16.0.2-canary.28",
     "@next/polyfill-module": "16.0.2-canary.28",
     "@next/polyfill-nomodule": "16.0.2-canary.28",

filename: pnpm-lock.yaml
patch: @@ -1200,9 +1200,6 @@ importers:
       '@napi-rs/triples':
         specifier: 1.2.0
         version: 1.2.0
-      '@next/bundle-analyzer-ui':
-        specifier: 16.0.2-canary.27
-        version: link:../../apps/bundle-analyzer
       '@next/font':
         specifier: 16.0.2-canary.28
         version: link:../font
Repository: ggml-org/llama.cpp
Pull request: models : remove unnecessary cont in openelm

Missed leftover.

Changed files:
filename: src/models/openelm.cpp
patch: @@ -43,7 +43,7 @@ llm_build_openelm::llm_build_openelm(const llama_model & model, const llm_graph_
             ggml_tensor * Kcur = ggml_view_3d(ctx0, cur, n_embd_head, n_head_kv, n_tokens, cur->nb[1], cur->nb[2], cur->nb[1]*n_head);
             cb(Kcur, "Kcur", il);
 
-            ggml_tensor * Vcur = ggml_cont(ctx0, ggml_view_3d(ctx0, cur, n_embd_head, n_head_kv, n_tokens, cur->nb[1], cur->nb[2], cur->nb[1]*(n_head+n_head_kv)));
+            ggml_tensor * Vcur = ggml_view_3d(ctx0, cur, n_embd_head, n_head_kv, n_tokens, cur->nb[1], cur->nb[2], cur->nb[1]*(n_head+n_head_kv));
             cb(Vcur, "Vcur", il);
 
             Qcur = build_norm(Qcur,
Repository: ollama/ollama
Pull request: Ensure driver version set before variant

During rebasing, the ordering was inverted causing the cuda version selection logic to break.

Changed files:
filename: gpu/gpu.go
patch: @@ -264,6 +264,8 @@ func GetGPUInfo() GpuInfoList {
 				gpuInfo.computeMajor = int(memInfo.major)
 				gpuInfo.computeMinor = int(memInfo.minor)
 				gpuInfo.MinimumMemory = cudaMinimumMemory
+				gpuInfo.DriverMajor = driverMajor
+				gpuInfo.DriverMinor = driverMinor
 				variant := cudaVariant(gpuInfo)
 				if depPath != "" {
 					gpuInfo.DependencyPath = depPath
@@ -275,8 +277,6 @@ func GetGPUInfo() GpuInfoList {
 					}
 				}
 				gpuInfo.Name = C.GoString(&memInfo.gpu_name[0])
-				gpuInfo.DriverMajor = driverMajor
-				gpuInfo.DriverMinor = driverMinor
 				gpuInfo.Variant = variant
 
 				// query the management library as well so we can record any skew between the two