helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: perf: don't wait for thumbnails if they were not requested on macOS

Backport of #46138

See that PR for details.


Notes: Improved performance of desktopCapturer.getSources when not requesting thumbnails on macOS.


Changed files:
filename: shell/browser/api/electron_api_desktop_capturer.cc
patch: @@ -328,8 +328,9 @@ void DesktopCapturer::StartHandling(bool capture_window,
         window_capturer_->SetThumbnailSize(thumbnail_size);
 #if BUILDFLAG(IS_MAC)
         window_capturer_->skip_next_refresh_ =
-            ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kWindow) ? 2
-                                                                           : 0;
+            ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kWindow)
+                ? thumbnail_size.IsEmpty() ? 1 : 2
+                : 0;
 #endif
 
         OnceCallback update_callback = base::BindOnce(
@@ -358,8 +359,9 @@ void DesktopCapturer::StartHandling(bool capture_window,
         screen_capturer_->SetThumbnailSize(thumbnail_size);
 #if BUILDFLAG(IS_MAC)
         screen_capturer_->skip_next_refresh_ =
-            ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kScreen) ? 2
-                                                                           : 0;
+            ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kScreen)
+                ? thumbnail_size.IsEmpty() ? 1 : 2
+                : 0;
 #endif
 
         OnceCallback update_callback = base::BindOnce(

filename: spec/api-desktop-capturer-spec.ts
patch: @@ -67,6 +67,22 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
     }
   });
 
