helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: llama : use output_resolve_row() in get_logits_ith/get_embeddings_ith

This commit updates get_logits_ith(), and get_embeddings_ith() to use output_resolve_row() to resolve the batch index to output row index.

The motivation for this is to remove some code duplication between these functions.

Changed files:
filename: src/llama-context.cpp
patch: @@ -712,35 +712,14 @@ int64_t llama_context::output_resolve_row(int32_t i) const {
 }
 
 float * llama_context::get_logits_ith(int32_t i) {
-    int64_t j = -1;
-
     output_reorder();
 
     try {
         if (logits.data == nullptr) {
             throw std::runtime_error("no logits");
         }
 
-        // TODO: use output_resolve_row()
-        if (i < 0) {
-            j = n_outputs + i;
-            if (j < 0) {
-                throw std::runtime_error(format("negative index out of range [0, %d)", n_outputs));
-            }
-        } else if ((size_t) i >= output_ids.size()) {
-            throw std::runtime_error(format("out of range [0, %zu)", output_ids.size()));
-        } else {
-            j = output_ids[i];
-        }
-
-        if (j < 0) {
-            throw std::runtime_error(format("batch.logits[%d] != true", i));
-        }
-        if (j >= n_outputs) {
-            // This should not happen
-            throw std::runtime_error(format("corrupt output buffer (j=%" PRId64 ", n_outputs=%d)", j, n_outputs));
-        }
-
+        const int64_t j = output_resolve_row(i);
         return logits.data + j*model.vocab.n_tokens();
     } catch (const std::exception & err) {
         LLAMA_LOG_ERROR("%s: invalid logits id %d, reason: %s\n", __func__, i, err.what());
@@ -763,35 +742,14 @@ llama_token * llama_context::get_sampled_tokens()  const{
 }
 
 float * llama_context::get_embeddings_ith(int32_t i) {
-    int64_t j = -1;
-
     output_reorder();
 
     try {
         if (embd.data == nullptr) {
             throw std::runtime_error("no embeddings");
         }
 
-        // TODO: use output_resolve_row()
-        if (i < 0) {
-            j = n_outputs + i;
-            if (j < 0) {
-                throw std::runtime_error(format("negative index out of range [0, %d)", n_outputs));
-            }
-        } else if ((size_t) i >= output_ids.size()) {
-            throw std::runtime_error(format("out of range [0, %zu)", output_ids.size()));
-        } else {
-            j = output_ids[i];
-        }
-
-        if (j < 0) {
-            throw std::runtime_error(format("batch.logits[%d] != true", i));
-        }
-        if (j >= n_outputs) {
-            // This should not happen
-            throw std::runtime_error(format("corrupt output buffer (j=%" PRId64 ", n_outputs=%d)", j, n_outputs));
-        }
-
+        const int64_t j = output_resolve_row(i);
         const uint32_t n_embd_out = model.hparams.n_embd_out();
         return embd.data + j*n_embd_out;
     } catch (const std::exception & err) {
Repository: ollama/ollama
Pull request: fix index out of range on zero layer metal load

If the model doesn't fit any layers on metal, and we load zero layers we would panic trying to look up the GPU size during scheduling ops

Changed files:
filename: llm/server.go
patch: @@ -1092,7 +1092,9 @@ func (s *llmServer) EstimatedTotal() uint64 {
 func (s *llmServer) EstimatedVRAMByGPU(gpuID string) uint64 {
 	for i, gpu := range s.gpus {
 		if gpu.ID == gpuID {
-			return s.estimate.GPUSizes[i]
+			if i < len(s.estimate.GPUSizes) {
+				return s.estimate.GPUSizes[i]
+			}
 		}
 	}
 	return 0
Repository: huggingface/transformers
Pull request: [CI] fix wav2vec test

# What does this PR do?

Should fix the https://app.circleci.com/pipelines/github/huggingface/transformers/156887/workflows/a4903e4d-20a5-4f8b-8ea6-04152fef96c0/jobs/2062866 test

Changed files:
filename: src/transformers/conversion_mapping.py
patch: @@ -142,11 +142,11 @@ def _build_checkpoint_conversion_mapping():
     if hasattr(torch.nn.utils.parametrizations, "weight_norm"):
         mapping["legacy"] += [
             WeightRenaming(
-                source_patterns=r"weight_g$",
+                source_patterns="weight_g",
                 target_patterns="parametrizations.weight.original0",
             ),
             WeightRenaming(
-                source_patterns=r"weight_v$",
+                source_patterns="weight_v",
                 target_patterns="parametrizations.weight.original1",
             ),
         ]
Repository: electron/electron
Pull request: feat: add `app.isHardwareAccelerationEnabled()`

Backport of #47614

See that PR for details.


Notes: Added `app.isHardwareAccelerationEnabled()`

Changed files:
filename: docs/api/app.md
patch: @@ -1214,6 +1214,13 @@ Disables hardware acceleration for current app.
 
 This method can only be called before app is ready.
 
+### `app.isHardwareAccelerationEnabled()`
+
+Returns `boolean` - whether hardware acceleration is currently disabled.
+
+ > [!NOTE]
+ > This information is only usable after the `gpu-info-update` event is emitted.
+
 ### `app.disableDomainBlockingFor3DAPIs()`
 
 By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per

filename: shell/browser/api/electron_api_app.cc
patch: @@ -1135,13 +1135,24 @@ void App::DisableHardwareAcceleration(gin_helper::ErrorThrower thrower) {
         "before app is ready");
     return;
   }
+
+  // If the GpuDataManager is already initialized, disable hardware
+  // acceleration immediately. Otherwise, set a flag to disable it in
+  // OnPreCreateThreads().
   if (content::GpuDataManager::Initialized()) {
     content::GpuDataManager::GetInstance()->DisableHardwareAcceleration();
   } else {
     disable_hw_acceleration_ = true;
   }
 }
 
+bool App::IsHardwareAccelerationEnabled() {
+  if (content::GpuDataManager::Initialized())
+    return content::GpuDataManager::GetInstance()
+        ->HardwareAccelerationEnabled();
+  return !disable_hw_acceleration_;
+}
+
 void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) {
   if (Browser::Get()->is_ready()) {
     thrower.ThrowError(
@@ -1909,6 +1920,8 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) {
                  &App::SetAccessibilitySupportEnabled)
       .SetMethod("disableHardwareAcceleration",
                  &App::DisableHardwareAcceleration)
+      .SetMethod("isHardwareAccelerationEnabled",
+                 &App::IsHardwareAccelerationEnabled)
       .SetMethod("disableDomainBlockingFor3DAPIs",
                  &App::DisableDomainBlockingFor3DAPIs)
       .SetMethod("getFileIcon", &App::GetFileIcon)

filename: shell/browser/api/electron_api_app.h
patch: @@ -207,6 +207,7 @@ class App final : public ElectronBrowserClient::Delegate,
   void ReleaseSingleInstanceLock();
   bool Relaunch(gin::Arguments* args);
   void DisableHardwareAcceleration(gin_helper::ErrorThrower thrower);
+  bool IsHardwareAccelerationEnabled();
   void DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower);
   bool IsAccessibilitySupportEnabled();
   v8::Local<v8::Value> GetAccessibilitySupportFeatures();

filename: spec/api-app-spec.ts
patch: @@ -149,6 +149,12 @@ describe('app module', () => {
     });
   });
 
+  describe('app.isHardwareAccelerationEnabled()', () => {
+    it('should be a boolean', () => {
+      expect(app.isHardwareAccelerationEnabled()).to.be.a('boolean');
+    });
+  });
+
   describe('app.isPackaged', () => {
     it('should be false during tests', () => {
       expect(app.isPackaged).to.equal(false);
Repository: vuejs/vue
Pull request: v-bind object should not override props on scopedSlots

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update
- [x] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [x] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [x] New/updated tests are included


Changed files:
filename: src/core/instance/render-helpers/render-slot.js
patch: @@ -15,7 +15,7 @@ export function renderSlot (
   if (scopedSlotFn) { // scoped slot
     props = props || {}
     if (bindObject) {
-      extend(props, bindObject)
+      props = extend(extend({}, bindObject), props)
     }
     return scopedSlotFn(props) || fallback
   } else {

filename: test/unit/features/component/component-scoped-slot.spec.js
patch: @@ -36,7 +36,7 @@ describe('Component scoped slot', () => {
       template: `
         <test ref="test">
           <template scope="props">
-            <span>{{ props.msg }} {{ props.msg2 }}</span>
+            <span>{{ props.msg }} {{ props.msg2 }} {{ props.msg3 }}</span>
           </template>
         </test>
       `,
@@ -45,23 +45,23 @@ describe('Component scoped slot', () => {
           data () {
             return {
               msg: 'hello',
-              obj: { msg2: 'world' }
+              obj: { msg2: 'world', msg3: '.' }
             }
           },
           template: `
             <div>
-              <slot :msg="msg" v-bind="obj"></slot>
+              <slot :msg="msg" v-bind="obj" msg3="!"></slot>
             </div>
           `
         }
       }
     }).$mount()
 
-    expect(vm.$el.innerHTML).toBe('<span>hello world</span>')
+    expect(vm.$el.innerHTML).toBe('<span>hello world !</span>')
     vm.$refs.test.msg = 'bye'
     vm.$refs.test.obj.msg2 = 'bye'
     waitForUpdate(() => {
-      expect(vm.$el.innerHTML).toBe('<span>bye bye</span>')
+      expect(vm.$el.innerHTML).toBe('<span>bye bye !</span>')
     }).then(done)
   })
Repository: ollama/ollama
Pull request: feat: add VT chat app to README

Add VT app, a minimal multimodal AI chat app with dynamic conversation routing, support both models backend by Ollama.

Thank you!

Changed files:
filename: README.md
patch: @@ -335,6 +335,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Ollama App](https://github.com/JHubi1/ollama-app) (Modern and easy-to-use multi-platform client for Ollama)
 - [Hexabot](https://github.com/hexastack/hexabot) (A conversational AI builder)
 - [Reddit Rate]((https://github.com/rapidarchitect/reddit_analyzer)) (Search and Rate Reddit topics with a weighted summation)
+- [VT](https://github.com/vinhnx/vt.ai) (A minimal multimodal AI chat app with dynamic conversation routing, support both models backend by Ollama)
 
 ### Terminal
Repository: ollama/ollama
Pull request: readme: improve Community Integrations section

* Fix README link opening/closed bracket for Reddit Rate link
* Fix and improve README link for VT project.
* Thank you, Ollama team!

Changed files:
filename: README.md
patch: @@ -335,8 +335,8 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Ollama App](https://github.com/JHubi1/ollama-app) (Modern and easy-to-use multi-platform client for Ollama)
 - [Perfect Memory AI](https://www.perfectmemory.ai/) (Productivity AI assists personalized by what you have seen on your screen, heard and said in the meetings)
 - [Hexabot](https://github.com/hexastack/hexabot) (A conversational AI builder)
-- [Reddit Rate]((https://github.com/rapidarchitect/reddit_analyzer)) (Search and Rate Reddit topics with a weighted summation)
-- [VT](https://github.com/vinhnx/vt.ai) (A minimal multimodal AI chat app with dynamic conversation routing, support both models backend by Ollama)
+- [Reddit Rate](https://github.com/rapidarchitect/reddit_analyzer) (Search and Rate Reddit topics with a weighted summation)
+- [VT](https://github.com/vinhnx/vt.ai) (A minimal multimodal AI chat app, with dynamic conversation routing. Supports local models via Ollama)
 - [Witsy](https://github.com/nbonamy/witsy) (An AI Desktop application avaiable for Mac/Windows/Linux) 
 
 ### Terminal
Repository: vercel/next.js
Pull request: [ci] Ensure build-and-deploy runs on pushes

Broke in https://github.com/vercel/next.js/pull/87176

Changed files:
filename: .github/workflows/build_and_deploy.yml
patch: @@ -4,7 +4,7 @@ name: build-and-deploy
 on:
   push:
     tags-ignore:
-      - '*'
+      - 'v*'
   # we need the preview tarball for deploy tests
   pull_request:
     types: [opened, synchronize]
Repository: ollama/ollama
Pull request: Witsy + multi-llm-ts in README

Thanks for the great Ollama!

Changed files:
filename: README.md
patch: @@ -337,6 +337,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Hexabot](https://github.com/hexastack/hexabot) (A conversational AI builder)
 - [Reddit Rate]((https://github.com/rapidarchitect/reddit_analyzer)) (Search and Rate Reddit topics with a weighted summation)
 - [VT](https://github.com/vinhnx/vt.ai) (A minimal multimodal AI chat app with dynamic conversation routing, support both models backend by Ollama)
+- [Witsy](https://github.com/nbonamy/witsy) (An AI Desktop application avaiable for Mac/Windows/Linux) 
 
 ### Terminal
 
@@ -422,6 +423,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Ollama for Swift](https://github.com/mattt/ollama-swift)
 - [GoLamify](https://github.com/prasad89/golamify)
 - [Ollama for Haskell](https://github.com/tusharad/ollama-haskell)
+- [multi-llm-ts](https://github.com/nbonamy/multi-llm-ts) (A Typescript/JavaScript library allowing access to different LLM in unified API)
 
 ### Mobile
Repository: ollama/ollama
Pull request: Add Perfect Memory AI to community integrations

I added Perfect Memory AI to community integrations.

Perfect Memory uses Ollama as an AI provider for offline inference. https://www.perfectmemory.ai/support/ai-assistant/ollama-setup


Changed files:
filename: README.md
patch: @@ -333,6 +333,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [ARGO](https://github.com/xark-argo/argo) (Locally download and run Ollama and Huggingface models with RAG on Mac/Windows/Linux)
 - [G1](https://github.com/bklieger-groq/g1) (Prototype of using prompting strategies to improve the LLM's reasoning through o1-like reasoning chains.)
 - [Ollama App](https://github.com/JHubi1/ollama-app) (Modern and easy-to-use multi-platform client for Ollama)
+- [Perfect Memory AI](https://www.perfectmemory.ai/) (Productivity AI assists personalized by what you have seen on your screen, heard and said in the meetings)
 - [Hexabot](https://github.com/hexastack/hexabot) (A conversational AI builder)
 - [Reddit Rate]((https://github.com/rapidarchitect/reddit_analyzer)) (Search and Rate Reddit topics with a weighted summation)
 - [VT](https://github.com/vinhnx/vt.ai) (A minimal multimodal AI chat app with dynamic conversation routing, support both models backend by Ollama)
Repository: electron/electron
Pull request: feat: add `app.isHardwareAccelerationEnabled()`

Backport of #47614

See that PR for details.


Notes: Added `app.isHardwareAccelerationEnabled()`

Changed files:
filename: docs/api/app.md
patch: @@ -1216,6 +1216,13 @@ Disables hardware acceleration for current app.
 
 This method can only be called before app is ready.
 
+### `app.isHardwareAccelerationEnabled()`
+
+Returns `boolean` - whether hardware acceleration is currently disabled.
+
+ > [!NOTE]
+ > This information is only usable after the `gpu-info-update` event is emitted.
+
 ### `app.disableDomainBlockingFor3DAPIs()`
 
 By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per

filename: shell/browser/api/electron_api_app.cc
patch: @@ -1136,13 +1136,24 @@ void App::DisableHardwareAcceleration(gin_helper::ErrorThrower thrower) {
         "before app is ready");
     return;
   }
+
+  // If the GpuDataManager is already initialized, disable hardware
+  // acceleration immediately. Otherwise, set a flag to disable it in
+  // OnPreCreateThreads().
   if (content::GpuDataManager::Initialized()) {
     content::GpuDataManager::GetInstance()->DisableHardwareAcceleration();
   } else {
     disable_hw_acceleration_ = true;
   }
 }
 
+bool App::IsHardwareAccelerationEnabled() {
+  if (content::GpuDataManager::Initialized())
+    return content::GpuDataManager::GetInstance()
+        ->HardwareAccelerationEnabled();
+  return !disable_hw_acceleration_;
+}
+
 void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) {
   if (Browser::Get()->is_ready()) {
     thrower.ThrowError(
@@ -1923,6 +1934,8 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) {
                  &App::SetAccessibilitySupportEnabled)
       .SetMethod("disableHardwareAcceleration",
                  &App::DisableHardwareAcceleration)
+      .SetMethod("isHardwareAccelerationEnabled",
+                 &App::IsHardwareAccelerationEnabled)
       .SetMethod("disableDomainBlockingFor3DAPIs",
                  &App::DisableDomainBlockingFor3DAPIs)
       .SetMethod("getFileIcon", &App::GetFileIcon)

filename: shell/browser/api/electron_api_app.h
patch: @@ -212,6 +212,7 @@ class App final : public gin::Wrappable<App>,
   void ReleaseSingleInstanceLock();
   bool Relaunch(gin::Arguments* args);
   void DisableHardwareAcceleration(gin_helper::ErrorThrower thrower);
+  bool IsHardwareAccelerationEnabled();
   void DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower);
   bool IsAccessibilitySupportEnabled();
   v8::Local<v8::Value> GetAccessibilitySupportFeatures();

filename: spec/api-app-spec.ts
patch: @@ -149,6 +149,12 @@ describe('app module', () => {
     });
   });
 
+  describe('app.isHardwareAccelerationEnabled()', () => {
+    it('should be a boolean', () => {
+      expect(app.isHardwareAccelerationEnabled()).to.be.a('boolean');
+    });
+  });
+
   describe('app.isPackaged', () => {
     it('should be false during tests', () => {
       expect(app.isPackaged).to.equal(false);
Repository: facebook/react
Pull request: [ci] Add missing permissions to runtime_commit_artifacts.yml


Turns out we need permissions to write to `contents` after all.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32710).
* #32711
* __->__ #32710

Changed files:
filename: .github/workflows/runtime_commit_artifacts.yml
patch: @@ -203,6 +203,9 @@ jobs:
     needs: [download_artifacts, process_artifacts]
     if: inputs.force == true || (github.ref == 'refs/heads/main' && needs.process_artifacts.outputs.www_branch_count == '0')
     runs-on: ubuntu-latest
+    permissions:
+      # Used to push a commit to builds/facebook-www
+      contents: write
     steps:
       - uses: actions/checkout@v4
         with:
@@ -289,6 +292,9 @@ jobs:
 
   commit_fbsource_artifacts:
     needs: [download_artifacts, process_artifacts]
+    permissions:
+      # Used to push a commit to builds/facebook-fbsource
+      contents: write
     if: inputs.force == true || (github.ref == 'refs/heads/main' && needs.process_artifacts.outputs.fbsource_branch_count == '0')
     runs-on: ubuntu-latest
     steps:
Repository: ollama/ollama
Pull request: Added ollama-haskell library

This PR adds a new Haskell library binding, [ollama-haskell](https://github.com/tusharad/ollama-haskell), to the "Libraries" section of the Ollama README. This library provides a straightforward way for Haskell developers to interface with the Ollama API.

@jessegross  

Changed files:
filename: README.md
patch: @@ -420,6 +420,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Agents-Flex for Java](https://github.com/agents-flex/agents-flex) with [example](https://github.com/agents-flex/agents-flex/tree/main/agents-flex-llm/agents-flex-llm-ollama/src/test/java/com/agentsflex/llm/ollama)
 - [Ollama for Swift](https://github.com/mattt/ollama-swift)
 - [GoLamify](https://github.com/prasad89/golamify)
+- [Ollama for Haskell](https://github.com/tusharad/ollama-haskell)
 
 ### Mobile
Repository: facebook/react
Pull request: [ci] Don't use pull_request_target


`pull_request_target` gives access to repository secrets and permissions for use from forks, for example to add a comment.

> Due to the dangers inherent to automatic processing of PRs, GitHub’s standard pull_request workflow trigger by default prevents write permissions and secrets access to the target repository. However, in some scenarios such access is needed to properly process the PR. To this end the pull_request_target workflow trigger was introduced.

> The reason to introduce the pull_request_target trigger was to enable workflows to label PRs (e.g. needs review) or to comment on the PR.

(via https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/)

In this case there is no reason for us to allow this, so let's just use the normal `pull_request` trigger which is less permissive.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32708).
* __->__ #32708
* #32709

Changed files:
filename: .github/workflows/compiler_discord_notify.yml
patch: @@ -1,7 +1,7 @@
 name: (Compiler) Discord Notify
 
 on:
-  pull_request_target:
+  pull_request:
     types: [opened, ready_for_review]
     paths:
       - compiler/**

filename: .github/workflows/runtime_discord_notify.yml
patch: @@ -1,7 +1,7 @@
 name: (Runtime) Discord Notify
 
 on:
-  pull_request_target:
+  pull_request:
     types: [opened, ready_for_review]
     paths-ignore:
       - compiler/**

filename: .github/workflows/shared_label_core_team_prs.yml
patch: @@ -1,7 +1,7 @@
 name: (Shared) Label Core Team PRs
 
 on:
-  pull_request_target:
+  pull_request:
 
 permissions: {}
Repository: facebook/react
Pull request: [ci] Also give permissions on pull_requests


Missed one
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32709).
* #32708
* __->__ #32709

Changed files:
filename: .github/workflows/shared_label_core_team_prs.yml
patch: @@ -24,8 +24,10 @@ jobs:
     runs-on: ubuntu-latest
     needs: check_maintainer
     permissions:
-      # Used to add labels
+      # Used to add labels on issues
       issues: write
+      # Used to add labels on PRs
+      pull-requests: write
     steps:
       - name: Label PR as React Core Team
         uses: actions/github-script@v7