helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Fix FSDP bnb error 

# What does this PR do?

This PR fixes an error related to fsdpv1 + bnb . Thanks @winglian for the help ! The issue was that I assumed that all bnb 4bit model were stored in torch.unint8. However for fsdp, we need them in b/float16 

Changed files:
filename: src/transformers/integrations/bitsandbytes.py
patch: @@ -223,7 +223,9 @@ def _replace_with_bnb_linear(
                             if pre_quantized:
                                 # this is kind of an edge case when supporting both loading and quantization ...
                                 # we need to set the right dtype as we cast the checkpoint with the dtype of the meta model
-                                new_module.weight.data = new_module.weight.data.to(dtype=torch.uint8)
+                                new_module.weight.data = new_module.weight.data.to(
+                                    dtype=quantization_config.bnb_4bit_quant_storage
+                                )
                             model._modules[name] = new_module
                             has_been_replaced = True
                     # Store the module class in case we need to transpose the weight later
Repository: ollama/ollama
Pull request: Update README.md - replace stale links

The links were outdated and led to 404 pages.

Changed files:
filename: README.md
patch: @@ -376,7 +376,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)
+- [LangChain](https://python.langchain.com/docs/integrations/llms/ollama) and [LangChain.js](https://js.langchain.com/docs/integrations/chat/ollama/) with [example](https://js.langchain.com/docs/tutorials/local_rag/)
 - [Firebase Genkit](https://firebase.google.com/docs/genkit/plugins/ollama)
 - [crewAI](https://github.com/crewAIInc/crewAI)
 - [LangChainGo](https://github.com/tmc/langchaingo/) with [example](https://github.com/tmc/langchaingo/tree/main/examples/ollama-completion-example)
Repository: ollama/ollama
Pull request: Add G1 to list of integrations

I added g1 to the list of integrations in the readme file. Hopefully this can bring this project more attention.

Changed files:
filename: README.md
patch: @@ -329,6 +329,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [crewAI with Mesop](https://github.com/rapidarchitect/ollama-crew-mesop) (Mesop Web Interface to run crewAI with Ollama)
 - [LLMChat](https://github.com/trendy-design/llmchat) (Privacy focused, 100% local, intuitive all-in-one chat interface)
 - [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.)
 
 ### Terminal
Repository: vuejs/vue
Pull request: improve:add local variable declaration

<!--
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
- [x] Code style update
- [ ] 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
- [ ] 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
- [ ] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**

Add the declaration of the local variable `i` in` removeAndInvokeRemoveHook` 

Changed files:
filename: src/core/vdom/patch.js
patch: @@ -327,6 +327,7 @@ export function createPatchFunction (backend) {
 
   function removeAndInvokeRemoveHook (vnode, rm) {
     if (isDef(rm) || isDef(vnode.data)) {
+      let i
       const listeners = cbs.remove.length + 1
       if (isDef(rm)) {
         // we have a recursively passed down rm callback
Repository: electron/electron
Pull request: build: use --keep-non-patch flag with git am

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

There's an edge case with our patch system where if we cherry-pick an upstream patch that starts with bracketed text, that text is stripped when the patch is applied and then re-exporting the patches causes shear. We've run into that in #48791.

[More info](https://git-scm.com/docs/git-mailinfo#Documentation/git-mailinfo.txt--b) on the effect of `git am --keep-non-patch` (which is just a pass through for `git mailinfo -b`).

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd

#### Release Notes

Notes: none <!-- 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 -->


Changed files:
filename: script/lib/git.py
patch: @@ -52,7 +52,8 @@ def get_repo_root(path):
 
 def am(repo, patch_data, threeway=False, directory=None, exclude=None,
     committer_name=None, committer_email=None, keep_cr=True):
-  args = []
+  # --keep-non-patch prevents stripping leading bracketed strings on the subject line
+  args = ['--keep-non-patch']
   if threeway:
     args += ['--3way']
   if directory is not None:
Repository: huggingface/transformers
Pull request: Remove splitted_tests.txt file

An extra file was added to the repo root in #42168, I think by accident. This PR removes it.

cc @ydshieh in case you know why it's here!

Changed files:
filename: splitted_tests.txt
patch: @@ -1 +0,0 @@
-tests/models/afmoe/test_modeling_afmoe.py
Repository: ollama/ollama
Pull request: runner.go: Don't cache prompts for embeddings

Our integration with server.cpp implicitly disables prompt caching because it is not part of the JSON object being parsed, this makes the Go runner behavior similarly.

Prompt caching has been seen to affect the results of text completions on certain hardware. The results are not wrong either way but they are non-deterministic. However, embeddings seem to be affected even on hardware that does not show this behavior for completions. For now, it is best to maintain consistency with the existing behavior.

Changed files:
filename: llama/runner/cache.go
patch: @@ -64,7 +64,7 @@ type InputCacheSlot struct {
 	lastUsed time.Time
 }
 
-func (c *InputCache) LoadCacheSlot(prompt []input) (*InputCacheSlot, []input, int, error) {
+func (c *InputCache) LoadCacheSlot(prompt []input, cachePrompt bool) (*InputCacheSlot, []input, int, error) {
 	var slot *InputCacheSlot
 	var numPast int
 	var err error
@@ -84,6 +84,10 @@ func (c *InputCache) LoadCacheSlot(prompt []input) (*InputCacheSlot, []input, in
 		return nil, nil, 0, err
 	}
 
+	if !cachePrompt {
+		numPast = 0
+	}
+
 	slot.InUse = true
 	slot.lastUsed = time.Now()
 

filename: llama/runner/runner.go
patch: @@ -513,9 +513,10 @@ type ImageData struct {
 }
 
 type CompletionRequest struct {
-	Prompt  string      `json:"prompt"`
-	Images  []ImageData `json:"image_data"`
-	Grammar string      `json:"grammar"`
+	Prompt      string      `json:"prompt"`
+	Images      []ImageData `json:"image_data"`
+	Grammar     string      `json:"grammar"`
+	CachePrompt bool        `json:"cache_prompt"`
 
 	Options
 }
@@ -595,7 +596,7 @@ func (s *Server) completion(w http.ResponseWriter, r *http.Request) {
 	s.mu.Lock()
 	for i, sq := range s.seqs {
 		if sq == nil {
-			seq.cache, seq.inputs, seq.numPast, err = s.cache.LoadCacheSlot(seq.inputs)
+			seq.cache, seq.inputs, seq.numPast, err = s.cache.LoadCacheSlot(seq.inputs, req.CachePrompt)
 			if err != nil {
 				s.mu.Unlock()
 				http.Error(w, fmt.Sprintf("Failed to load cache: %v", err), http.StatusInternalServerError)
@@ -646,7 +647,8 @@ func (s *Server) completion(w http.ResponseWriter, r *http.Request) {
 }
 
 type EmbeddingRequest struct {
-	Content string `json:"content"`
+	Content     string `json:"content"`
+	CachePrompt bool   `json:"cache_prompt"`
 }
 
 type EmbeddingResponse struct {
@@ -674,7 +676,7 @@ func (s *Server) embeddings(w http.ResponseWriter, r *http.Request) {
 	s.mu.Lock()
 	for i, sq := range s.seqs {
 		if sq == nil {
-			seq.cache, seq.inputs, seq.numPast, err = s.cache.LoadCacheSlot(seq.inputs)
+			seq.cache, seq.inputs, seq.numPast, err = s.cache.LoadCacheSlot(seq.inputs, req.CachePrompt)
 			if err != nil {
 				s.mu.Unlock()
 				http.Error(w, fmt.Sprintf("Failed to load cache: %v", err), http.StatusInternalServerError)
Repository: ollama/ollama
Pull request: llm: Don't add BOS/EOS for tokenize requests

This is consistent with what server.cpp currently does. It affects things like token processing counts for embedding requests.

Changed files:
filename: llm/server.go
patch: @@ -958,7 +958,7 @@ func (s *llmServer) Tokenize(ctx context.Context, content string) ([]int, error)
 	s.modelLock.Lock()
 	defer s.modelLock.Unlock()
 	if s.model != nil {
-		return s.model.Tokenize(content, true, true)
+		return s.model.Tokenize(content, false, true)
 	}
 
 	// Make sure the server is ready
@@ -991,7 +991,7 @@ func (s *llmServer) Tokenize(ctx context.Context, content string) ([]int, error)
 			m := llama.LoadModelFromFile(s.modelPath, llama.ModelParams{VocabOnly: true})
 			s.model = m
 		}
-		return s.model.Tokenize(content, true, true)
+		return s.model.Tokenize(content, false, true)
 	}
 
 	body, err := io.ReadAll(resp.Body)
Repository: ggml-org/llama.cpp
Pull request: hexagon: fix typo in vtcm_needs_release

This is very likely a typo. I'm not very familiar with hexagon, hopefully someone more familiar could confirm it.

Another question on HAP_compute_res_attr_set_release_callback:
In which context the callback is invoked?

If the callback is called from another thread, the code suffers from potential data races (The uses atomic_bool individually, but they are not guarded by a mutex all together, the classic data races problem in multi-thread code). Hexagon documentation says little on it, hopefully someone very familiar with hexagon could answer it.


Changed files:
filename: ggml/src/ggml-hexagon/htp/main.c
patch: @@ -189,7 +189,7 @@ static int vtcm_release_callback(unsigned int rctx, void * state) {
     // otherwise we'll release it once we're done with the current Op.
 
     if (ctx->vtcm_inuse) {
-        ctx->vtcm_needs_release = false;
+        ctx->vtcm_needs_release = true;
         return 0;
     }
Repository: vuejs/vue
Pull request: allow an extended constructor as global mixin (fix vue-class-component#83)

<!--
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)

- [x] Bugfix (might be a new feature)
- [ ] Feature
- [ ] Code style update
- [ ] 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

**Other information:**
This PR moves a constructor check in `mergeOptions` to the head of the function so that we can use a extended Vue constructor not only as `mixins`/`extends` options but also as global mixin. This fixes vuejs/vue-class-component#83

Changed files:
filename: src/core/util/options.js
patch: @@ -1,6 +1,5 @@
 /* @flow */
 
-import Vue from '../instance/index'
 import config from '../config'
 import { warn } from './debug'
 import { set } from '../observer/index'
@@ -275,21 +274,20 @@ export function mergeOptions (
   if (process.env.NODE_ENV !== 'production') {
     checkComponents(child)
   }
+
+  if (typeof child === 'function') {
+    child = child.options
+  }
+
   normalizeProps(child)
   normalizeDirectives(child)
   const extendsFrom = child.extends
   if (extendsFrom) {
-    parent = typeof extendsFrom === 'function'
-      ? mergeOptions(parent, extendsFrom.options, vm)
-      : mergeOptions(parent, extendsFrom, vm)
+    parent = mergeOptions(parent, extendsFrom, vm)
   }
   if (child.mixins) {
     for (let i = 0, l = child.mixins.length; i < l; i++) {
-      let mixin = child.mixins[i]
-      if (mixin.prototype instanceof Vue) {
-        mixin = mixin.options
-      }
-      parent = mergeOptions(parent, mixin, vm)
+      parent = mergeOptions(parent, child.mixins[i], vm)
     }
   }
   const options = {}

filename: test/unit/features/global-api/mixin.spec.js
patch: @@ -124,4 +124,21 @@ describe('Global API: mixin', () => {
     expect(Test.options.computed.$style()).toBe(123)
     expect(Test.options.beforeCreate).toEqual([mixinSpy, baseSpy, spy])
   })
+
+  // vue-class-component#83
+  it('should work for a constructor mixin', () => {
+    const spy = jasmine.createSpy('global mixin')
+    const Mixin = Vue.extend({
+      created () {
+        spy(this.$options.myOption)
+      }
+    })
+
+    Vue.mixin(Mixin)
+
+    new Vue({
+      myOption: 'hello'
+    })
+    expect(spy).toHaveBeenCalledWith('hello')
+  })
 })
Repository: vuejs/vue
Pull request: Fix 0 download issue with monthly download shield

<!--
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)

- [x] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] 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
- [ ] 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
- [ ] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


Changed files:
filename: README.md
patch: @@ -3,7 +3,7 @@
 <p align="center">
   <a href="https://circleci.com/gh/vuejs/vue/tree/dev"><img src="https://img.shields.io/circleci/project/vuejs/vue/dev.svg" alt="Build Status"></a>
   <a href="https://codecov.io/github/vuejs/vue?branch=dev"><img src="https://img.shields.io/codecov/c/github/vuejs/vue/dev.svg" alt="Coverage Status"></a>
-  <a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/dt/vue.svg" alt="Downloads"></a>
+  <a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/dm/vue.svg" alt="Downloads"></a>
   <a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/v/vue.svg" alt="Version"></a>
   <a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/l/vue.svg" alt="License"></a>
   <br>
Repository: vercel/next.js
Pull request: Turbopack: process.env.TURBOPACK should be a string

`process.env.FOO`  are always strings, this should be as well.

Changed files:
filename: crates/next-core/src/next_server/context.rs
patch: @@ -419,7 +419,7 @@ pub async fn get_tracing_compile_time_info() -> Result<Vc<CompileTimeInfo>> {
     */
     .defines(
         compile_time_defines!(
-            process.env.TURBOPACK = true,
+            process.env.TURBOPACK = "1",
             // process.env.NODE_ENV = "production",
         )
         .resolved_cell(),

filename: turbopack/crates/turbopack-cli/src/contexts.rs
patch: @@ -188,7 +188,7 @@ pub fn get_client_asset_context(
 fn client_defines(node_env: &NodeEnv) -> CompileTimeDefines {
     compile_time_defines!(
         process.turbopack = true,
-        process.env.TURBOPACK = true,
+        process.env.TURBOPACK = "1",
         process.env.NODE_ENV = node_env.to_string()
     )
 }

filename: turbopack/crates/turbopack-tests/tests/execution.rs
patch: @@ -359,7 +359,7 @@ async fn run_test_operation(prepared_test: ResolvedVc<PreparedTest>) -> Result<V
         .defines(
             compile_time_defines!(
                 process.turbopack = true,
-                process.env.TURBOPACK = true,
+                process.env.TURBOPACK = "1",
                 process.env.NODE_ENV = "production",
             )
             .resolved_cell(),

filename: turbopack/crates/turbopack-tests/tests/snapshot.rs
patch: @@ -291,7 +291,7 @@ async fn run_test_operation(resource: RcStr) -> Result<Vc<FileSystemPath>> {
 
     let mut defines = compile_time_defines!(
         process.turbopack = true,
-        process.env.TURBOPACK = true,
+        process.env.TURBOPACK = "1",
         process.env.NODE_ENV = "development",
         DEFINED_VALUE = "value",
         DEFINED_TRUE = true,

filename: turbopack/crates/turbopack/src/evaluate_context.rs
patch: @@ -96,7 +96,7 @@ pub async fn node_evaluate_asset_context(
                 compile_time_defines!(
                     process.turbopack = true,
                     process.env.NODE_ENV = node_env.into_owned(),
-                    process.env.TURBOPACK = true
+                    process.env.TURBOPACK = "1"
                 )
                 .resolved_cell(),
             )
@@ -131,7 +131,7 @@ pub async fn config_tracing_module_context(
                 compile_time_defines!(
                     process.turbopack = true,
                     process.env.NODE_ENV = node_env.into_owned(),
-                    process.env.TURBOPACK = true
+                    process.env.TURBOPACK = "1"
                 )
                 .resolved_cell(),
             )
Repository: ollama/ollama
Pull request: Correct directory reference in macapp/README

Minor README change that was likely omitted from https://github.com/ollama/ollama/commit/9da9e8fb7254df1148f9619bec781e52dc954678

Changed files:
filename: macapp/README.md
patch: @@ -14,7 +14,7 @@ go build .
 Then run the desktop app with `npm start`:
 
 ```
-cd app
+cd macapp
 npm install
 npm start
 ```
Repository: facebook/react
Pull request: [compiler][repro] JSX escape sequences not printed correctly by @babel/generator


Repro for https://github.com/facebook/react/issues/32123

Note that this is only a bug when calling `@babel/generator:generate()` before transforming JSX.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32130).
* #32131
* __->__ #32130

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-preserve-escape-character.expect.md
patch: @@ -0,0 +1,57 @@
+
+## Input
+
+```javascript
+/**
+ * Fixture showing `@babel/generator` bug with jsx attribute strings containing
+ * escape sequences. Note that this is only a problem when generating jsx
+ * literals.
+ *
+ * When using the jsx transform to correctly lower jsx into
+ * `React.createElement` calls, the escape sequences are preserved correctly
+ * (see evaluator output).
+ */
+function MyApp() {
+  return <input pattern="\w" />;
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: MyApp,
+  params: [],
+};
+
+```
+
+## Code
+
+```javascript
+import { c as _c } from "react/compiler-runtime"; /**
+ * Fixture showing `@babel/generator` bug with jsx attribute strings containing
+ * escape sequences. Note that this is only a problem when generating jsx
+ * literals.
+ *
+ * When using the jsx transform to correctly lower jsx into
+ * `React.createElement` calls, the escape sequences are preserved correctly
+ * (see evaluator output).
+ */
+function MyApp() {
+  const $ = _c(1);
+  let t0;
+  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
+    t0 = <input pattern="\\w" />;
+    $[0] = t0;
+  } else {
+    t0 = $[0];
+  }
+  return t0;
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: MyApp,
+  params: [],
+};
+
+```
+      
+### Eval output
+(kind: ok) <input pattern="\w">
\ No newline at end of file

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-preserve-escape-character.js
patch: @@ -0,0 +1,17 @@
+/**
+ * Fixture showing `@babel/generator` bug with jsx attribute strings containing
+ * escape sequences. Note that this is only a problem when generating jsx
+ * literals.
+ *
+ * When using the jsx transform to correctly lower jsx into
+ * `React.createElement` calls, the escape sequences are preserved correctly
+ * (see evaluator output).
+ */
+function MyApp() {
+  return <input pattern="\w" />;
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: MyApp,
+  params: [],
+};
Repository: ggml-org/llama.cpp
Pull request: args : add -kvu to llama-parallel


Changed files:
filename: common/arg.cpp
patch: @@ -1301,7 +1301,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
         [](common_params & params, bool value) {
             params.kv_unified = value;
         }
-    ).set_env("LLAMA_ARG_KV_UNIFIED").set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_BATCHED, LLAMA_EXAMPLE_BENCH}));
+    ).set_env("LLAMA_ARG_KV_UNIFIED").set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_BATCHED, LLAMA_EXAMPLE_BENCH, LLAMA_EXAMPLE_PARALLEL}));
     add_opt(common_arg(
         {"--context-shift"},
         {"--no-context-shift"},