Skip to content

Commit ddc8507

Browse files
netdurclaude
andcommitted
style: dart format
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0e17c5c commit ddc8507

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

lib/src/generation/generator.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ final class Generator implements Finalizable {
5353
final vocab = context.model.vocab;
5454
final accumulator = Utf8Accumulator();
5555

56-
final sampler =
57-
SamplerFactory.build(request.sampler, model: context.model);
56+
final sampler = SamplerFactory.build(request.sampler, model: context.model);
5857
try {
5958
var pos = await _prefill(request, sampler);
6059
var generated = 0;

lib/src/model/model_params.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ final class KvOverride {
8585
KvOverrideType.floatValue =>
8686
KvOverride.float(key, (json['float']! as num).toDouble()),
8787
KvOverrideType.boolValue => KvOverride.bool(key, json['bool']! as bool),
88-
KvOverrideType.string => KvOverride.string(key, json['string']! as String),
88+
KvOverrideType.string =>
89+
KvOverride.string(key, json['string']! as String),
8990
};
9091
}
9192
}

lib/src/sampling/sampler_factory.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ final class SamplerFactory {
8282
final vocab = requireVocab('DRY sampler');
8383
final m = model!;
8484
final breakers = params.dry.seqBreakers;
85-
final breakerPtrs = calloc<Pointer<Char>>(
86-
breakers.isEmpty ? 1 : breakers.length);
85+
final breakerPtrs =
86+
calloc<Pointer<Char>>(breakers.isEmpty ? 1 : breakers.length);
8787
final allocated = <Pointer<Utf8>>[];
8888
for (var i = 0; i < breakers.length; i++) {
8989
final s = breakers[i].toNativeUtf8(allocator: calloc);
@@ -295,8 +295,8 @@ final class SamplerFactory {
295295
}
296296

297297
final patterns = cfg.triggerPatterns;
298-
final patternPtrs = calloc<Pointer<Char>>(
299-
patterns.isEmpty ? 1 : patterns.length);
298+
final patternPtrs =
299+
calloc<Pointer<Char>>(patterns.isEmpty ? 1 : patterns.length);
300300
final allocated = <Pointer<Utf8>>[];
301301
for (var i = 0; i < patterns.length; i++) {
302302
final s = patterns[i].toNativeUtf8(allocator: calloc);

lib/src/sampling/sampler_params.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ final class AdaptivePConfig {
205205
'seed': seed,
206206
};
207207

208-
factory AdaptivePConfig.fromJson(Map<String, Object?> json) => AdaptivePConfig(
208+
factory AdaptivePConfig.fromJson(Map<String, Object?> json) =>
209+
AdaptivePConfig(
209210
target: (json['target'] as num?)?.toDouble() ?? -1.0,
210211
decay: (json['decay'] as num?)?.toDouble() ?? 0.96,
211212
seed: (json['seed'] as int?) ?? defaultSeed,

0 commit comments

Comments
 (0)