diff --git a/src-tauri/src/chat_manager/execution/mod.rs b/src-tauri/src/chat_manager/execution/mod.rs index e8ea76dc3..7993a365d 100644 --- a/src-tauri/src/chat_manager/execution/mod.rs +++ b/src-tauri/src/chat_manager/execution/mod.rs @@ -1197,6 +1197,24 @@ pub(super) fn resolve_llama_xtc_threshold( .or(settings.advanced_model_settings.llama_xtc_threshold) } +pub(super) fn resolve_llama_top_n_sigma( + session: &Session, + model: &Model, + settings: &Settings, +) -> Option { + session + .advanced_model_settings + .as_ref() + .and_then(|cfg| cfg.llama_top_n_sigma) + .or_else(|| { + model + .advanced_model_settings + .as_ref() + .and_then(|cfg| cfg.llama_top_n_sigma) + }) + .or(settings.advanced_model_settings.llama_top_n_sigma) +} + pub(super) fn resolve_llama_adaptive_target( session: &Session, model: &Model, diff --git a/src-tauri/src/chat_manager/execution/provider_fields.rs b/src-tauri/src/chat_manager/execution/provider_fields.rs index ff7539e20..15283e215 100644 --- a/src-tauri/src/chat_manager/execution/provider_fields.rs +++ b/src-tauri/src/chat_manager/execution/provider_fields.rs @@ -24,7 +24,8 @@ use super::{ resolve_llama_sampler_order, resolve_llama_sampler_profile, resolve_llama_seed, resolve_llama_single_gpu_device_id_leveled, resolve_llama_streaming_enabled, resolve_llama_strict_mode, resolve_llama_swa_full, resolve_llama_threads, - resolve_llama_threads_batch, resolve_llama_ubatch_size, resolve_llama_xtc_probability, + resolve_llama_threads_batch, resolve_llama_top_n_sigma, resolve_llama_ubatch_size, + resolve_llama_xtc_probability, resolve_llama_xtc_threshold, resolve_max_tokens, resolve_presence_penalty, resolve_temperature, resolve_top_k, resolve_top_p, }; @@ -191,6 +192,9 @@ fn build_llama_extra_fields( if let Some(v) = resolve_llama_xtc_threshold(session, model, settings) { extra.insert("llamaXtcThreshold".to_string(), json!(v)); } + if let Some(v) = resolve_llama_top_n_sigma(session, model, settings) { + extra.insert("llamaTopNSigma".to_string(), json!(v)); + } if let Some(v) = resolve_llama_adaptive_target(session, model, settings) { extra.insert("llamaAdaptiveTarget".to_string(), json!(v)); } @@ -261,6 +265,7 @@ mod tests { llama_dry_sequence_breakers: Some(vec![":".to_string()]), llama_xtc_probability: Some(0.5), llama_xtc_threshold: Some(0.1), + llama_top_n_sigma: Some(1.5), llama_adaptive_target: Some(0.3), llama_adaptive_decay: Some(0.95), ..Default::default() @@ -307,7 +312,7 @@ mod tests { assert_eq!(extra.get("llamaNPenRange"), Some(&json!(64))); assert_eq!( extra.len(), - 44, + 45, "unexpected llama extra-body key count; a resolver stopped emitting or a new field was added without updating this fixture: {:?}", extra.keys().collect::>() ); diff --git a/src-tauri/src/chat_manager/feature_generation.rs b/src-tauri/src/chat_manager/feature_generation.rs index f92e04b00..3521e8866 100644 --- a/src-tauri/src/chat_manager/feature_generation.rs +++ b/src-tauri/src/chat_manager/feature_generation.rs @@ -96,6 +96,7 @@ impl FeatureGenerationSettings { llama_n_pen_range: self.llama_n_pen_range, llama_xtc_probability: self.llama_xtc_probability, llama_xtc_threshold: self.llama_xtc_threshold, + llama_top_n_sigma: self.llama_top_n_sigma, llama_dry_multiplier: self.llama_dry_multiplier, llama_dry_base: self.llama_dry_base, llama_dry_allowed_length: self.llama_dry_allowed_length, @@ -124,6 +125,7 @@ impl FeatureGenerationSettings { || self.llama_n_pen_range.is_some() || self.llama_xtc_probability.is_some() || self.llama_xtc_threshold.is_some() + || self.llama_top_n_sigma.is_some() || self.llama_dry_multiplier.is_some() || self.llama_dry_base.is_some() || self.llama_dry_allowed_length.is_some() diff --git a/src-tauri/src/chat_manager/types.rs b/src-tauri/src/chat_manager/types.rs index 58705774d..f47cbe447 100644 --- a/src-tauri/src/chat_manager/types.rs +++ b/src-tauri/src/chat_manager/types.rs @@ -519,6 +519,8 @@ pub struct FeatureGenerationSettings { #[serde(default)] pub llama_xtc_threshold: Option, #[serde(default)] + pub llama_top_n_sigma: Option, + #[serde(default)] pub llama_adaptive_target: Option, #[serde(default)] pub llama_adaptive_decay: Option, @@ -878,6 +880,8 @@ pub struct AdvancedModelSettings { #[serde(default, skip_serializing_if = "Option::is_none")] pub llama_xtc_threshold: Option, #[serde(default, skip_serializing_if = "Option::is_none")] + pub llama_top_n_sigma: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] pub llama_adaptive_target: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub llama_adaptive_decay: Option, @@ -1032,6 +1036,7 @@ impl Default for AdvancedModelSettings { llama_dry_sequence_breakers: None, llama_xtc_probability: None, llama_xtc_threshold: None, + llama_top_n_sigma: None, llama_adaptive_target: None, llama_adaptive_decay: None, llama_last_runtime_report: None, diff --git a/src-tauri/src/hf_browser/image_bundle.rs b/src-tauri/src/hf_browser/image_bundle.rs index 33eaade70..4dc80b4d4 100644 --- a/src-tauri/src/hf_browser/image_bundle.rs +++ b/src-tauri/src/hf_browser/image_bundle.rs @@ -294,7 +294,7 @@ fn to_search_result(detail: ApiModel) -> super::HfSearchResult { fn vae_family_term(profile: &sdcpp::HfBundleProfile) -> &'static str { if profile.id.starts_with("krea") { "wan" - } else if profile.id == "qwen-image-edit-2511" { + } else if profile.id.starts_with("qwen-image") { "qwen" } else { "flux" @@ -453,10 +453,10 @@ fn role_compatible(profile: &sdcpp::HfBundleProfile, role: &str, model_id: &str, match role { "diffusion_model" => profile.diffusion_markers.iter().any(|marker| evidence.contains(marker)), "text_encoder" => profile.encoder_markers.iter().any(|marker| evidence.contains(marker)), - "vision_encoder" => profile.id == "qwen-image-edit-2511" + "vision_encoder" => profile.id.starts_with("qwen-image") && (evidence.contains("mmproj") || evidence.contains("vision")), "vae" if profile.id.starts_with("krea") => evidence.contains("wan") && evidence.contains("vae"), - "vae" if profile.id == "qwen-image-edit-2511" => evidence.contains("qwen") && evidence.contains("vae"), + "vae" if profile.id.starts_with("qwen-image") => evidence.contains("qwen") && evidence.contains("vae"), "vae" => (evidence.contains("flux") || evidence.contains("ae.")) && (evidence.contains("vae") || evidence.contains("ae.")), _ => false, } @@ -482,6 +482,8 @@ async fn gguf_architecture_hint( [ "qwen2.5-vl-7b", "qwen2.5vl-7b", + "qwen3-vl-8b", + "qwen3vl-8b", "qwen3-vl-4b", "qwen3vl-4b", "qwen3-8b", diff --git a/src-tauri/src/image_generator/sdcpp.rs b/src-tauri/src/image_generator/sdcpp.rs index ae87ef63c..b59a43a70 100644 --- a/src-tauri/src/image_generator/sdcpp.rs +++ b/src-tauri/src/image_generator/sdcpp.rs @@ -542,6 +542,80 @@ const QWEN_VARIANTS: &[VariantSpec] = &[ }, ]; +const QWEN21_SHARED: &[ComponentSpec] = &[ + ComponentSpec { + role: "text_encoder", + repo: "unsloth/Qwen3-VL-8B-Instruct-GGUF", + revision: "b93a7ee713758252c555be4210c00540df954dc2", + filename: "Qwen3-VL-8B-Instruct-Q4_K_M.gguf", + bytes: 5_027_785_568, + sha256: "108e7ff92b78eefd3db4741885104acba514255c11b617d3c7b197a5f46efe89", + }, + ComponentSpec { + role: "vision_encoder", + repo: "unsloth/Qwen3-VL-8B-Instruct-GGUF", + revision: "b93a7ee713758252c555be4210c00540df954dc2", + filename: "mmproj-BF16.gguf", + bytes: 1_162_569_280, + sha256: "6516bb64bae1503a0fcd7ec9fa39655f8c481580be0a0a066397941d9761c9f4", + }, + ComponentSpec { + role: "vae", + repo: "Comfy-Org/Qwen-Image-2.1", + revision: "0217efd1d9c9452e84f6448903d6e21bfa171ffd", + filename: "vae/qwen_image_2.1_vae_bf16.safetensors", + bytes: 675_509_688, + sha256: "bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9", + }, +]; +const QWEN21_VARIANTS: &[VariantSpec] = &[ + VariantSpec { + id: "q3-k", + label: "Q3 K (smaller)", + description: "Lower memory use with a modest quality tradeoff.", + recommended: false, + smaller: true, + diffusion: ComponentSpec { + role: "diffusion_model", + repo: "leejet/Qwen-Image-2.1-GGUF", + revision: "cc11433936a06e9765f7c0c0b1f0436cfd2b9856", + filename: "qwen_image_2.1-Q3_K.gguf", + bytes: 3_270_553_632, + sha256: "5a6352cb450d334ba17a9d18c7fd8c3e774799245b9da0f963ce0c6624deb758", + }, + }, + VariantSpec { + id: "q4-k", + label: "Q4 K (recommended)", + description: "Best default balance of image quality, speed, and memory.", + recommended: true, + smaller: false, + diffusion: ComponentSpec { + role: "diffusion_model", + repo: "leejet/Qwen-Image-2.1-GGUF", + revision: "cc11433936a06e9765f7c0c0b1f0436cfd2b9856", + filename: "qwen_image_2.1-Q4_K.gguf", + bytes: 4_197_494_816, + sha256: "29f9c83c249ff0292fb2943fceddfa2319b446601866c82a4f8be062abea72c2", + }, + }, + VariantSpec { + id: "q6-k", + label: "Q6 K (higher quality)", + description: "Higher precision with greater memory and storage use.", + recommended: false, + smaller: false, + diffusion: ComponentSpec { + role: "diffusion_model", + repo: "leejet/Qwen-Image-2.1-GGUF", + revision: "cc11433936a06e9765f7c0c0b1f0436cfd2b9856", + filename: "qwen_image_2.1-Q6_K.gguf", + bytes: 5_996_851_232, + sha256: "1c51d1a8e6cf2b215719dea0c4f0f4cbfff9214a1c7571e57913f57d6a9c3c12", + }, + }, +]; + const PROFILES: &[ProfileSpec] = &[ ProfileSpec { id: "z-image-turbo", @@ -703,6 +777,26 @@ const PROFILES: &[ProfileSpec] = &[ variants: QWEN_VARIANTS, shared_components: QWEN_SHARED, }, + ProfileSpec { + id: "qwen-image-2.1", + display_name: "Qwen Image 2.1", + family: "Qwen", + description: "Unified text-to-image and multi-reference editing with native transparency and strong in-image text rendering.", + license: "Qwen-Image Research License (non-commercial)", + source_url: "https://huggingface.co/Qwen/Qwen-Image-2.1", + supports_text_to_image: true, + supports_image_edit: true, + max_reference_images: Some(10), + requires_reference_image: false, + recommended_for_scenes: true, + default_width: 1024, + default_height: 1024, + default_steps: 35, + default_cfg: 6.0, + minimum_runtime_build: Some(883), + variants: QWEN21_VARIANTS, + shared_components: QWEN21_SHARED, + }, ]; #[derive(Debug, Clone, Serialize)] @@ -763,6 +857,11 @@ fn hf_profile_rules(profile: &ProfileSpec) -> (Vec<&'static str>, Vec<&'static s vec!["qwen2.5-vl-7b", "qwen2.5vl-7b"], 7.0, ), + "qwen-image-2.1" => ( + vec!["qwen-image-2.1", "qwen_image_2.1", "qwen-image-2-1", "qwen_image_2_1"], + vec!["qwen3-vl-8b", "qwen3vl-8b"], + 8.0, + ), _ => (Vec::new(), Vec::new(), 0.0), } } @@ -3852,6 +3951,7 @@ fn profile_lora_architecture(profile_id: Option<&str>) -> Option<&'static str> { "flux-2-klein-9b" | "flux-2-klein-base-9b" => Some("flux2-klein-9b"), "krea-2-turbo" | "krea-2-raw" => Some("krea-2"), "qwen-image-edit-2511" => Some("qwen-image-edit-2511"), + "qwen-image-2.1" => Some("qwen-image-2.1"), _ => None, } } @@ -4882,6 +4982,13 @@ async fn ensure_server( if let Some(params_backend_spec) = params_backend_spec { command.arg("--params-backend").arg(params_backend_spec); } + } else if runtime_build_number(&config.sdcpp_runtime_release) + .map_or(true, |build| build >= AUTO_FIT_VALUE_MIN_BUILD) + { + // stable-diffusion.cpp master-962 (PR #2132) turned --auto-fit into a + // value-taking option; older builds still expect the bare flag, and an + // unknown/non-numbered tag is treated as current. + command.arg("--auto-fit").arg("on"); } else { command.arg("--auto-fit"); } @@ -5832,6 +5939,10 @@ fn find_profile_variant( Ok((profile, variant)) } +/// stable-diffusion.cpp build at which `--auto-fit` became a value-taking +/// option (`on`/`off`) instead of a bare flag (PR #2132, commit d763dae). +const AUTO_FIT_VALUE_MIN_BUILD: u32 = 962; + fn runtime_build_number(release: &str) -> Option { release .strip_prefix("master-")? diff --git a/src-tauri/src/llama_cpp/desktop/sampler.rs b/src-tauri/src/llama_cpp/desktop/sampler.rs index 86aedb3a1..57076859a 100644 --- a/src-tauri/src/llama_cpp/desktop/sampler.rs +++ b/src-tauri/src/llama_cpp/desktop/sampler.rs @@ -1,7 +1,7 @@ use super::*; pub(super) const DEFAULT_LLAMA_SAMPLER_PROFILE: &str = "balanced"; -pub(super) const DEFAULT_LLAMA_SAMPLER_ORDER: [&str; 10] = [ +pub(super) const DEFAULT_LLAMA_SAMPLER_ORDER: [&str; 11] = [ "penalties", "grammar", "top_k", @@ -10,6 +10,7 @@ pub(super) const DEFAULT_LLAMA_SAMPLER_ORDER: [&str; 10] = [ "dry", "typical", "xtc", + "top_n_sigma", "temp", "adaptive_p", ]; @@ -44,6 +45,7 @@ pub(super) struct ResolvedSamplerConfig { pub(super) dry_sequence_breakers: Option>, pub(super) xtc_probability: Option, pub(super) xtc_threshold: Option, + pub(super) top_n_sigma: Option, pub(super) frequency_penalty: Option, pub(super) presence_penalty: Option, pub(super) adaptive_target: Option, @@ -176,6 +178,7 @@ fn normalize_sampler_stage(value: &str) -> Option<&'static str> { "dry" => Some("dry"), "typical" | "typ_p" | "typical_p" => Some("typical"), "xtc" => Some("xtc"), + "top_n_sigma" | "top_nsigma" | "topnsigma" | "nsigma" => Some("top_n_sigma"), "temp" | "temperature" => Some("temp"), "adaptive_p" | "adaptivep" | "adaptive" => Some("adaptive_p"), _ => None, @@ -416,6 +419,10 @@ pub(super) fn build_sampler( config.seed.unwrap_or_else(rand::random::), ) }); + let mut top_n_sigma_sampler = config.top_n_sigma.filter(|n| *n > 0.0).map(|n| { + active_params.insert("top_n_sigma".to_string(), json!(n)); + LlamaSampler::top_n_sigma(n as f32) + }); let mut adaptive_requested = false; for stage in requested_order { @@ -468,6 +475,12 @@ pub(super) fn build_sampler( samplers.push(sampler); } } + "top_n_sigma" => { + if let Some(sampler) = top_n_sigma_sampler.take() { + order.push("top_n_sigma"); + samplers.push(sampler); + } + } "temp" => { if config.temperature > 0.0 { order.push("temp"); diff --git a/src-tauri/src/llama_cpp/mod.rs b/src-tauri/src/llama_cpp/mod.rs index 0f6bc65b8..c30ea8d27 100644 --- a/src-tauri/src/llama_cpp/mod.rs +++ b/src-tauri/src/llama_cpp/mod.rs @@ -1298,6 +1298,13 @@ mod desktop { .or_else(|| body.get("llamaXtcThreshold")) .or_else(|| body.get("llama_xtc_threshold")) .and_then(|v| v.as_f64()); + let top_n_sigma = body + .get("top_n_sigma") + .or_else(|| body.get("topNSigma")) + .or_else(|| body.get("llamaTopNSigma")) + .or_else(|| body.get("llama_top_n_sigma")) + .and_then(|v| v.as_f64()) + .filter(|v| *v > 0.0); let adaptive_target = body .get("adaptive_target") .or_else(|| body.get("adaptiveTarget")) @@ -3984,6 +3991,7 @@ mod desktop { dry_sequence_breakers: dry_sequence_breakers.clone(), xtc_probability, xtc_threshold, + top_n_sigma, frequency_penalty, presence_penalty, adaptive_target, diff --git a/src-tauri/src/providers/config.rs b/src-tauri/src/providers/config.rs index 1adf46e6c..b4970362b 100644 --- a/src-tauri/src/providers/config.rs +++ b/src-tauri/src/providers/config.rs @@ -72,6 +72,7 @@ fn supported_extra_body_keys(provider_id: &str) -> &'static [&'static str] { "llamaDrySequenceBreakers", "llamaXtcProbability", "llamaXtcThreshold", + "llamaTopNSigma", "llamaAdaptiveTarget", "llamaAdaptiveDecay", "llamaDisableSamplerProfileDefaults", diff --git a/src/core/i18n/locales/de.ts b/src/core/i18n/locales/de.ts index 2faf3de58..3c094805c 100644 --- a/src/core/i18n/locales/de.ts +++ b/src/core/i18n/locales/de.ts @@ -4822,6 +4822,7 @@ export const deMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Letzte Tokens für Wiederholungs-, Häufigkeits- und Anwesenheitsstrafen; `-1` nutzt den gesamten Kontext", xtcProbability: "XTC-Wahrscheinlichkeit", xtcThreshold: "XTC-Schwellenwert", + topNSigma: "Top-n-sigma", localOverride: "Lokale Überschreibung", dryMultiplier: "DRY-Multiplikator", dryMultiplierDescription: "`0` deaktiviert die Sequenzwiederholungskontrolle", @@ -8815,6 +8816,9 @@ export const deMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Wahrscheinlichkeit, Top-Tokens auszuschließen (0 = aus). Erhöht die Vielfalt.", xtcThreshold: "XTC-Schwellenwert", xtcThresholdDesc: "Mindestwahrscheinlichkeit, die ein Token für die XTC-Entfernung haben muss.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Behält nur Tokens innerhalb von n Standardabweichungen des Top-Logits (0 = aus). Ersetzt Top-k/Top-p/Min-p.", seed: "Seed", seedDesc: "Zufalls-Seed. Leer lassen für zufällig.", ropeBase: "RoPE Base", @@ -8971,6 +8975,7 @@ export const deMessages: DeepPartialMessageTree = { penaltyRange: "Strafbereich", xtcProbability: "XTC-Wahrscheinlichkeit", xtcThreshold: "XTC-Schwellenwert", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY-Multiplikator", dryBase: "DRY Base", dryAllowedLength: "DRY-Erlaubte-Länge", @@ -9052,6 +9057,10 @@ export const deMessages: DeepPartialMessageTree = { label: "XTC", desc: "Top-Optionen ausschließen – verwirft hochwahrscheinliche Tokens für mehr Vielfalt.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Behält nur Tokens innerhalb von n Standardabweichungen des Top-Logits. Aus, solange n nicht gesetzt ist; soll Top-k/Top-p/Min-p ersetzen.", + }, temp: { label: "Temperature", desc: "Die endgültige Verteilung vor der Auswahl abflachen oder schärfen.", diff --git a/src/core/i18n/locales/el.ts b/src/core/i18n/locales/el.ts index a69c71a64..1a72f7a00 100644 --- a/src/core/i18n/locales/el.ts +++ b/src/core/i18n/locales/el.ts @@ -4818,6 +4818,7 @@ export const elMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Πρόσφατα tokens για ποινές επανάληψης, συχνότητας και παρουσίας· το `-1` χρησιμοποιεί όλο το πλαίσιο", xtcProbability: "Πιθανότητα XTC", xtcThreshold: "Κατώφλι XTC", + topNSigma: "Top-n-sigma", localOverride: "Τοπική αντικατάσταση", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "Το `0` απενεργοποιεί τον έλεγχο επανάληψης ακολουθίας", @@ -8811,6 +8812,9 @@ export const elMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Πιθανότητα αποκλεισμού των κορυφαίων tokens (0 = ανενεργό). Αυξάνει την ποικιλία.", xtcThreshold: "Κατώφλι XTC", xtcThresholdDesc: "Ελάχιστη πιθανότητα που χρειάζεται ένα token για να αφαιρεθεί από το XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Διατηρεί τα token εντός n τυπικών αποκλίσεων από το κορυφαίο logit (0 = ανενεργό). Αντικαθιστά τα top-k/top-p/min-p.", seed: "Seed", seedDesc: "Τυχαίο seed. Αφήστε κενό για τυχαίο.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const elMessages: DeepPartialMessageTree = { penaltyRange: "Εύρος ποινής", xtcProbability: "Πιθανότητα XTC", xtcThreshold: "Κατώφλι XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -9048,6 +9053,10 @@ export const elMessages: DeepPartialMessageTree = { label: "XTC", desc: "Αποκλεισμός κορυφαίων επιλογών — απορρίπτει tokens υψηλής πιθανότητας για ποικιλία.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Διατηρεί μόνο τα token εντός n τυπικών αποκλίσεων από το κορυφαίο logit. Ανενεργό εκτός αν οριστεί το n· προορίζεται να αντικαταστήσει τα top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Ομαλοποίηση ή όξυνση της τελικής κατανομής πριν την επιλογή.", diff --git a/src/core/i18n/locales/en.ts b/src/core/i18n/locales/en.ts index 6d50db666..491172f57 100644 --- a/src/core/i18n/locales/en.ts +++ b/src/core/i18n/locales/en.ts @@ -5006,6 +5006,7 @@ export const enMessages = { "Recent tokens used by repeat, frequency, and presence penalties; `-1` uses the full context", xtcProbability: "XTC Probability", xtcThreshold: "XTC Threshold", + topNSigma: "Top-n-sigma", adaptiveTarget: "Adaptive-P Target", adaptiveTargetDescription: "Target probability for Adaptive-P; leave empty to keep the standard final sampling step", @@ -9498,6 +9499,9 @@ export const enMessages = { xtcProbabilityDesc: "Chance of excluding top tokens (0 = off). Boosts variety.", xtcThreshold: "XTC Threshold", xtcThresholdDesc: "Min probability a token needs to be eligible for XTC removal.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Keep tokens within n std-devs of the top logit (0 = off). Replaces top-k/top-p/min-p.", adaptiveTarget: "Adaptive-P Target", adaptiveTargetDesc: "Aim for tokens near this probability. Empty keeps normal sampling.", adaptiveDecay: "Adaptive-P Target Decay", @@ -9659,6 +9663,7 @@ export const enMessages = { penaltyRange: "Penalty Range", xtcProbability: "XTC Probability", xtcThreshold: "XTC Threshold", + topNSigma: "Top-n-sigma", adaptiveTarget: "Adaptive-P Target", adaptiveDecay: "Adaptive-P Target Decay", dryMultiplier: "DRY Multiplier", @@ -9741,6 +9746,10 @@ export const enMessages = { label: "XTC", desc: "Exclude Top Choices — drop high-probability tokens for variety.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Keep only tokens within n standard deviations of the top logit. Off unless n is set; meant to replace top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Flatten or sharpen the final distribution before selection.", diff --git a/src/core/i18n/locales/es.ts b/src/core/i18n/locales/es.ts index 5db271bf5..a6d79aac7 100644 --- a/src/core/i18n/locales/es.ts +++ b/src/core/i18n/locales/es.ts @@ -4818,6 +4818,7 @@ export const esMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Tokens recientes usados por las penalizaciones de repetición, frecuencia y presencia; `-1` usa todo el contexto", xtcProbability: "Probabilidad XTC", xtcThreshold: "Umbral XTC", + topNSigma: "Top-n-sigma", localOverride: "Anulación local", dryMultiplier: "Multiplicador DRY", dryMultiplierDescription: "`0` desactiva el control de repetición de secuencias", @@ -8811,6 +8812,9 @@ export const esMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Probabilidad de excluir los tokens principales (0 = desactivado). Aumenta la variedad.", xtcThreshold: "Umbral XTC", xtcThresholdDesc: "Probabilidad mínima que necesita un token para que XTC pueda eliminarlo.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Mantiene los tokens dentro de n desviaciones estándar del logit principal (0 = desactivado). Reemplaza a top-k/top-p/min-p.", seed: "Seed", seedDesc: "Semilla aleatoria. Dejar en blanco para aleatorio.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const esMessages: DeepPartialMessageTree = { penaltyRange: "Rango de penalización", xtcProbability: "Probabilidad XTC", xtcThreshold: "Umbral XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "Multiplicador DRY", dryBase: "Base DRY", dryAllowedLength: "Longitud permitida DRY", @@ -9048,6 +9053,10 @@ export const esMessages: DeepPartialMessageTree = { label: "XTC", desc: "Excluir las opciones principales: descarta tokens de alta probabilidad para dar variedad.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Mantiene solo los tokens dentro de n desviaciones estándar del logit principal. Desactivado salvo que se defina n; pensado para reemplazar a top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Aplanar o agudizar la distribución final antes de la selección.", diff --git a/src/core/i18n/locales/fil.ts b/src/core/i18n/locales/fil.ts index eda79ebd6..0e01b27d6 100644 --- a/src/core/i18n/locales/fil.ts +++ b/src/core/i18n/locales/fil.ts @@ -4818,6 +4818,7 @@ export const filMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Mga kamakailang token para sa repeat, frequency, at presence penalty; ginagamit ng `-1` ang buong context", xtcProbability: "Probabilidad ng XTC", xtcThreshold: "Threshold ng XTC", + topNSigma: "Top-n-sigma", localOverride: "Local override", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "Ina-disable ng `0` ang sequence repetition control", @@ -8811,6 +8812,9 @@ export const filMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Tsansang i-exclude ang mga nangungunang token (0 = naka-off). Nagpapataas ng pagkakaiba-iba.", xtcThreshold: "Threshold ng XTC", xtcThresholdDesc: "Pinakamababang probabilidad na kailangan ng token para matanggal ito ng XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Pinapanatili ang mga token sa loob ng n standard deviation mula sa pinakamataas na logit (0 = naka-off). Pumapalit sa top-k/top-p/min-p.", seed: "Seed", seedDesc: "Random seed. Iwanang blangko para random.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const filMessages: DeepPartialMessageTree = { penaltyRange: "Saklaw ng penalty", xtcProbability: "Probabilidad ng XTC", xtcThreshold: "Threshold ng XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -9048,6 +9053,10 @@ export const filMessages: DeepPartialMessageTree = { label: "XTC", desc: "Exclude Top Choices — inaalis ang mga high-probability na token para sa pagkakaiba-iba.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Pinapanatili lamang ang mga token sa loob ng n standard deviation mula sa pinakamataas na logit. Naka-off maliban kung nakatakda ang n; nilayong palitan ang top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Patagin o patulisin ang final distribution bago pumili.", diff --git a/src/core/i18n/locales/fr.ts b/src/core/i18n/locales/fr.ts index 434fc95df..b749ebace 100644 --- a/src/core/i18n/locales/fr.ts +++ b/src/core/i18n/locales/fr.ts @@ -4818,6 +4818,7 @@ export const frMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Tokens récents utilisés par les pénalités de répétition, fréquence et présence ; `-1` utilise tout le contexte", xtcProbability: "Probabilité XTC", xtcThreshold: "Seuil XTC", + topNSigma: "Top-n-sigma", localOverride: "Remplacement local", dryMultiplier: "Multiplicateur DRY", dryMultiplierDescription: "`0` désactive le contrôle de répétition de séquence", @@ -8811,6 +8812,9 @@ export const frMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Probabilité d'exclure les tokens les plus probables (0 = désactivé). Augmente la variété.", xtcThreshold: "Seuil XTC", xtcThresholdDesc: "Probabilité minimale qu'un token doit avoir pour être éligible à la suppression XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Conserve les tokens situés à n écarts-types du logit le plus élevé (0 = désactivé). Remplace top-k/top-p/min-p.", seed: "Seed", seedDesc: "Graine aléatoire. Laisser vide pour aléatoire.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const frMessages: DeepPartialMessageTree = { penaltyRange: "Fenêtre de pénalité", xtcProbability: "Probabilité XTC", xtcThreshold: "Seuil XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "Multiplicateur DRY", dryBase: "Base DRY", dryAllowedLength: "Longueur autorisée DRY", @@ -9048,6 +9053,10 @@ export const frMessages: DeepPartialMessageTree = { label: "XTC", desc: "Exclure les meilleurs choix — écarte les tokens très probables pour plus de variété.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Ne conserve que les tokens situés à n écarts-types du logit le plus élevé. Désactivé tant que n n'est pas défini ; destiné à remplacer top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Aplatir ou affiner la distribution finale avant la sélection.", diff --git a/src/core/i18n/locales/hi.ts b/src/core/i18n/locales/hi.ts index 54b59e909..cf81187f4 100644 --- a/src/core/i18n/locales/hi.ts +++ b/src/core/i18n/locales/hi.ts @@ -7995,6 +7995,9 @@ export const hiMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "शीर्ष टोकन को बाहर करने की संभावना (0 = बंद)। विविधता बढ़ाता है।", xtcThreshold: "XTC सीमा", xtcThresholdDesc: "XTC द्वारा हटाने योग्य होने के लिए टोकन को आवश्यक न्यूनतम प्रायिकता।", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "शीर्ष logit के n मानक विचलनों के भीतर के टोकन रखता है (0 = बंद)। top-k/top-p/min-p की जगह लेता है।", seed: "Seed", seedDesc: "रैंडम seed। रैंडम के लिए खाली छोड़ें।", ropeBase: "RoPE Base", @@ -8151,6 +8154,7 @@ export const hiMessages: DeepPartialMessageTree = { penaltyRange: "पेनल्टी रेंज", xtcProbability: "XTC प्रायिकता", xtcThreshold: "XTC सीमा", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -8232,6 +8236,10 @@ export const hiMessages: DeepPartialMessageTree = { label: "XTC", desc: "शीर्ष विकल्पों को बाहर करें — विविधता के लिए उच्च-संभावना वाले टोकन हटाता है।", }, + topNSigma: { + label: "Top-n-sigma", + desc: "केवल शीर्ष logit के n मानक विचलनों के भीतर के टोकन रखता है। जब तक n सेट न हो तब तक बंद; इसका उद्देश्य top-k/top-p/min-p की जगह लेना है।", + }, temp: { label: "Temperature", desc: "चयन से पहले अंतिम वितरण को समतल या तेज़ करें।", @@ -10218,6 +10226,7 @@ export const hiMessages: DeepPartialMessageTree = { penaltyRangeDescription: "रिपीट, फ़्रीक्वेंसी और प्रेज़ेन्स पेनल्टी के लिए हाल के टोकन; `-1` पूरा कॉन्टेक्स्ट उपयोग करता है", xtcProbability: "XTC प्रायिकता", xtcThreshold: "XTC सीमा", + topNSigma: "Top-n-sigma", localOverride: "लोकल ओवरराइड (Local override)", dryMultiplier: "DRY मल्टीप्लायर (DRY Multiplier)", dryMultiplierDescription: "`0` सीक्वेंस रिपिटिशन कंट्रोल को अक्षम करता है", diff --git a/src/core/i18n/locales/id.ts b/src/core/i18n/locales/id.ts index f89e70cab..ca88d09c2 100644 --- a/src/core/i18n/locales/id.ts +++ b/src/core/i18n/locales/id.ts @@ -7995,6 +7995,9 @@ export const idMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Peluang mengecualikan token teratas (0 = nonaktif). Menambah variasi.", xtcThreshold: "Ambang XTC", xtcThresholdDesc: "Probabilitas minimum yang dibutuhkan token agar bisa dihapus oleh XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Mempertahankan token dalam n simpangan baku dari logit teratas (0 = nonaktif). Menggantikan top-k/top-p/min-p.", seed: "Seed", seedDesc: "Seed acak. Kosongkan untuk acak.", ropeBase: "RoPE Base", @@ -8151,6 +8154,7 @@ export const idMessages: DeepPartialMessageTree = { penaltyRange: "Rentang penalti", xtcProbability: "Probabilitas XTC", xtcThreshold: "Ambang XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -8232,6 +8236,10 @@ export const idMessages: DeepPartialMessageTree = { label: "XTC", desc: "Kecualikan Pilihan Teratas — membuang token berprobabilitas tinggi demi variasi.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Hanya mempertahankan token dalam n simpangan baku dari logit teratas. Nonaktif kecuali n diatur; dimaksudkan untuk menggantikan top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Ratakan atau pertajam distribusi akhir sebelum pemilihan.", @@ -10218,6 +10226,7 @@ export const idMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Token terbaru untuk penalti pengulangan, frekuensi, dan kehadiran; `-1` memakai seluruh konteks", xtcProbability: "Probabilitas XTC", xtcThreshold: "Ambang XTC", + topNSigma: "Top-n-sigma", localOverride: "Penggantian lokal", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "`0` menonaktifkan kontrol pengulangan urutan", diff --git a/src/core/i18n/locales/it.ts b/src/core/i18n/locales/it.ts index 1becdf199..4634487a3 100644 --- a/src/core/i18n/locales/it.ts +++ b/src/core/i18n/locales/it.ts @@ -7995,6 +7995,9 @@ export const itMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Probabilità di escludere i token più probabili (0 = disattivato). Aumenta la varietà.", xtcThreshold: "Soglia XTC", xtcThresholdDesc: "Probabilità minima che un token deve avere per essere rimosso da XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Mantiene i token entro n deviazioni standard dal logit principale (0 = disattivato). Sostituisce top-k/top-p/min-p.", seed: "Seed", seedDesc: "Seed casuale. Lascia vuoto per casuale.", ropeBase: "RoPE Base", @@ -8151,6 +8154,7 @@ export const itMessages: DeepPartialMessageTree = { penaltyRange: "Intervallo penalità", xtcProbability: "Probabilità XTC", xtcThreshold: "Soglia XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -8232,6 +8236,10 @@ export const itMessages: DeepPartialMessageTree = { label: "XTC", desc: "Escludi le scelte principali — scarta i token ad alta probabilità per più varietà.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Mantiene solo i token entro n deviazioni standard dal logit principale. Disattivato finché n non è impostato; pensato per sostituire top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Appiattisce o acuisce la distribuzione finale prima della selezione.", @@ -10218,6 +10226,7 @@ export const itMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Token recenti usati dalle penalità di ripetizione, frequenza e presenza; `-1` usa l'intero contesto", xtcProbability: "Probabilità XTC", xtcThreshold: "Soglia XTC", + topNSigma: "Top-n-sigma", localOverride: "Override locale", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "`0` disabilita il controllo della ripetizione di sequenze", diff --git a/src/core/i18n/locales/ja.ts b/src/core/i18n/locales/ja.ts index 12df14b64..4dc69d592 100644 --- a/src/core/i18n/locales/ja.ts +++ b/src/core/i18n/locales/ja.ts @@ -7995,6 +7995,9 @@ export const jaMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "上位トークンを除外する確率(0 = オフ)。多様性を高めます。", xtcThreshold: "XTC しきい値", xtcThresholdDesc: "トークンが XTC による除外対象となるために必要な最小確率。", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "最上位ロジットから n 標準偏差以内のトークンのみを残します(0 = オフ)。top-k/top-p/min-p を置き換えます。", seed: "Seed", seedDesc: "ランダムシード。空白でランダム。", ropeBase: "RoPE Base", @@ -8151,6 +8154,7 @@ export const jaMessages: DeepPartialMessageTree = { penaltyRange: "ペナルティ範囲", xtcProbability: "XTC 確率", xtcThreshold: "XTC しきい値", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -8232,6 +8236,10 @@ export const jaMessages: DeepPartialMessageTree = { label: "XTC", desc: "上位の選択肢を除外 — 多様性のために高確率のトークンを捨てます。", }, + topNSigma: { + label: "Top-n-sigma", + desc: "最上位ロジットから n 標準偏差以内のトークンのみを残します。n が設定されない限りオフ。top-k/top-p/min-p を置き換えることを目的としています。", + }, temp: { label: "Temperature", desc: "選択前に最終分布を平坦化またはシャープ化。", @@ -10218,6 +10226,7 @@ export const jaMessages: DeepPartialMessageTree = { penaltyRangeDescription: "繰り返し・頻度・存在ペナルティに使う直近のトークン数。`-1` はコンテキスト全体を使用します", xtcProbability: "XTC 確率", xtcThreshold: "XTC しきい値", + topNSigma: "Top-n-sigma", localOverride: "ローカルオーバーライド", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "`0` でシーケンス反復制御を無効化", diff --git a/src/core/i18n/locales/ko.ts b/src/core/i18n/locales/ko.ts index 36dd9059d..31fd0a114 100644 --- a/src/core/i18n/locales/ko.ts +++ b/src/core/i18n/locales/ko.ts @@ -4818,6 +4818,7 @@ export const koMessages: DeepPartialMessageTree = { penaltyRangeDescription: "반복, 빈도 및 존재 페널티에 사용할 최근 토큰 수이며 `-1`은 전체 컨텍스트를 사용합니다", xtcProbability: "XTC 확률", xtcThreshold: "XTC 임계값", + topNSigma: "Top-n-sigma", localOverride: "로컬 재정의", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "`0`은 시퀀스 반복 제어를 비활성화합니다", @@ -8811,6 +8812,9 @@ export const koMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "상위 토큰을 제외할 확률 (0 = 끔). 다양성을 높입니다.", xtcThreshold: "XTC 임계값", xtcThresholdDesc: "토큰이 XTC 제거 대상이 되기 위해 필요한 최소 확률.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "최상위 로짓에서 n 표준편차 이내의 토큰만 유지합니다 (0 = 끔). top-k/top-p/min-p를 대체합니다.", seed: "Seed", seedDesc: "랜덤 시드. 비워두면 무작위.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const koMessages: DeepPartialMessageTree = { penaltyRange: "페널티 범위", xtcProbability: "XTC 확률", xtcThreshold: "XTC 임계값", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -9048,6 +9053,10 @@ export const koMessages: DeepPartialMessageTree = { label: "XTC", desc: "상위 선택 제외 — 다양성을 위해 높은 확률의 토큰을 버립니다.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "최상위 로짓에서 n 표준편차 이내의 토큰만 유지합니다. n이 설정되지 않으면 꺼짐. top-k/top-p/min-p를 대체하기 위한 것입니다.", + }, temp: { label: "Temperature", desc: "선택 전 최종 분포를 평탄화하거나 날카롭게 합니다.", diff --git a/src/core/i18n/locales/nl.ts b/src/core/i18n/locales/nl.ts index 5e794e7a4..b41691ced 100644 --- a/src/core/i18n/locales/nl.ts +++ b/src/core/i18n/locales/nl.ts @@ -5357,6 +5357,7 @@ export const nlMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Recente tokens voor herhalings-, frequentie- en aanwezigheidsstraffen; `-1` gebruikt de volledige context", xtcProbability: "XTC-waarschijnlijkheid", xtcThreshold: "XTC-drempel", + topNSigma: "Top-n-sigma", localOverride: "Lokale overschrijving", dryMultiplier: "DRY-multiplier", dryMultiplierDescription: "`0` schakelt herhalingsbeheer van sequenties uit", @@ -8811,6 +8812,9 @@ export const nlMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Kans om toptokens uit te sluiten (0 = uit). Vergroot de variatie.", xtcThreshold: "XTC-drempel", xtcThresholdDesc: "Minimale waarschijnlijkheid die een token nodig heeft om door XTC verwijderd te kunnen worden.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Houdt tokens binnen n standaarddeviaties van de hoogste logit (0 = uit). Vervangt top-k/top-p/min-p.", seed: "Seed", seedDesc: "Willekeurige seed. Laat leeg voor willekeurig.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const nlMessages: DeepPartialMessageTree = { penaltyRange: "Strafbereik", xtcProbability: "XTC-waarschijnlijkheid", xtcThreshold: "XTC-drempel", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY-multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY toegestane lengte", @@ -9048,6 +9053,10 @@ export const nlMessages: DeepPartialMessageTree = { label: "XTC", desc: "Beste keuzes uitsluiten — verwijdert tokens met hoge waarschijnlijkheid voor meer variatie.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Houdt alleen tokens binnen n standaarddeviaties van de hoogste logit. Uit tenzij n is ingesteld; bedoeld om top-k/top-p/min-p te vervangen.", + }, temp: { label: "Temperature", desc: "De uiteindelijke verdeling afvlakken of verscherpen voor selectie.", diff --git a/src/core/i18n/locales/no.ts b/src/core/i18n/locales/no.ts index d7d049eb9..8b867276d 100644 --- a/src/core/i18n/locales/no.ts +++ b/src/core/i18n/locales/no.ts @@ -4818,6 +4818,7 @@ export const noMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Nylige tokens for repetisjons-, frekvens- og tilstedeværelsesstraff; `-1` bruker hele konteksten", xtcProbability: "XTC-sannsynlighet", xtcThreshold: "XTC-terskel", + topNSigma: "Top-n-sigma", localOverride: "Lokal overstyring", dryMultiplier: "DRY-multiplikator", dryMultiplierDescription: "`0` deaktiverer kontroll av sekvensrepetisjon", @@ -8811,6 +8812,9 @@ export const noMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Sjanse for å utelukke topp-tokener (0 = av). Øker variasjonen.", xtcThreshold: "XTC-terskel", xtcThresholdDesc: "Minste sannsynlighet et token må ha for å kunne fjernes av XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Beholder tokens innenfor n standardavvik fra den øverste logiten (0 = av). Erstatter top-k/top-p/min-p.", seed: "Seed", seedDesc: "Tilfeldig seed. La stå tomt for tilfeldig.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const noMessages: DeepPartialMessageTree = { penaltyRange: "Straffeområde", xtcProbability: "XTC-sannsynlighet", xtcThreshold: "XTC-terskel", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY-multiplikator", dryBase: "DRY Base", dryAllowedLength: "DRY tillatt lengde", @@ -9048,6 +9053,10 @@ export const noMessages: DeepPartialMessageTree = { label: "XTC", desc: "Utelukk de beste valgene — forkaster tokener med høy sannsynlighet for variasjon.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Beholder bare tokens innenfor n standardavvik fra den øverste logiten. Av med mindre n er satt; ment å erstatte top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Flat ut eller skjerp den endelige fordelingen før utvelgelse.", diff --git a/src/core/i18n/locales/pl.ts b/src/core/i18n/locales/pl.ts index 26bfb0a33..9bcb29092 100644 --- a/src/core/i18n/locales/pl.ts +++ b/src/core/i18n/locales/pl.ts @@ -8084,6 +8084,9 @@ export const plMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Szansa na wykluczenie najlepszych tokenów (0 = wył.). Zwiększa różnorodność.", xtcThreshold: "Próg XTC", xtcThresholdDesc: "Minimalne prawdopodobieństwo, jakie musi mieć token, aby mógł zostać usunięty przez XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Zachowuje tokeny w zakresie n odchyleń standardowych od najwyższego logitu (0 = wył.). Zastępuje top-k/top-p/min-p.", seed: "Seed", seedDesc: "Ziarno losowe. Zostaw puste dla losowego.", ropeBase: "RoPE Base", @@ -8240,6 +8243,7 @@ export const plMessages: DeepPartialMessageTree = { penaltyRange: "Zakres kary", xtcProbability: "Prawdopodobieństwo XTC", xtcThreshold: "Próg XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "Mnożnik DRY", dryBase: "Baza DRY", dryAllowedLength: "Dozwolona długość DRY", @@ -8321,6 +8325,10 @@ export const plMessages: DeepPartialMessageTree = { label: "XTC", desc: "Wyklucz najlepsze wybory — odrzuca tokeny o wysokim prawdopodobieństwie dla różnorodności.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Zachowuje tylko tokeny w zakresie n odchyleń standardowych od najwyższego logitu. Wyłączone, dopóki n nie zostanie ustawione; ma zastąpić top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Spłaszcz lub wyostrz końcowy rozkład przed selekcją.", @@ -8977,6 +8985,7 @@ export const plMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Ostatnie tokeny dla kar za powtórzenia, częstotliwość i obecność; `-1` używa całego kontekstu", xtcProbability: "Prawdopodobieństwo XTC", xtcThreshold: "Próg XTC", + topNSigma: "Top-n-sigma", localOverride: "Nadpisanie lokalne", dryMultiplier: "Mnożnik DRY", dryMultiplierDescription: "`0` wyłącza kontrolę powtórzeń sekwencji", diff --git a/src/core/i18n/locales/pt.ts b/src/core/i18n/locales/pt.ts index aa05e0a50..1ae20a523 100644 --- a/src/core/i18n/locales/pt.ts +++ b/src/core/i18n/locales/pt.ts @@ -7995,6 +7995,9 @@ export const ptMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Chance de excluir os tokens principais (0 = desativado). Aumenta a variedade.", xtcThreshold: "Limite XTC", xtcThresholdDesc: "Probabilidade mínima que um token precisa para ser elegível à remoção pelo XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Mantém os tokens dentro de n desvios-padrão do logit principal (0 = desativado). Substitui top-k/top-p/min-p.", seed: "Seed", seedDesc: "Semente aleatória. Deixe em branco para aleatório.", ropeBase: "RoPE Base", @@ -8151,6 +8154,7 @@ export const ptMessages: DeepPartialMessageTree = { penaltyRange: "Intervalo da penalidade", xtcProbability: "Probabilidade XTC", xtcThreshold: "Limite XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "Multiplicador DRY", dryBase: "Base DRY", dryAllowedLength: "Tamanho Permitido DRY", @@ -8232,6 +8236,10 @@ export const ptMessages: DeepPartialMessageTree = { label: "XTC", desc: "Excluir as principais escolhas — descarta tokens de alta probabilidade para dar variedade.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Mantém apenas os tokens dentro de n desvios-padrão do logit principal. Desativado a menos que n seja definido; destinado a substituir top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Achatar ou aguçar a distribuição final antes da seleção.", @@ -8977,6 +8985,7 @@ export const ptMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Tokens recentes usados pelas penalidades de repetição, frequência e presença; `-1` usa todo o contexto", xtcProbability: "Probabilidade XTC", xtcThreshold: "Limite XTC", + topNSigma: "Top-n-sigma", localOverride: "Substituição local", dryMultiplier: "Multiplicador DRY", dryMultiplierDescription: "`0` desativa o controle de repetição de sequência", diff --git a/src/core/i18n/locales/ru.ts b/src/core/i18n/locales/ru.ts index b03d892ff..c367a7973 100644 --- a/src/core/i18n/locales/ru.ts +++ b/src/core/i18n/locales/ru.ts @@ -4818,6 +4818,7 @@ export const ruMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Последние токены для штрафов за повторение, частоту и присутствие; `-1` использует весь контекст", xtcProbability: "Вероятность XTC", xtcThreshold: "Порог XTC", + topNSigma: "Top-n-sigma", localOverride: "Локальное переопределение", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "`0` отключает контроль повторения последовательностей", @@ -8811,6 +8812,9 @@ export const ruMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Вероятность исключения топ-токенов (0 = выкл.). Повышает разнообразие.", xtcThreshold: "Порог XTC", xtcThresholdDesc: "Минимальная вероятность, необходимая токену для удаления через XTC.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Оставляет токены в пределах n стандартных отклонений от верхнего логита (0 = выкл.). Заменяет top-k/top-p/min-p.", seed: "Seed", seedDesc: "Случайный seed. Оставьте пустым для случайного.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const ruMessages: DeepPartialMessageTree = { penaltyRange: "Диапазон штрафа", xtcProbability: "Вероятность XTC", xtcThreshold: "Порог XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -9048,6 +9053,10 @@ export const ruMessages: DeepPartialMessageTree = { label: "XTC", desc: "Исключить топ-варианты — отбрасывает высоковероятные токены ради разнообразия.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Оставляет только токены в пределах n стандартных отклонений от верхнего логита. Отключено, пока n не задано; предназначен для замены top-k/top-p/min-p.", + }, temp: { label: "Температура", desc: "Сгладить или заострить финальное распределение перед выбором.", diff --git a/src/core/i18n/locales/tr.ts b/src/core/i18n/locales/tr.ts index b6639d788..440e49da8 100644 --- a/src/core/i18n/locales/tr.ts +++ b/src/core/i18n/locales/tr.ts @@ -4818,6 +4818,7 @@ export const trMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Tekrar, sıklık ve varlık cezalarında kullanılacak son tokenlar; `-1` tüm bağlamı kullanır", xtcProbability: "XTC Olasılığı", xtcThreshold: "XTC Eşiği", + topNSigma: "Top-n-sigma", localOverride: "Yerel geçersiz kılma", dryMultiplier: "DRY Çarpanı", dryMultiplierDescription: "`0` dizi tekrar kontrolünü devre dışı bırakır", @@ -8811,6 +8812,9 @@ export const trMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "En olası tokenları hariç tutma şansı (0 = kapalı). Çeşitliliği artırır.", xtcThreshold: "XTC Eşiği", xtcThresholdDesc: "Bir tokenın XTC ile kaldırılabilmesi için gereken en düşük olasılık.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "En yüksek logit'in n standart sapması içindeki token'ları tutar (0 = kapalı). top-k/top-p/min-p yerine geçer.", seed: "Seed", seedDesc: "Rastgele tohum. Rastgele için boş bırak.", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const trMessages: DeepPartialMessageTree = { penaltyRange: "Ceza aralığı", xtcProbability: "XTC Olasılığı", xtcThreshold: "XTC Eşiği", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Çarpanı", dryBase: "DRY Tabanı", dryAllowedLength: "DRY İzin Verilen Uzunluk", @@ -9048,6 +9053,10 @@ export const trMessages: DeepPartialMessageTree = { label: "XTC", desc: "En İyi Seçenekleri Hariç Tut — çeşitlilik için yüksek olasılıklı tokenları atar.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Yalnızca en yüksek logit'in n standart sapması içindeki token'ları tutar. n ayarlanmadıkça kapalıdır; top-k/top-p/min-p yerine geçmesi amaçlanır.", + }, temp: { label: "Sıcaklık", desc: "Seçimden önce son dağılımı düzleştir veya keskinleştir.", diff --git a/src/core/i18n/locales/vi.ts b/src/core/i18n/locales/vi.ts index da83f31a4..1335f985c 100644 --- a/src/core/i18n/locales/vi.ts +++ b/src/core/i18n/locales/vi.ts @@ -7995,6 +7995,9 @@ export const viMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "Khả năng loại bỏ các token hàng đầu (0 = tắt). Tăng tính đa dạng.", xtcThreshold: "Ngưỡng XTC", xtcThresholdDesc: "Xác suất tối thiểu mà một token cần để đủ điều kiện bị XTC loại bỏ.", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "Giữ các token nằm trong n độ lệch chuẩn của logit cao nhất (0 = tắt). Thay thế top-k/top-p/min-p.", seed: "Seed", seedDesc: "Seed ngẫu nhiên. Để trống cho ngẫu nhiên.", ropeBase: "RoPE Base", @@ -8151,6 +8154,7 @@ export const viMessages: DeepPartialMessageTree = { penaltyRange: "Phạm vi phạt", xtcProbability: "Xác suất XTC", xtcThreshold: "Ngưỡng XTC", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY Multiplier", dryBase: "DRY Base", dryAllowedLength: "DRY Allowed Length", @@ -8232,6 +8236,10 @@ export const viMessages: DeepPartialMessageTree = { label: "XTC", desc: "Loại bỏ lựa chọn hàng đầu — bỏ các token xác suất cao để tăng đa dạng.", }, + topNSigma: { + label: "Top-n-sigma", + desc: "Chỉ giữ các token nằm trong n độ lệch chuẩn của logit cao nhất. Tắt trừ khi n được đặt; nhằm thay thế top-k/top-p/min-p.", + }, temp: { label: "Temperature", desc: "Làm phẳng hoặc làm sắc phân phối cuối cùng trước khi chọn.", @@ -8977,6 +8985,7 @@ export const viMessages: DeepPartialMessageTree = { penaltyRangeDescription: "Các token gần đây dùng cho phạt lặp lại, tần suất và hiện diện; `-1` dùng toàn bộ ngữ cảnh", xtcProbability: "Xác suất XTC", xtcThreshold: "Ngưỡng XTC", + topNSigma: "Top-n-sigma", localOverride: "Ghi đè cục bộ", dryMultiplier: "DRY Multiplier", dryMultiplierDescription: "`0` vô hiệu hóa kiểm soát lặp lại chuỗi", diff --git a/src/core/i18n/locales/zh-Hans.ts b/src/core/i18n/locales/zh-Hans.ts index f5dcb75ce..f8a9ca072 100644 --- a/src/core/i18n/locales/zh-Hans.ts +++ b/src/core/i18n/locales/zh-Hans.ts @@ -4818,6 +4818,7 @@ export const zhHansMessages: DeepPartialMessageTree = { penaltyRangeDescription: "重复、频率和存在惩罚使用的最近 token 数;`-1` 使用完整上下文", xtcProbability: "XTC 概率", xtcThreshold: "XTC 阈值", + topNSigma: "Top-n-sigma", localOverride: "本地覆盖", dryMultiplier: "DRY 倍数", dryMultiplierDescription: "`0` 将禁用序列重复控制", @@ -8811,6 +8812,9 @@ export const zhHansMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "排除高概率词元的几率(0 = 关闭)。提升多样性。", xtcThreshold: "XTC 阈值", xtcThresholdDesc: "词元需要达到的最低概率才会被 XTC 移除。", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "仅保留在最高 logit 的 n 个标准差范围内的 token(0 = 关闭)。替代 top-k/top-p/min-p。", seed: "Seed", seedDesc: "随机种子。留空为随机。", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const zhHansMessages: DeepPartialMessageTree = { penaltyRange: "惩罚范围", xtcProbability: "XTC 概率", xtcThreshold: "XTC 阈值", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY 倍数", dryBase: "DRY 基数", dryAllowedLength: "DRY 允许长度", @@ -9048,6 +9053,10 @@ export const zhHansMessages: DeepPartialMessageTree = { label: "XTC", desc: "排除最优选择 — 丢弃高概率词元以增加多样性。", }, + topNSigma: { + label: "Top-n-sigma", + desc: "仅保留在最高 logit 的 n 个标准差范围内的 token。未设置 n 时关闭;用于替代 top-k/top-p/min-p。", + }, temp: { label: "Temperature", desc: "在选择前平坦化或锐化最终分布。", diff --git a/src/core/i18n/locales/zh-Hant.ts b/src/core/i18n/locales/zh-Hant.ts index 392a837b2..db6bb7132 100644 --- a/src/core/i18n/locales/zh-Hant.ts +++ b/src/core/i18n/locales/zh-Hant.ts @@ -4818,6 +4818,7 @@ export const zhHantMessages: DeepPartialMessageTree = { penaltyRangeDescription: "重複、頻率和存在懲罰使用的最近 token 數;`-1` 使用完整上下文", xtcProbability: "XTC 機率", xtcThreshold: "XTC 閾值", + topNSigma: "Top-n-sigma", localOverride: "本地覆蓋", dryMultiplier: "DRY 倍數", dryMultiplierDescription: "`0` 將禁用序列重複控制", @@ -8811,6 +8812,9 @@ export const zhHantMessages: DeepPartialMessageTree = { xtcProbabilityDesc: "排除高機率詞元的機率(0 = 關閉)。提升多樣性。", xtcThreshold: "XTC 閾值", xtcThresholdDesc: "詞元需要達到的最低機率才會被 XTC 移除。", + topNSigma: "Top-n-sigma", + topNSigmaDesc: + "僅保留在最高 logit 的 n 個標準差範圍內的 token(0 = 關閉)。取代 top-k/top-p/min-p。", seed: "Seed", seedDesc: "隨機種子。留空為隨機。", ropeBase: "RoPE Base", @@ -8967,6 +8971,7 @@ export const zhHantMessages: DeepPartialMessageTree = { penaltyRange: "懲罰範圍", xtcProbability: "XTC 機率", xtcThreshold: "XTC 閾值", + topNSigma: "Top-n-sigma", dryMultiplier: "DRY 倍數", dryBase: "DRY 基數", dryAllowedLength: "DRY 允許長度", @@ -9048,6 +9053,10 @@ export const zhHantMessages: DeepPartialMessageTree = { label: "XTC", desc: "排除最佳選擇 — 捨棄高機率詞元以增加多樣性。", }, + topNSigma: { + label: "Top-n-sigma", + desc: "僅保留在最高 logit 的 n 個標準差範圍內的 token。未設定 n 時關閉;用於取代 top-k/top-p/min-p。", + }, temp: { label: "Temperature", desc: "在選擇前平坦化或銳化最終分佈。", diff --git a/src/core/image-generation/loras.ts b/src/core/image-generation/loras.ts index ef19e9752..b51d32887 100644 --- a/src/core/image-generation/loras.ts +++ b/src/core/image-generation/loras.ts @@ -44,6 +44,7 @@ export function loraArchitectureLabel( case "flux1": return "FLUX.1"; case "flux": return "FLUX"; case "krea-2": return "Krea 2"; + case "qwen-image-2.1": return "Qwen Image 2.1"; case "qwen-image-edit-2511": return "Qwen Image Edit 2511"; case "qwen-image-edit": return "Qwen Image Edit"; case "qwen-image": return "Qwen Image"; diff --git a/src/core/storage/schemas.ts b/src/core/storage/schemas.ts index 409df1bee..9e3d31d73 100644 --- a/src/core/storage/schemas.ts +++ b/src/core/storage/schemas.ts @@ -34,6 +34,7 @@ export const LLAMA_SAMPLER_ORDER_STAGE_VALUES = [ "dry", "typical", "xtc", + "top_n_sigma", "temp", "adaptive_p", ] as const; @@ -60,6 +61,7 @@ export const DEFAULT_LLAMA_SAMPLER_ORDER: readonly LlamaSamplerOrderStage[] = [ "dry", "typical", "xtc", + "top_n_sigma", "temp", "adaptive_p", ]; @@ -459,6 +461,7 @@ export const FeatureGenerationSettingsSchema = z.object({ llamaNPenRange: z.number().int().min(-1).max(262_144).nullable().optional(), llamaXtcProbability: z.number().min(0).max(1).nullable().optional(), llamaXtcThreshold: z.number().min(0).max(1).nullable().optional(), + llamaTopNSigma: z.number().min(0).max(10).nullable().optional(), llamaAdaptiveTarget: z.number().min(0).max(1).nullable().optional(), llamaAdaptiveDecay: z.number().min(0).max(0.99).nullable().optional(), llamaDryMultiplier: z.number().min(0).max(10).nullable().optional(), @@ -642,6 +645,7 @@ export const AdvancedModelSettingsSchema = z.object({ llamaDrySequenceBreakers: z.array(z.string()).nullable().optional(), llamaXtcProbability: z.number().min(0).max(1).nullable().optional(), llamaXtcThreshold: z.number().min(0).max(1).nullable().optional(), + llamaTopNSigma: z.number().min(0).max(10).nullable().optional(), llamaAdaptiveTarget: z.number().min(0).max(1).nullable().optional(), llamaAdaptiveDecay: z.number().min(0).max(0.99).nullable().optional(), llamaLastRuntimeReport: LlamaLastRuntimeReportSchema.nullish().optional(), @@ -2237,6 +2241,7 @@ export const PROVIDER_PARAMETER_SUPPORT = { llamaDrySequenceBreakers: true, llamaXtcProbability: true, llamaXtcThreshold: true, + llamaTopNSigma: true, llamaAdaptiveTarget: true, llamaAdaptiveDecay: true, reasoningEnabled: true, diff --git a/src/ui/components/AdvancedModelSettingsForm.tsx b/src/ui/components/AdvancedModelSettingsForm.tsx index db8f80e4e..4f35b65d3 100644 --- a/src/ui/components/AdvancedModelSettingsForm.tsx +++ b/src/ui/components/AdvancedModelSettingsForm.tsx @@ -59,6 +59,7 @@ export const ADVANCED_LLAMA_DRY_ALLOWED_LENGTH_RANGE = { min: 0, max: 128 }; export const ADVANCED_LLAMA_DRY_PENALTY_LAST_N_RANGE = { min: -1, max: 262_144 }; export const ADVANCED_LLAMA_XTC_PROBABILITY_RANGE = { min: 0, max: 1 }; export const ADVANCED_LLAMA_XTC_THRESHOLD_RANGE = { min: 0, max: 1 }; +export const ADVANCED_LLAMA_TOP_N_SIGMA_RANGE = { min: 0, max: 10 }; export const ADVANCED_LLAMA_ADAPTIVE_TARGET_RANGE = { min: 0, max: 1 }; export const ADVANCED_LLAMA_ADAPTIVE_DECAY_RANGE = { min: 0, max: 0.99 }; export const ADVANCED_LLAMA_REPEAT_PENALTY_RANGE = { min: 0, max: 2 }; @@ -104,6 +105,7 @@ const FEATURE_GENERATION_NUMBER_RANGES = { llamaNPenRange: ADVANCED_LLAMA_N_PEN_RANGE, llamaXtcProbability: ADVANCED_LLAMA_XTC_PROBABILITY_RANGE, llamaXtcThreshold: ADVANCED_LLAMA_XTC_THRESHOLD_RANGE, + llamaTopNSigma: ADVANCED_LLAMA_TOP_N_SIGMA_RANGE, llamaAdaptiveTarget: ADVANCED_LLAMA_ADAPTIVE_TARGET_RANGE, llamaAdaptiveDecay: ADVANCED_LLAMA_ADAPTIVE_DECAY_RANGE, llamaDryMultiplier: ADVANCED_LLAMA_DRY_MULTIPLIER_RANGE, @@ -432,6 +434,7 @@ export function sanitizeAdvancedModelSettings(input: AdvancedModelSettings): Adv false, ), llamaXtcThreshold: sanitize(input.llamaXtcThreshold, ADVANCED_LLAMA_XTC_THRESHOLD_RANGE, false), + llamaTopNSigma: sanitize(input.llamaTopNSigma, ADVANCED_LLAMA_TOP_N_SIGMA_RANGE, false), llamaAdaptiveTarget: sanitize( input.llamaAdaptiveTarget, ADVANCED_LLAMA_ADAPTIVE_TARGET_RANGE, diff --git a/src/ui/components/FeatureGenerationSettings.tsx b/src/ui/components/FeatureGenerationSettings.tsx index 25e201865..38ae78ef1 100644 --- a/src/ui/components/FeatureGenerationSettings.tsx +++ b/src/ui/components/FeatureGenerationSettings.tsx @@ -20,6 +20,7 @@ import { ADVANCED_LLAMA_SEED_RANGE, ADVANCED_LLAMA_XTC_PROBABILITY_RANGE, ADVANCED_LLAMA_XTC_THRESHOLD_RANGE, + ADVANCED_LLAMA_TOP_N_SIGMA_RANGE, ADVANCED_LLAMA_ADAPTIVE_TARGET_RANGE, ADVANCED_LLAMA_ADAPTIVE_DECAY_RANGE, ADVANCED_MAX_TOKENS_RANGE, @@ -132,6 +133,13 @@ const LLAMA_NUMBER_FIELDS = [ decimals: 2, step: 0.01, }, + { + key: "llamaTopNSigma", + labelKey: "featureGeneration.topNSigma", + range: ADVANCED_LLAMA_TOP_N_SIGMA_RANGE, + decimals: 1, + step: 0.1, + }, { key: "llamaAdaptiveTarget", labelKey: "featureGeneration.adaptiveTarget", diff --git a/src/ui/components/LlamaSamplerOrderEditor.tsx b/src/ui/components/LlamaSamplerOrderEditor.tsx index 4cca368a3..667d999c3 100644 --- a/src/ui/components/LlamaSamplerOrderEditor.tsx +++ b/src/ui/components/LlamaSamplerOrderEditor.tsx @@ -62,6 +62,10 @@ const STAGE_META: Record< labelKey: "samplerOrder.stages.xtc.label", descriptionKey: "samplerOrder.stages.xtc.desc", }, + top_n_sigma: { + labelKey: "samplerOrder.stages.topNSigma.label", + descriptionKey: "samplerOrder.stages.topNSigma.desc", + }, temp: { labelKey: "samplerOrder.stages.temp.label", descriptionKey: "samplerOrder.stages.temp.desc", diff --git a/src/ui/components/ProviderParameterSupportInfo.tsx b/src/ui/components/ProviderParameterSupportInfo.tsx index 661478888..2cf3fd702 100644 --- a/src/ui/components/ProviderParameterSupportInfo.tsx +++ b/src/ui/components/ProviderParameterSupportInfo.tsx @@ -103,6 +103,7 @@ const PARAMETER_LABELS: Record = { llamaDrySequenceBreakers: "llama.cpp DRY Sequence Breakers", llamaXtcProbability: "llama.cpp XTC Probability", llamaXtcThreshold: "llama.cpp XTC Threshold", + llamaTopNSigma: "llama.cpp Top-n-sigma", llamaAdaptiveTarget: "llama.cpp Adaptive-P Target", llamaAdaptiveDecay: "llama.cpp Adaptive-P Target Decay", llamaLastRuntimeReport: "llama.cpp Runtime Report", @@ -229,6 +230,7 @@ const PARAMETER_DESCRIPTIONS: Record = { llamaDrySequenceBreakers: "Sequence boundaries that reset DRY matching", llamaXtcProbability: "Chance of excluding top tokens for more variety (0 = off)", llamaXtcThreshold: "Minimum probability for a token to be eligible for XTC removal", + llamaTopNSigma: "Keep only tokens within n standard deviations of the top logit (0 = off); replaces top-k/p/min-p", llamaAdaptiveTarget: "Adaptive-P picks tokens near this probability and replaces the final sampling step (0 to 1)", llamaAdaptiveDecay: diff --git a/src/ui/pages/chats/components/SessionAdvancedSettings.tsx b/src/ui/pages/chats/components/SessionAdvancedSettings.tsx index a09ddc4b1..bf1c99ba2 100644 --- a/src/ui/pages/chats/components/SessionAdvancedSettings.tsx +++ b/src/ui/pages/chats/components/SessionAdvancedSettings.tsx @@ -23,6 +23,7 @@ import { ADVANCED_LLAMA_N_PEN_RANGE, ADVANCED_LLAMA_XTC_PROBABILITY_RANGE, ADVANCED_LLAMA_XTC_THRESHOLD_RANGE, + ADVANCED_LLAMA_TOP_N_SIGMA_RANGE, ADVANCED_LLAMA_ADAPTIVE_TARGET_RANGE, ADVANCED_LLAMA_ADAPTIVE_DECAY_RANGE, } from "../../../components/AdvancedModelSettingsForm"; @@ -372,6 +373,17 @@ export function SessionAdvancedSettings({ onChange={(v) => update({ llamaXtcThreshold: v })} /> + update({ llamaTopNSigma: v })} + /> + +
+
+
+ + {t("editModel.llamaSampler.topNSigma")} + + + {t("editModel.llamaSampler.localOverride")} + +
+ handleLlamaTopNSigmaChange(next)} + placeholder={t("editModel.placeholders.default")} + className={numberInputClassName} + /> +
+
+
diff --git a/src/ui/pages/settings/hooks/useModelEditorController.ts b/src/ui/pages/settings/hooks/useModelEditorController.ts index 96c68fd50..f7f8b4634 100644 --- a/src/ui/pages/settings/hooks/useModelEditorController.ts +++ b/src/ui/pages/settings/hooks/useModelEditorController.ts @@ -70,6 +70,7 @@ type ControllerReturn = { handleLlamaNPenRangeChange: (value: number | null) => void; handleLlamaXtcProbabilityChange: (value: number | null) => void; handleLlamaXtcThresholdChange: (value: number | null) => void; + handleLlamaTopNSigmaChange: (value: number | null) => void; handleLlamaAdaptiveTargetChange: (value: number | null) => void; handleLlamaAdaptiveDecayChange: (value: number | null) => void; handleLlamaDryMultiplierChange: (value: number | null) => void; @@ -902,6 +903,19 @@ export function useModelEditorController(): ControllerReturn { [dispatch, state.modelAdvancedDraft], ); + const handleLlamaTopNSigmaChange = useCallback( + (value: number | null) => { + dispatch({ + type: "set_model_advanced_draft", + payload: { + ...state.modelAdvancedDraft, + llamaTopNSigma: value, + }, + }); + }, + [dispatch, state.modelAdvancedDraft], + ); + const handleLlamaAdaptiveTargetChange = useCallback( (value: number | null) => { dispatch({ @@ -1856,6 +1870,7 @@ export function useModelEditorController(): ControllerReturn { handleLlamaNPenRangeChange, handleLlamaXtcProbabilityChange, handleLlamaXtcThresholdChange, + handleLlamaTopNSigmaChange, handleLlamaAdaptiveTargetChange, handleLlamaAdaptiveDecayChange, handleLlamaDryMultiplierChange,