+  it('enabling thumbnail should return non-empty images', async () => {
+    const w2 = new BrowserWindow({ show: false, width: 200, height: 200, webPreferences: { contextIsolation: false } });
+    const wShown = once(w2, 'show');
+    w2.show();
+    await wShown;
+
+    const isNonEmpties: boolean[] = (await desktopCapturer.getSources({
+      types: ['window', 'screen'],
+      thumbnailSize: { width: 100, height: 100 }
+    })).map(s => s.thumbnail.constructor.name === 'NativeImage' && !s.thumbnail.isEmpty());
+
+    w2.destroy();
+    expect(isNonEmpties).to.be.an('array').that.is.not.empty();
+    expect(isNonEmpties.every(e => e === true)).to.be.true();
+  });
+
   it('disabling thumbnail should return empty images', async () => {
     const w2 = new BrowserWindow({ show: false, width: 200, height: 200, webPreferences: { contextIsolation: false } });
     const wShown = once(w2, 'show');
Repository: nodejs/node
Pull request: src: avoid copy on getV8FastApiCallCount

Avoids copy by calling `ToStringView()`

Changed files:
filename: src/node_debug.cc
patch: @@ -12,8 +12,7 @@
 #include <unordered_map>
 #endif  // DEBUG
 
-namespace node {
-namespace debug {
+namespace node::debug {
 
 #ifdef DEBUG
 using v8::Context;
@@ -41,7 +40,7 @@ void GetV8FastApiCallCount(const FunctionCallbackInfo<Value>& args) {
     return;
   }
   Utf8Value utf8_key(env->isolate(), args[0]);
-  args.GetReturnValue().Set(GetV8FastApiCallCount(utf8_key.ToString()));
+  args.GetReturnValue().Set(GetV8FastApiCallCount(utf8_key.ToStringView()));
 }
 
 void SlowIsEven(const FunctionCallbackInfo<Value>& args) {
@@ -93,8 +92,7 @@ void Initialize(Local<Object> target,
 }
 #endif  // DEBUG
 
-}  // namespace debug
-}  // namespace node
+}  // namespace node::debug
 
 #ifdef DEBUG
 NODE_BINDING_CONTEXT_AWARE_INTERNAL(debug, node::debug::Initialize)
Repository: denoland/deno
Pull request: fix(fmt): handle TS as syntax in Svelte each block

closes #29768

Changed files:
filename: Cargo.lock
patch: @@ -5459,9 +5459,9 @@ dependencies = [
 
 [[package]]
 name = "markup_fmt"
-version = "0.19.1"
+version = "0.21.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff37c5cadfdf4d91c0f140d516755c055a184a4e37757ff4a071272635b9f546"
+checksum = "e59dd52b196245d3575b2af66ef15b0e20362de18b453dfbf264c258e8eefbf5"
 dependencies = [
  "aho-corasick",
  "css_dataset",

filename: Cargo.toml
patch: @@ -305,7 +305,7 @@ env_logger = "=0.11.6"
 fancy-regex = "=0.14.0"
 libsui = "0.10.0"
 malva = "=0.11.2"
-markup_fmt = "=0.19.1"
+markup_fmt = "=0.21.0"
 open = "5.0.1"
 pathdiff = "0.2.1"
 pretty_yaml = "=0.5.0"

filename: cli/tools/fmt.rs
patch: @@ -699,6 +699,7 @@ fn format_embedded_html(
         config::ClosingTagLineBreakForEmpty::Fit,
       max_attrs_per_line: None,
       prefer_attrs_single_line: false,
+      single_attr_same_line: false,
       html_normal_self_closing: None,
       html_void_self_closing: None,
       component_self_closing: None,
@@ -1515,6 +1516,7 @@ fn get_resolved_markup_fmt_config(
     closing_tag_line_break_for_empty: ClosingTagLineBreakForEmpty::Fit,
     max_attrs_per_line: None,
     prefer_attrs_single_line: false,
+    single_attr_same_line: false,
     html_normal_self_closing: None,
     html_void_self_closing: None,
     component_self_closing: None,

filename: tests/specs/fmt/external_formatter/syntax_error_in_html.out
patch: @@ -1,3 +1,3 @@
 Error formatting: [WILDLINE]syntax_error_in_html.js
-   Error formatting tagged template literal at line 2: syntax error 'expected close tag' at line 4, column 7
+   Error formatting tagged template literal at line 2: syntax error 'expected close tag for opening tag <h1> from line 4, column 2' at line 4, column 7
 error: Failed to format 1 of 1 checked file

filename: tests/specs/fmt/html/broken.out
patch: @@ -1,4 +1,4 @@
 Error formatting: [WILDCARD]broken.html
-   Syntax error (expected close tag) at file://[WILDCARD]broken.html:3:0
+   Syntax error (expected close tag for opening tag <div> from line 1, column 1) at file://[WILDCARD]broken.html:3:0
 
 error: Failed to format 1 of 1 checked file
Repository: facebook/react
Pull request: Add useModernStrictMode as dynamic flag on www

## Summary

Preparing modern strict mode rollout with dynamic feature flag

## How did you test this change?

![Screenshot 2024-02-15 at 10 09 49 AM](https://github.com/facebook/react/assets/8965173/9e90efc2-3578-4e63-ae2c-63d4a4e194b3)



Changed files:
filename: packages/shared/forks/ReactFeatureFlags.www-dynamic.js
patch: @@ -28,6 +28,7 @@ export const alwaysThrottleRetries = __VARIANT__;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = __VARIANT__;
 export const enableUseDeferredValueInitialArg = __VARIANT__;
 export const enableRenderableContext = __VARIANT__;
+export const useModernStrictMode = __VARIANT__;
 
 export const enableRetryLaneExpiration = __VARIANT__;
 export const retryLaneExpirationMs = 5000;

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -36,6 +36,7 @@ export const {
   transitionLaneExpirationMs,
   enableInfiniteRenderLoopDetection,
   enableRenderableContext,
+  useModernStrictMode,
 } = dynamicFeatureFlags;
 
 // On WWW, __EXPERIMENTAL__ is used for a new modern build.
@@ -103,7 +104,6 @@ export const allowConcurrentByDefault = true;
 
 export const consoleManagedByDevToolsDuringStrictMode = true;
 
-export const useModernStrictMode = false;
 export const enableFizzExternalRuntime = true;
 
 export const forceConcurrentByDefaultForTesting = false;
Repository: ggml-org/llama.cpp
Pull request: vulkan: make ggml_vk_default_dispatcher support older vulkan headers

Basically Vulkan headers [1.3.301 and newer](https://github.com/KhronosGroup/Vulkan-Headers/blob/cbcad3c0587dddc768d76641ea00f5c45ab5a278/include/vulkan/vulkan.hpp) contain `vk::detail::DispatchLoaderDynamic` and the older ones have `vk::DispatchLoaderDynamic` instead.

Changed files:
filename: ggml/src/ggml-vulkan/ggml-vulkan.cpp
patch: @@ -9,8 +9,14 @@
 #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
 // We use VULKAN_HPP_DEFAULT_DISPATCHER, but not VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
 // to avoid conflicts with applications or other libraries who might use it.
+#if VK_HEADER_VERSION >= 301
 namespace vk::detail { class DispatchLoaderDynamic; }
-vk::detail::DispatchLoaderDynamic & ggml_vk_default_dispatcher();
+using vk::detail::DispatchLoaderDynamic;
+#else
+namespace vk { class DispatchLoaderDynamic; }
+using vk::DispatchLoaderDynamic;
+#endif
+DispatchLoaderDynamic & ggml_vk_default_dispatcher();
 #define VULKAN_HPP_DEFAULT_DISPATCHER ggml_vk_default_dispatcher()
 
 #include <vulkan/vulkan.hpp>
@@ -4538,9 +4544,8 @@ static bool ggml_vk_instance_portability_enumeration_ext_available(const std::ve
 static bool ggml_vk_instance_debug_utils_ext_available(const std::vector<vk::ExtensionProperties> & instance_extensions);
 static bool ggml_vk_device_is_supported(const vk::PhysicalDevice & vkdev);
 
-static vk::detail::DispatchLoaderDynamic ggml_vk_default_dispatcher_instance;
-
-vk::detail::DispatchLoaderDynamic & ggml_vk_default_dispatcher() {
+static DispatchLoaderDynamic ggml_vk_default_dispatcher_instance;
+DispatchLoaderDynamic & ggml_vk_default_dispatcher() {
     return ggml_vk_default_dispatcher_instance;
 }
Repository: nodejs/node
Pull request: src: fix check fd

Fixed: https://github.com/nodejs/node/issues/55983

- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes
- [x] tests and/or benchmarks are included
- [x] documentation is changed or added
- [x] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)


Changed files:
filename: src/util.cc
patch: @@ -782,6 +782,16 @@ std::string DetermineSpecificErrorType(Environment* env,
         input.As<v8::Object>()->GetConstructorName();
     Utf8Value name(env->isolate(), constructor_name);
     return SPrintF("an instance of %s", name.out());
+  } else if (input->IsSymbol()) {
+    v8::MaybeLocal<v8::String> str =
+        input.As<v8::Symbol>()->ToDetailString(env->context());
+    v8::Local<v8::String> js_str;
+    if (!str.ToLocal(&js_str)) {
+      return "Symbol";
+    }
+    Utf8Value name(env->isolate(), js_str);
+    // Symbol(xxx)
+    return name.out();
   }
 
   Utf8Value utf8_value(env->isolate(),

filename: test/parallel/test-fs-stat.js
patch: @@ -212,3 +212,12 @@ fs.lstat(__filename, undefined, common.mustCall());
     assert.strictEqual(s.birthtime, 5);
   }));
 }
+
+{
+  assert.throws(
+    () => fs.fstat(Symbol('test'), () => {}),
+    {
+      code: 'ERR_INVALID_ARG_TYPE',
+    },
+  );
+}
Repository: nodejs/node
Pull request: doc: fix deprecation codes

https://github.com/nodejs/node/pull/55545 introduced a duplicate deprecation code and because of it [CI is now failing](https://github.com/nodejs/node/actions/workflows/doc.yml)

Changed files:
filename: doc/api/deprecations.md
patch: @@ -3786,7 +3786,7 @@ Type: Documentation-only
 Passing non-supported argument types is deprecated and, instead of returning `false`,
 will throw an error in a future version.
 
-### DEP0187: `process.features.ipv6` and `process.features.uv`
+### DEP0188: `process.features.ipv6` and `process.features.uv`
 
 <!-- YAML
 changes:
@@ -3799,7 +3799,7 @@ Type: Documentation-only
 
 These properties are unconditionally `true`. Any checks based on these properties are redundant.
 
-### DEP0188: `process.features.tls_*`
+### DEP0189: `process.features.tls_*`
 
 <!-- YAML
 changes:
Repository: huggingface/transformers
Pull request: fix glm4v image process

@amyeroberts , @qubvel 

Issue: shortest_edge and longest_edge in preprocess_config.json are being ignored during GLM-4V image preprocessing. Please investigate and fix.



Changed files:
filename: src/transformers/models/glm4v/image_processing_glm4v.py
patch: @@ -141,7 +141,7 @@ def __init__(
         super().__init__(**kwargs)
         if size is not None and ("shortest_edge" not in size or "longest_edge" not in size):
             raise ValueError("size must contain 'shortest_edge' and 'longest_edge' keys.")
-        else:
+        elif size is None:
             size = {"shortest_edge": 112 * 112, "longest_edge": 28 * 28 * 15000}
         self.size = size
Repository: vercel/next.js
Pull request: Turbopack: Add a flag to the fs watch fuzzer to print missing but expected invalidations

This can be useful in figuring what should've been invalidated, but wasn't.

`strace` can be used for figuring out what files/directories were actually modified.

Closes PACK-5150

Changed files:
filename: turbopack/crates/turbo-tasks-fuzz/src/main.rs
patch: @@ -50,6 +50,8 @@ struct FsWatcher {
     file_modifications: u32,
     #[arg(long, default_value_t = 2)]
     directory_modifications: u32,
+    #[arg(long)]
+    print_missing_invalidations: bool,
 }
 
 #[tokio::main]
@@ -135,6 +137,19 @@ async fn fuzz_fs_watcher(args: FsWatcher) -> anyhow::Result<()> {
                     modified_file_paths.len(),
                     invalidations.len()
                 );
+                if args.print_missing_invalidations {
+                    let absolute_path_invalidations = invalidations
+                        .iter()
+                        .map(|relative_path| fs_root.join(relative_path))
+                        .collect::<FxHashSet<PathBuf>>();
+                    let mut missing = modified_file_paths
+                        .difference(&absolute_path_invalidations)
+                        .collect::<Vec<_>>();
+                    missing.sort_unstable();
+                    for path in &missing {
+                        println!("  missing {path:?}");
+                    }
+                }
                 invalidations.clear();
             }
         }
Repository: facebook/react
Pull request: [Flight] Add support for returning `undefined` from render

## Summary

Adds support for returning `undefined` from Server Components.
Also fixes a bug where rendering an empty fragment would throw the same error as returning undefined.

## How did you test this change?

- [x] test failed with same error message I got when returning undefined from Server Components in a Next.js app
- [x] test passes after adding encoding for `undefined` 


Changed files:
filename: packages/react-client/src/ReactFlightClient.js
patch: @@ -556,6 +556,11 @@ export function parseModelString(
             throw chunk.reason;
         }
       }
+      case 'u': {
+        // matches "$undefined"
+        // Special encoding for `undefined` which can't be serialized as JSON otherwise.
+        return undefined;
+      }
       default: {
         // We assume that anything else is a reference ID.
         const id = parseInt(value.substring(1), 16);

filename: packages/react-client/src/__tests__/ReactFlight-test.js
patch: @@ -197,6 +197,38 @@ describe('ReactFlight', () => {
     expect(ReactNoop).toMatchRenderedOutput(<span>ABC</span>);
   });
 
+  it('can render undefined', async () => {
+    function Undefined() {
+      return undefined;
+    }
+
+    const model = <Undefined />;
+
+    const transport = ReactNoopFlightServer.render(model);
+
+    await act(async () => {
+      ReactNoop.render(await ReactNoopFlightClient.read(transport));
+    });
+
+    expect(ReactNoop).toMatchRenderedOutput(null);
+  });
+
+  it('can render an empty fragment', async () => {
+    function Empty() {
+      return <React.Fragment />;
+    }
+
+    const model = <Empty />;
+
+    const transport = ReactNoopFlightServer.render(model);
+
+    await act(async () => {
+      ReactNoop.render(await ReactNoopFlightClient.read(transport));
+    });
+
+    expect(ReactNoop).toMatchRenderedOutput(null);
+  });
+
   it('can render a lazy component as a shared component on the server', async () => {
     function SharedComponent({text}) {
       return (

filename: packages/react-server/src/ReactFlightServer.js
patch: @@ -117,6 +117,7 @@ export type ReactClientValue =
   | number
   | symbol
   | null
+  | void
   | Iterable<ReactClientValue>
   | Array<ReactClientValue>
   | ReactClientObject
@@ -546,6 +547,10 @@ function serializeProviderReference(name: string): string {
   return '$P' + name;
 }
 
+function serializeUndefined(): string {
+  return '$undefined';
+}
+
 function serializeClientReference(
   request: Request,
   parent:
@@ -1134,14 +1139,14 @@ export function resolveModelToJSON(
     return escapeStringValue(value);
   }
 
-  if (
-    typeof value === 'boolean' ||
-    typeof value === 'number' ||
-    typeof value === 'undefined'
-  ) {
+  if (typeof value === 'boolean' || typeof value === 'number') {
     return value;
   }
 
+  if (typeof value === 'undefined') {
+    return serializeUndefined();
+  }
+
   if (typeof value === 'function') {
     if (isClientReference(value)) {
       return serializeClientReference(request, parent, key, (value: any));
Repository: denoland/deno
Pull request: test: fix flakiness of specs::coverage::data_url

This PR tries to fix flakiness of `specs::coverage::data_url`.

`foo` is async function, but is not awaited

closes #29759 

Changed files:
filename: tests/specs/coverage/data_url/main_test.ts
patch: @@ -1,5 +1,5 @@
 import { foo } from "./main.ts";
 
-Deno.test("test", () => {
-  foo();
+Deno.test("test", async () => {
+  await foo();
 });
Repository: ggml-org/llama.cpp
Pull request: Improve code block color theming

Close #16191 

Implements both light and dark theme for code block in Markdown with reactive adjustments based on system/mode watcher state.


|Dark|Light|
|----|-----|
|<img width="2880" height="1800" alt="Zrzut ekranu z 2025-09-29 o 10 55 59" src="https://github.com/user-attachments/assets/3c5d6464-7cbc-4e04-b3fc-d94dd2ed9180" />|<img width="2880" height="1800" alt="Zrzut ekranu z 2025-09-29 o 10 56 10" src="https://github.com/user-attachments/assets/9ee7cc93-8302-4cae-a3f3-2a003473ab8d" />|


Changed files:
filename: tools/server/webui/src/app.css
patch: @@ -37,8 +37,8 @@
 	--sidebar-accent-foreground: oklch(0.205 0 0);
 	--sidebar-border: oklch(0.922 0 0);
 	--sidebar-ring: oklch(0.708 0 0);
-	--code-background: oklch(0.225 0 0);
-	--code-foreground: oklch(0.875 0 0);
+	--code-background: oklch(0.975 0 0);
+	--code-foreground: oklch(0.145 0 0);
 	--layer-popover: 1000000;
 }
 
@@ -74,6 +74,8 @@
 	--sidebar-accent-foreground: oklch(0.985 0 0);
 	--sidebar-border: oklch(1 0 0 / 10%);
 	--sidebar-ring: oklch(0.556 0 0);
+	--code-background: oklch(0.225 0 0);
+	--code-foreground: oklch(0.875 0 0);
 }
 
 @theme inline {

filename: tools/server/webui/src/lib/components/app/misc/MarkdownContent.svelte
patch: @@ -8,9 +8,13 @@
 	import rehypeKatex from 'rehype-katex';
 	import rehypeStringify from 'rehype-stringify';
 	import { copyCodeToClipboard } from '$lib/utils/copy';
-	import 'highlight.js/styles/github-dark.css';
+	import { browser } from '$app/environment';
 	import 'katex/dist/katex.min.css';
 
+	import githubDarkCss from 'highlight.js/styles/github-dark.css?inline';
+	import githubLightCss from 'highlight.js/styles/github.css?inline';
+	import { mode } from 'mode-watcher';
+
 	interface Props {
 		content: string;
 		class?: string;
@@ -21,6 +25,26 @@
 	let containerRef = $state<HTMLDivElement>();
 	let processedHtml = $state('');
 
+	function loadHighlightTheme(isDark: boolean) {
+		if (!browser) return;
+
+		const existingThemes = document.querySelectorAll('style[data-highlight-theme]');
+		existingThemes.forEach((style) => style.remove());
+
+		const style = document.createElement('style');
+		style.setAttribute('data-highlight-theme', 'true');
+		style.textContent = isDark ? githubDarkCss : githubLightCss;
+
+		document.head.appendChild(style);
+	}
+
+	$effect(() => {
+		const currentMode = mode.current;
+		const isDark = currentMode === 'dark';
+
+		loadHighlightTheme(isDark);
+	});
+
 	let processor = $derived(() => {
 		return remark()
 			.use(remarkGfm) // GitHub Flavored Markdown
Repository: electron/electron
Pull request: fix: handle OnDelegatedSourceListDismissed asynchronously

Backport of #46112

See that PR for details.


Notes: Fixed crash on Linux when PipeWire screenshare source selection is cancelled.


Changed files:
filename: shell/browser/api/electron_api_desktop_capturer.cc
patch: @@ -15,6 +15,7 @@
 #include "chrome/browser/media/webrtc/desktop_media_list.h"
 #include "chrome/browser/media/webrtc/thumbnail_capturer_mac.h"
 #include "chrome/browser/media/webrtc/window_icon_util.h"
+#include "content/public/browser/browser_thread.h"
 #include "content/public/browser/desktop_capture.h"
 #include "gin/handle.h"
 #include "gin/object_template_builder.h"
@@ -252,7 +253,8 @@ void DesktopCapturer::DesktopListListener::OnSourceThumbnailChanged(int index) {
 }
 
 void DesktopCapturer::DesktopListListener::OnDelegatedSourceListDismissed() {
-  std::move(failure_callback_).Run();
+  content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
+                                               std::move(failure_callback_));
 }
 
 void DesktopCapturer::StartHandling(bool capture_window,
Repository: vercel/next.js
Pull request: [segment explorer] windows compatibility

Let segment explorer tests running on windows CI to ensure it works with windows.

Closes NEXT-4633

Changed files:
filename: .github/workflows/build_and_test.yml
patch: @@ -654,7 +654,8 @@ jobs:
 
         node run-tests.js \
           test/e2e/app-dir/app/index.test.ts \
-          test/e2e/app-dir/app-edge/app-edge.test.ts
+          test/e2e/app-dir/app-edge/app-edge.test.ts \
+          test/development/app-dir/segment-explorer/segment-explorer.test.ts
       stepName: 'test-dev-windows'
       runs_on_labels: '["windows","self-hosted","x64"]'
       buildNativeTarget: 'x86_64-pc-windows-msvc'

filename: packages/next/src/server/app-render/segment-explorer-path.ts
patch: @@ -34,7 +34,7 @@ export function normalizeConventionFilePath(
     relativePath = `${BUILTIN_PREFIX}${relativePath}`
   }
 
-  return relativePath
+  return relativePath.replace(/\\/g, '/')
 }
 
 // if a filepath is a builtin file. e.g.
Repository: ggml-org/llama.cpp
Pull request: llama: fix (non hf) glm4 models

fixes segfault when running old (non hf) glm4 models
e.g. https://huggingface.co/THUDM/glm-4-9b-chat

fixes: #11651 

fixes inconsistency with:
https://github.com/ggerganov/llama.cpp/blob/9f4cc8f8d310b13ab3fc93a9be81b1d1376a7fa6/src/llama-model.cpp#L3086-L3088

Changed files:
filename: src/llama.cpp
patch: @@ -7217,7 +7217,7 @@ struct llm_build_context {
                 struct ggml_tensor * Qcur = nullptr;
                 struct ggml_tensor * Kcur = nullptr;
                 struct ggml_tensor * Vcur = nullptr;
-                if (model.type == LLM_TYPE_1_5B || model.type == LLM_TYPE_4B || model.type == LLM_TYPE_9B) {
+                if (model.layers[il].wqkv == nullptr) {
                     Qcur = llm_build_lora_mm(lctx, ctx0, model.layers[il].wq, cur);
                     if (model.layers[il].bq) {
                         Qcur = ggml_add(ctx0, Qcur, model.layers[il].bq);