helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Make RefStatic and LayoutStatic the same bit

Refs are basically just fancy Layout Effects. These are conceptually the same thing and are always visited together so they don't need to be different flags.

Whenever we disappear/reappear Offscreen content we need to do both Refs and Layout Effects.

This is just indicating which phase needs to be visited and these are always the same phase.


Changed files:
filename: packages/react-reconciler/src/ReactFiberFlags.js
patch: @@ -66,8 +66,8 @@ export const Forked = /*                       */ 0b0000000100000000000000000000
 // This enables us to defer more work in the unmount case,
 // since we can defer traversing the tree during layout to look for Passive effects,
 // and instead rely on the static flag as a signal that there may be cleanup work.
-export const RefStatic = /*                    */ 0b0000001000000000000000000000;
 export const LayoutStatic = /*                 */ 0b0000010000000000000000000000;
+export const RefStatic = LayoutStatic;
 export const PassiveStatic = /*                */ 0b0000100000000000000000000000;
 export const MaySuspendCommit = /*             */ 0b0001000000000000000000000000;
Repository: huggingface/transformers
Pull request: Remove error string test that was failing

`test_use_safetensors` was failing in the CI after #41580 because different error messages are returned in some cases, and this test inspected specific error message text.

This PR keeps the rest of the test, but removes the specific text check.

cc @ArthurZucker @ydshieh 

Changed files:
filename: tests/utils/test_modeling_utils.py
patch: @@ -1319,12 +1319,6 @@ def test_use_safetensors(self):
         with self.assertRaises(OSError) as missing_model_file_error:
             BertModel.from_pretrained("hf-internal-testing/config-no-model")
 
-        self.assertTrue(
-            "does not appear to have a file named pytorch_model.bin or model.safetensors."
-            in str(missing_model_file_error.exception),
-            msg=missing_model_file_error.exception,
-        )
-
         with self.assertRaises(OSError) as missing_model_file_error:
             with tempfile.TemporaryDirectory() as tmp_dir:
                 with open(os.path.join(tmp_dir, "config.json"), "w") as f:
Repository: ollama/ollama
Pull request: server: fix json marshalling of downloadBlobPart

The json marshalling of downloadBlobPart was incorrect and racey. This fixes it by implementing customer json marshalling for downloadBlobPart which correctly handles serialization of shared memory.

Changed files:
filename: server/download.go
patch: @@ -61,6 +61,36 @@ type blobDownloadPart struct {
 	*blobDownload `json:"-"`
 }
 
+type jsonBlobDownloadPart struct {
+	N         int
+	Offset    int64
+	Size      int64
+	Completed int64
+}
+
+func (p *blobDownloadPart) MarshalJSON() ([]byte, error) {
+	return json.Marshal(jsonBlobDownloadPart{
+		N:         p.N,
+		Offset:    p.Offset,
+		Size:      p.Size,
+		Completed: p.Completed.Load(),
+	})
+}
+
+func (p *blobDownloadPart) UnmarshalJSON(b []byte) error {
+	var j jsonBlobDownloadPart
+	if err := json.Unmarshal(b, &j); err != nil {
+		return err
+	}
+	*p = blobDownloadPart{
+		N:      j.N,
+		Offset: j.Offset,
+		Size:   j.Size,
+	}
+	p.Completed.Store(j.Completed)
+	return nil
+}
+
 const (
 	numDownloadParts          = 64
 	minDownloadPartSize int64 = 100 * format.MegaByte
Repository: ggml-org/llama.cpp
Pull request: graph : fix nkvo offload with FA

fix #19096

The `ggml_flash_attn_ext` was not being offloaded to the CPU when `-nkvo` is specified.

Also remove obsolete `strcmp(name, "kqv_merged_cont")` check in the graph callback.

Changed files:
filename: src/llama-context.cpp
patch: @@ -2173,13 +2173,6 @@ llm_graph_cb llama_context::graph_get_cb() const {
             ggml_set_name(cur, name);
         }
 
-        if (!cparams.offload_kqv) {
-            if (strcmp(name, "kqv_merged_cont") == 0) {
-                // all nodes between the KV store and the attention output are run on the CPU
-                ggml_backend_sched_set_tensor_backend(sched.get(), cur, backend_cpu);
-            }
-        }
-
         // norm may be automatically assigned to the backend of the previous layer, increasing data transfer between backends
         // FIXME: fix in ggml_backend_sched
         const bool full_offload = model.n_gpu_layers() > model.hparams.n_layer;

filename: src/llama-graph.cpp
patch: @@ -1630,6 +1630,11 @@ ggml_tensor * llm_graph_context::build_attn_mha(
                                   hparams.attn_soft_cap ? hparams.f_attn_logit_softcapping : 0.0f);
         cb(cur, LLAMA_TENSOR_NAME_FATTN, il);
 
+        if (!cparams.offload_kqv) {
+            // all nodes between the KV store and the attention output are run on the CPU
+            ggml_backend_sched_set_tensor_backend(sched, cur, backend_cpu);
+        }
+
         ggml_flash_attn_ext_add_sinks(cur, sinks);
         ggml_flash_attn_ext_set_prec (cur, GGML_PREC_F32);
Repository: ollama/ollama
Pull request: Add BoltAI as an Ollama Desktop GUI

### Overview

BoltAI supports Ollama natively. It automatically synchronize with Ollama model lists, and allows users to use advanced features such as AI Command and AI Inline.

### Screenshots

**Main Chat UI**

![CleanShot 2024-07-16 at 22 28 14@2x](https://github.com/user-attachments/assets/224f80bb-49e0-48fb-80ba-bfb8187d4ee2)

**Model Management**

![CleanShot 2024-07-16 at 22 28 34@2x](https://github.com/user-attachments/assets/b94826bf-3f11-4d63-b5dd-92aecc649652)


Changed files:
filename: README.md
patch: @@ -299,6 +299,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [AI Studio](https://github.com/MindWorkAI/AI-Studio)
 - [Sidellama](https://github.com/gyopak/sidellama) (browser-based LLM client)
 - [LLMStack](https://github.com/trypromptly/LLMStack) (No-code multi-agent framework to build LLM agents and workflows)
+- [BoltAI for Mac](https://boltai.com) (AI Chat Client for Mac)
 
 ### Terminal
Repository: ollama/ollama
Pull request: Update README to include Firebase Genkit

Firebase Genkit

Changed files:
filename: README.md
patch: @@ -337,6 +337,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 ### Libraries
 
 - [LangChain](https://python.langchain.com/docs/integrations/llms/ollama) and [LangChain.js](https://js.langchain.com/docs/modules/model_io/models/llms/integrations/ollama) with [example](https://js.langchain.com/docs/use_cases/question_answering/local_retrieval_qa)
+- [Firebase Genkit](https://firebase.google.com/docs/genkit/plugins/ollama)
 - [LangChainGo](https://github.com/tmc/langchaingo/) with [example](https://github.com/tmc/langchaingo/tree/main/examples/ollama-completion-example)
 - [LangChain4j](https://github.com/langchain4j/langchain4j) with [example](https://github.com/langchain4j/langchain4j-examples/tree/main/ollama-examples/src/main/java)
 - [LangChainRust](https://github.com/Abraxas-365/langchain-rust) with [example](https://github.com/Abraxas-365/langchain-rust/blob/main/examples/llm_ollama.rs)
Repository: electron/electron
Pull request: build: fixup chromedriver and mksnapshot

Backport of #48470

See that PR for details.


Notes: <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->none

Changed files:
filename: .github/actions/build-electron/action.yml
patch: @@ -79,7 +79,7 @@ runs:
       shell: bash
       run: |
         cd src
-        e build --target electron:electron_mksnapshot
+        e build --target electron:electron_mksnapshot_zip
         ELECTRON_DEPOT_TOOLS_DISABLE_LOG=1 e d gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
         # Remove unused args from mksnapshot_args
         SEDOPTION="-i"
@@ -89,7 +89,6 @@ runs:
         sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
         sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
 
-        e build --target electron:electron_mksnapshot_zip
         if [ "${{ inputs.target-platform }}" = "win" ]; then
           cd out/Default
           powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
@@ -123,7 +122,6 @@ runs:
       shell: bash
       run: |
         cd src
-        e build --target electron:electron_chromedriver
         e build --target electron:electron_chromedriver_zip
     - name: Build Node.js headers ${{ inputs.step-suffix }}
       shell: bash

filename: .github/actions/install-build-tools/action.yml
patch: @@ -15,7 +15,7 @@ runs:
         git config --global core.preloadindex true
         git config --global core.longpaths true
       fi
-      export BUILD_TOOLS_SHA=c13f4bdb50e65da46a4703f8f882079dd21fd99e
+      export BUILD_TOOLS_SHA=706147b2376f55078f718576b28129a0457f1795
       npm i -g @electron/build-tools
       # Update depot_tools to ensure python
       e d update_depot_tools

filename: .github/workflows/pipeline-segment-electron-test.yml
patch: @@ -166,22 +166,18 @@ jobs:
         path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
     - name: Restore Generated Artifacts
       run: ./src/electron/script/actions/restore-artifacts.sh
-    - name: Unzip Dist, Mksnapshot & Chromedriver (win)
+    - name: Unzip Dist (win)
       if: ${{ inputs.target-platform == 'win' }}
       shell: powershell
       run: |
         Set-ExecutionPolicy Bypass -Scope Process -Force
         cd src/out/Default
         Expand-Archive -Force dist.zip -DestinationPath ./
-        Expand-Archive -Force chromedriver.zip -DestinationPath ./
-        Expand-Archive -Force mksnapshot.zip -DestinationPath ./
-    - name: Unzip Dist, Mksnapshot & Chromedriver (unix)
+    - name: Unzip Dist (unix)
       if: ${{ inputs.target-platform != 'win' }}
       run: |
         cd src/out/Default
         unzip -:o dist.zip
-        unzip -:o chromedriver.zip
-        unzip -:o mksnapshot.zip
     - name: Import & Trust Self-Signed Codesigning Cert on MacOS
       if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
       run: |
Repository: nodejs/node
Pull request: src: allow disabling JS source phase imports

Refs:
  - https://chromium-review.googlesource.com/c/v8/v8/+/7003082
  - https://chromium-review.googlesource.com/c/chromium/src/+/6336964
  - https://github.com/nodejs/node/pull/56919

Electron need to disable source phase imports in renderer and worker processes - Chromium disables them in [`content/renderer/render_process_impl.cc`](https://source.chromium.org/chromium/chromium/src/+/main:content/renderer/render_process_impl.cc;l=166-168?q=content%2Frenderer%2Frender_process_impl.cc&sq=package:chromium) and the process will hard crash otherwise.
 
Happy to move this to a different place if there's a better suggestion!
<!--
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: src/node.cc
patch: @@ -780,7 +780,10 @@ static ExitCode ProcessGlobalArgsInternal(std::vector<std::string>* args,
     env_opts->abort_on_uncaught_exception = true;
   }
 
-  v8_args.emplace_back("--js-source-phase-imports");
+  if (std::ranges::find(v8_args, "--no-js-source-phase-imports") ==
+      v8_args.end()) {
+    v8_args.emplace_back("--js-source-phase-imports");
+  }
 
 #ifdef __POSIX__
   // Block SIGPROF signals when sleeping in epoll_wait/kevent/etc.  Avoids the
Repository: vuejs/vue
Pull request: setTimeout fallback update 

update setTimeout fallback


Changed files:
filename: src/core/util/env.js
patch: @@ -81,7 +81,9 @@ export const nextTick = (function () {
   } else {
     // fallback to setTimeout
     /* istanbul ignore next */
-    timerFunc = setTimeout
+    timerFunc = () => {
+      setTimeout(nextTickHandler, 0)
+    }
   }
 
   return function queueNextTick (cb: Function, ctx?: Object) {
@@ -91,7 +93,7 @@ export const nextTick = (function () {
     callbacks.push(func)
     if (!pending) {
       pending = true
-      timerFunc(nextTickHandler, 0)
+      timerFunc()
     }
   }
 })()
Repository: vuejs/vue
Pull request: Make forAlias regex lazy (fixes #3846)

The current forAliasRE has the first rule greedy (`(.*)`), which will attempt to match whatever it can. This exposes a bug (#3846), where the regex fails if the template happens to have " in " or " of " in its last group. For instance, with the template `for key in [{body: 'Hey in body'}]`, current regex will capture the last group as `body'}]` instead of `[{body: 'Hey in body'}]`. This commit aims to fix this issue by making the first rule lazy instead.

I don't think this really needs a test, but let me know if it does.


Changed files:
filename: src/compiler/parser/index.js
patch: @@ -16,7 +16,7 @@ import {
 } from '../helpers'
 
 export const dirRE = /^v-|^@|^:/
-export const forAliasRE = /(.*)\s+(?:in|of)\s+(.*)/
+export const forAliasRE = /(.*?)\s+(?:in|of)\s+(.*)/
 export const forIteratorRE = /\(([^,]*),([^,]*)(?:,([^,]*))?\)/
 const bindRE = /^:|^v-bind:/
 const onRE = /^@|^v-on:/
Repository: facebook/react
Pull request: [Fiber] Avoid return value from commitBeforeMutationEffects

This is behind an unusual flag (enableCreateEventHandleAPI) that doesn't serve a special return value. I'll be collecting other flags from this phase too.

We can just use the global flag and reset it before the next mutation phase. Unlike focusedInstanceHandle this doesn't leak any memory in the meantime.

Changed files:
filename: packages/react-reconciler/src/ReactFiberCommitWork.js
patch: @@ -236,23 +236,20 @@ let inProgressLanes: Lanes | null = null;
 let inProgressRoot: FiberRoot | null = null;
 
 let focusedInstanceHandle: null | Fiber = null;
-let shouldFireAfterActiveInstanceBlur: boolean = false;
+export let shouldFireAfterActiveInstanceBlur: boolean = false;
 
 export function commitBeforeMutationEffects(
   root: FiberRoot,
   firstChild: Fiber,
-): boolean {
+): void {
   focusedInstanceHandle = prepareForCommit(root.containerInfo);
+  shouldFireAfterActiveInstanceBlur = false;
 
   nextEffect = firstChild;
   commitBeforeMutationEffects_begin();
 
   // We no longer need to track the active instance fiber
-  const shouldFire = shouldFireAfterActiveInstanceBlur;
-  shouldFireAfterActiveInstanceBlur = false;
   focusedInstanceHandle = null;
-
-  return shouldFire;
 }
 
 function commitBeforeMutationEffects_begin() {

filename: packages/react-reconciler/src/ReactFiberWorkLoop.js
patch: @@ -198,6 +198,7 @@ import {
 } from './ReactFiberThrow';
 import {
   commitBeforeMutationEffects,
+  shouldFireAfterActiveInstanceBlur,
   commitLayoutEffects,
   commitMutationEffects,
   commitPassiveMountEffects,
@@ -3384,10 +3385,7 @@ function commitRootImpl(
     // The first phase a "before mutation" phase. We use this phase to read the
     // state of the host tree right before we mutate it. This is where
     // getSnapshotBeforeUpdate is called.
-    const shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(
-      root,
-      finishedWork,
-    );
+    commitBeforeMutationEffects(root, finishedWork);
 
     // The next phase is the mutation phase, where we mutate the host tree.
     commitMutationEffects(root, finishedWork, lanes);
Repository: vuejs/vue
Pull request: Fix #3824 Allow text nodes on static templates in components

It may be a better way to move the textnode out of the static render tree


Changed files:
filename: src/core/instance/render.js
patch: @@ -117,8 +117,10 @@ export function renderMixin (Vue: Class<Component>) {
     tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy)
     if (Array.isArray(tree)) {
       for (let i = 0; i < tree.length; i++) {
-        tree[i].isStatic = true
-        tree[i].key = `__static__${index}_${i}`
+        if (typeof tree[i] !== 'string') {
+          tree[i].isStatic = true
+          tree[i].key = `__static__${index}_${i}`
+        }
       }
     } else {
       tree.isStatic = true

filename: test/unit/features/component/component-slot.spec.js
patch: @@ -523,4 +523,17 @@ describe('Component slot', () => {
       expect(spy).toHaveBeenCalled()
     }).then(done)
   })
+
+  it('renders static tree with text', () => {
+    const vm = new Vue({
+      template: `<div><test><template><div></div>Hello<div></div></template></test></div>`,
+      components: {
+        test: {
+          template: '<div><slot></slot></div>'
+        }
+      }
+    })
+    vm.$mount()
+    expect('Error when rendering root').not.toHaveBeenWarned()
+  })
 })
Repository: huggingface/transformers
Pull request: Fix device_map computation part 2

# What does this PR do?

Follow up to https://github.com/huggingface/transformers/pull/42264.
Since https://github.com/huggingface/transformers/pull/42043, `compute_module_sizes` is also used in `_init_infer_auto_device_map`. However, there it expects to have all the modules inside, but also the leaves parameters and buffers, which was not the case. Because we return `defaultdict` instance, we would not have any `KeyError` but instead very nasty silent bugs because the values found would always be 0 (the default of the defaultdicts.

This PR fixes it by adding the option for adding them in the dict. Doing `compute_module_sizes(model, only_modules=False)` is now equivalent to `accelerate.compute_module_sizes(model)`, which is not the case without the flag (leaves are not in the dict)

cc @SunMarc 

Changed files:
filename: src/transformers/integrations/accelerate.py
patch: @@ -204,13 +204,18 @@ def check_and_set_device_map(device_map: "torch.device | int | str | dict | None
 
 
 def compute_module_sizes(
-    model: "PreTrainedModel", hf_quantizer: "HfQuantizer | None" = None, buffers_only: bool = False
+    model: "PreTrainedModel",
+    hf_quantizer: "HfQuantizer | None" = None,
+    buffers_only: bool = False,
+    only_modules: bool = True,
 ) -> tuple[dict[str, int], dict[str, int]]:
     """
     Compute the size of each submodule of a given model (in bytes).
     Returns a tuple of 2 dicts, the fist one containing a mapping of all the modules and the corresponding size
     in bytes, and the 2nd one containing a mapping from all leaf modules (modules containing parameters, the end of
     the model graph) and the corresponding sizes.
+    If `only_modules` is set to False, the first mapping will not only contain the size of all modules, but also
+    the size of all parameters and buffers.
     """
     all_module_sizes = defaultdict(int)
     leaves_module_sizes = defaultdict(int)
@@ -241,6 +246,9 @@ def all_tensors():
             all_module_sizes[".".join(name_parts[:idx])] += size
         if "." in name:
             leaves_module_sizes[name.rsplit(".", 1)[0]] += size
+        # If we want to also have the full leaves in `all_module_sizes`
+        if not only_modules:
+            all_module_sizes[name] += size
 
     return all_module_sizes, leaves_module_sizes
 
@@ -542,7 +550,7 @@ def _init_infer_auto_device_map(
     else:
         main_devices = ["cpu"]
 
-    module_sizes, _ = compute_module_sizes(model, hf_quantizer)
+    module_sizes, _ = compute_module_sizes(model, hf_quantizer, only_modules=False)
 
     if tied_parameters is None:
         if len(model.all_tied_weights_keys) > 0:
Repository: vuejs/vue
Pull request: Fix reference to backers.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: README.md
patch: @@ -12,7 +12,7 @@
 
 ## Supporting Vue.js
 
-Vue.js is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome [backers](https://github.com/vuejs/vue/blob/dev/backers.md). If you'd like to join them, check out [Vue.js' Patreon campaign](https://www.patreon.com/evanyou).
+Vue.js is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome [backers](https://github.com/vuejs/vue/blob/dev/BACKERS.md). If you'd like to join them, check out [Vue.js' Patreon campaign](https://www.patreon.com/evanyou).
 
 <p align="center">
   <b>Special thanks to the generous sponsorship by:</b>
Repository: facebook/react
Pull request: [Fiber] Gate Update flag on BeforeMutationMask on flags

We're currently visiting the snapshot phase for every `Update` flag even though we rarely have to do anything in the Snapshot phase.

The only flags that seem to use these wider visits is `enableCreateEventHandleAPI` and `enableUseEffectEventHook` but really neither of those should do that neither. They should schedule explicit Snapshot phases if needed.

Changed files:
filename: packages/react-reconciler/src/ReactFiberFlags.js
patch: @@ -7,7 +7,10 @@
  * @flow
  */
 
-import {enableCreateEventHandleAPI} from 'shared/ReactFeatureFlags';
+import {
+  enableCreateEventHandleAPI,
+  enableUseEffectEventHook,
+} from 'shared/ReactFeatureFlags';
 
 export type Flags = number;
 
@@ -77,17 +80,19 @@ export const MountPassiveDev = /*              */ 0b1000000000000000000000000000
 // don't contain effects, by checking subtreeFlags.
 
 export const BeforeMutationMask: number =
-  // TODO: Remove Update flag from before mutation phase by re-landing Visibility
-  // flag logic (see #20043)
-  Update |
   Snapshot |
   (enableCreateEventHandleAPI
     ? // createEventHandle needs to visit deleted and hidden trees to
       // fire beforeblur
       // TODO: Only need to visit Deletions during BeforeMutation phase if an
       // element is focused.
-      ChildDeletion | Visibility
-    : 0);
+      Update | ChildDeletion | Visibility
+    : enableUseEffectEventHook
+      ? // TODO: The useEffectEvent hook uses the snapshot phase for clean up but it
+        // really should use the mutation phase for this or at least schedule an
+        // explicit Snapshot phase flag for this.
+        Update
+      : 0);
 
 export const MutationMask =
   Placement |