weave-typescript 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -258,97 +258,385 @@ export declare enum LicenseType {
258
258
  }
259
259
  export declare function licenseTypeFromJSON(object: any): LicenseType;
260
260
  export declare function licenseTypeToJSON(object: LicenseType): string;
261
- /** Architecture describes model architecture details */
261
+ /** Architecture describes the technical architecture of an AI model. */
262
262
  export interface Architecture {
263
+ /**
264
+ * Fundamental architecture type (Transformer, Mamba, etc.).
265
+ * Example: BASE_ARCHITECTURE_TRANSFORMER for GPT models
266
+ */
263
267
  baseArchitecture: BaseArchitecture;
268
+ /**
269
+ * Specific model family/variant.
270
+ * Example: MODEL_ARCHITECTURE_GPT for GPT-4, MODEL_ARCHITECTURE_LLAMA for LLaMA
271
+ */
264
272
  modelArchitecture: ModelArchitecture;
273
+ /**
274
+ * Total learnable parameters in billions.
275
+ * Example: 175 for GPT-3 (175B parameters)
276
+ */
265
277
  parameterCount: number;
278
+ /**
279
+ * Parameters activated per forward pass (for MoE models).
280
+ * Example: 8B active out of 141B total for Mixtral-8x7B
281
+ */
266
282
  activeParameters: number;
283
+ /**
284
+ * Total parameters including non-trainable (embeddings, etc.).
285
+ * May be slightly higher than parameter_count
286
+ */
267
287
  totalParameters: number;
288
+ /**
289
+ * Number of transformer/attention layers.
290
+ * Example: 96 for GPT-3, 32 for 7B models
291
+ */
268
292
  layerCount: number;
293
+ /**
294
+ * Hidden dimension size of the model.
295
+ * Example: 12288 for GPT-3, 4096 for smaller models
296
+ */
269
297
  hiddenSize: number;
298
+ /**
299
+ * Number of attention heads in multi-head attention.
300
+ * Example: 96 for GPT-3, 32 for 7B models
301
+ */
270
302
  attentionHeads: number;
303
+ /**
304
+ * Size of the token vocabulary.
305
+ * Example: 50257 for GPT-2/3, 32000 for LLaMA
306
+ */
271
307
  vocabularySize: number;
308
+ /**
309
+ * Type of position encoding used.
310
+ * Example: POSITION_EMBEDDING_ROTARY for modern models (RoPE)
311
+ */
272
312
  positionEmbedding: PositionEmbedding;
313
+ /**
314
+ * Activation function in feed-forward layers.
315
+ * Example: ACTIVATION_FUNCTION_SWIGLU for LLaMA models
316
+ */
273
317
  activationFunction: ActivationFunction;
318
+ /**
319
+ * Whether this is a Mixture of Experts model.
320
+ * Example: true for Mixtral, GPT-4 (rumored), false for dense models
321
+ */
274
322
  isMixtureOfExperts: boolean;
323
+ /**
324
+ * Total number of expert networks (for MoE).
325
+ * Example: 8 for Mixtral-8x7B
326
+ */
275
327
  expertCount: number;
328
+ /**
329
+ * Number of experts activated per token (for MoE).
330
+ * Example: 2 for Mixtral (2 experts per token out of 8)
331
+ */
276
332
  expertsPerToken: number;
277
333
  }
278
- /** Training contains training information */
334
+ /** Training contains information about how the model was trained. */
279
335
  export interface Training {
280
- /** "1T tokens" */
336
+ /**
337
+ * Size of training dataset.
338
+ * Examples: "1T tokens", "45TB text", "100B tokens"
339
+ */
281
340
  trainingDataSize: string;
341
+ /**
342
+ * List of data sources used for training.
343
+ * Examples: ["Common Crawl", "Wikipedia", "Books", "GitHub", "ArXiv"]
344
+ */
282
345
  trainingDataSources: string[];
346
+ /**
347
+ * Description of data mixture/proportions.
348
+ * Example: "60% web, 20% books, 10% code, 10% reference"
349
+ */
283
350
  dataMixture: string;
284
- /** "3 months" */
351
+ /**
352
+ * Total training time.
353
+ * Examples: "3 months", "6 weeks", "90 days"
354
+ */
285
355
  trainingDuration: string;
286
- /** "10000 H100 GPUs" */
356
+ /**
357
+ * Hardware used for training.
358
+ * Examples: "10000 H100 GPUs", "512 A100 80GB", "TPU v4 pods"
359
+ */
287
360
  trainingHardware: string;
288
- /** "$100M" */
361
+ /**
362
+ * Estimated training cost.
363
+ * Examples: "$100M", "$4.6M", "Not disclosed"
364
+ */
289
365
  trainingCost: string;
366
+ /**
367
+ * Primary training technique used.
368
+ * Example: TRAINING_TECHNIQUE_REINFORCEMENT_LEARNING_FROM_HUMAN_FEEDBACK
369
+ */
290
370
  trainingTechnique: TrainingTechnique;
371
+ /**
372
+ * Training batch size per step.
373
+ * Example: 2048, 4096
374
+ */
291
375
  batchSize: number;
376
+ /**
377
+ * Peak learning rate used.
378
+ * Example: 0.0001, 3e-4
379
+ */
292
380
  learningRate: number;
381
+ /**
382
+ * Total number of training steps/iterations.
383
+ * Example: 1000000
384
+ */
293
385
  trainingSteps: number;
386
+ /**
387
+ * Number of warmup steps for learning rate schedule.
388
+ * Example: 2000
389
+ */
294
390
  warmupSteps: number;
391
+ /**
392
+ * Whether model supports fine-tuning via API.
393
+ * Example: true for GPT-3.5, false for GPT-4
394
+ */
295
395
  fineTuningAvailable: boolean;
396
+ /**
397
+ * Minimum training examples required for fine-tuning.
398
+ * Example: 10 for OpenAI models
399
+ */
296
400
  minFineTuneExamples: number;
401
+ /**
402
+ * Maximum training examples allowed for fine-tuning.
403
+ * Example: 100000 for GPT-3.5
404
+ */
297
405
  maxFineTuneExamples: number;
406
+ /**
407
+ * Supported data formats for fine-tuning.
408
+ * Example: [DATA_FORMAT_JSONL, DATA_FORMAT_CSV]
409
+ */
298
410
  fineTuneFormats: DataFormat[];
299
411
  }
300
- /** TechnicalSpecs contains detailed technical specifications */
412
+ /** TechnicalSpecs contains hardware and software requirements for running the model. */
301
413
  export interface TechnicalSpecs {
414
+ /**
415
+ * Minimum system RAM required in GB.
416
+ * Example: 32 for 7B models, 64 for 13B models
417
+ */
302
418
  minMemoryGb: number;
419
+ /**
420
+ * Recommended system RAM for optimal performance in GB.
421
+ * Example: 64 for 7B models, 128 for 13B models
422
+ */
303
423
  recommendedMemoryGb: number;
424
+ /**
425
+ * Minimum GPU VRAM required in GB.
426
+ * Example: 24 for 7B fp16, 48 for 13B fp16
427
+ */
304
428
  minGpuMemoryGb: number;
429
+ /**
430
+ * Disk storage required for model files in GB.
431
+ * Example: 15 for 7B models, 30 for 13B models
432
+ */
305
433
  storageGb: number;
434
+ /**
435
+ * Quantization method if applicable.
436
+ * Example: QUANTIZATION_INT8 for 8-bit quantized models
437
+ */
306
438
  quantization: Quantization;
439
+ /**
440
+ * Numerical precision used.
441
+ * Example: PRECISION_FP16 for half-precision inference
442
+ */
307
443
  precision: Precision;
444
+ /**
445
+ * Optimization level/profile.
446
+ * Examples: "O3", "fast", "balanced", "memory-optimized"
447
+ */
308
448
  optimizationLevel: string;
449
+ /**
450
+ * List of compatible GPU types.
451
+ * Example: [GPU_TYPE_A100, GPU_TYPE_H100, GPU_TYPE_RTX_4090]
452
+ */
309
453
  supportedGpus: GPUType[];
454
+ /**
455
+ * Whether CUDA is required for GPU inference.
456
+ * Example: true for NVIDIA GPUs, false for CPU-only
457
+ */
310
458
  requiresCuda: boolean;
459
+ /**
460
+ * Minimum CUDA version required.
461
+ * Examples: "11.8", "12.0"
462
+ */
311
463
  cudaVersion: string;
464
+ /**
465
+ * Recommended inference framework.
466
+ * Example: INFERENCE_FRAMEWORK_VLLM for high-throughput serving
467
+ */
312
468
  inferenceFramework: InferenceFramework;
469
+ /**
470
+ * Format of distributed model files.
471
+ * Example: MODEL_FORMAT_SAFETENSORS for HuggingFace models
472
+ */
313
473
  modelFormat: ModelFormat;
474
+ /**
475
+ * Total size of model files in GB.
476
+ * Example: 13.5 for 7B model in fp16
477
+ */
314
478
  modelSizeGb: number;
479
+ /**
480
+ * Format of model checkpoint files.
481
+ * Example: CHECKPOINT_FORMAT_PYTORCH for .pt files
482
+ */
315
483
  checkpointFormat: CheckpointFormat;
484
+ /**
485
+ * Number of model shard files.
486
+ * Example: 2 for models split across multiple files
487
+ */
316
488
  numberOfFiles: number;
489
+ /**
490
+ * List of compatible CPU architectures.
491
+ * Example: [CPU_TYPE_X86_64, CPU_TYPE_ARM64]
492
+ */
317
493
  supportedCpus: CPUType[];
494
+ /**
495
+ * Serving framework/stack.
496
+ * Examples: "TGI", "vLLM", "llama.cpp"
497
+ */
318
498
  servingFramework: string;
499
+ /**
500
+ * Pre-built container image if available.
501
+ * Example: "nvcr.io/nvidia/pytorch:23.10-py3"
502
+ */
319
503
  containerImage: string;
320
- /** Minimum requirements for reasonable performance */
504
+ /**
505
+ * Minimum GPU for reasonable performance.
506
+ * Example: GPU_TYPE_RTX_3090 for 7B models
507
+ */
321
508
  minimumGpu: GPUType;
509
+ /**
510
+ * Minimum GPU memory for basic inference in GB.
511
+ * Example: 16 for 7B int8 models
512
+ */
322
513
  minimumGpuMemoryGb: number;
514
+ /**
515
+ * Whether model can run on CPU (even if slowly).
516
+ * Example: true for smaller quantized models
517
+ */
323
518
  cpuCompatible: boolean;
519
+ /**
520
+ * Recommended GPU memory for good performance in GB.
521
+ * Example: 24 for 7B fp16 with reasonable batch size
522
+ */
324
523
  recommendedGpuMemoryGb: number;
325
524
  }
326
- /** Safety contains safety and moderation features */
525
+ /** Safety contains safety, moderation, and compliance features. */
327
526
  export interface Safety {
527
+ /**
528
+ * Built-in content moderation strictness.
529
+ * Example: MODERATION_LEVEL_HIGH for family-friendly models
530
+ */
328
531
  moderationLevel: ModerationLevel;
532
+ /**
533
+ * Whether automatic content filtering is enabled.
534
+ * Example: true for models that block harmful content
535
+ */
329
536
  contentFiltering: boolean;
537
+ /**
538
+ * List of active safety filters.
539
+ * Examples: ["violence", "sexual", "hate", "self-harm", "illegal"]
540
+ */
330
541
  safetyFilters: string[];
542
+ /**
543
+ * Bias assessment rating.
544
+ * Examples: "Low", "Medium", "High", "Evaluated"
545
+ */
331
546
  biasRating: string;
547
+ /**
548
+ * Toxicity score from evaluations (0-1).
549
+ * Example: 0.02 for well-aligned models (lower is better)
550
+ */
332
551
  toxicityScore: number;
552
+ /**
553
+ * GDPR (General Data Protection Regulation) compliance.
554
+ * Example: true for models that don't retain user data
555
+ */
333
556
  gdprCompliant: boolean;
557
+ /**
558
+ * HIPAA (Health Insurance Portability and Accountability Act) compliance.
559
+ * Example: true for medical-safe models
560
+ */
334
561
  hipaaCompliant: boolean;
562
+ /**
563
+ * SOC 2 (Service Organization Control 2) compliance.
564
+ * Example: true for enterprise-grade security
565
+ */
335
566
  soc2Compliant: boolean;
567
+ /**
568
+ * ISO certification status.
569
+ * Example: true for ISO 27001 certified services
570
+ */
336
571
  isoCertified: boolean;
572
+ /**
573
+ * Can refuse harmful or inappropriate requests.
574
+ * Example: true for models trained to decline harmful tasks
575
+ */
337
576
  refusalCapability: boolean;
577
+ /**
578
+ * Whether outputs include watermarking.
579
+ * Example: true for models with detectible AI signatures
580
+ */
338
581
  watermarkOutput: boolean;
582
+ /**
583
+ * Built-in safety guardrails.
584
+ * Examples: ["constitutional-ai", "harmlessness", "helpfulness"]
585
+ */
339
586
  builtInGuardrails: string[];
587
+ /**
588
+ * Supports custom safety guardrails.
589
+ * Example: true if users can add their own safety rules
590
+ */
340
591
  customGuardrails: boolean;
341
592
  }
342
- /** Licensing contains license and usage terms */
593
+ /** Licensing contains license and usage terms for the model. */
343
594
  export interface Licensing {
595
+ /**
596
+ * Type of license governing model use.
597
+ * Example: LICENSE_TYPE_APACHE_2_0, LICENSE_TYPE_PROPRIETARY
598
+ */
344
599
  licenseType: LicenseType;
600
+ /**
601
+ * URL to full license text.
602
+ * Example: "https://github.com/meta-llama/llama/blob/main/LICENSE"
603
+ */
345
604
  licenseUrl: string;
605
+ /**
606
+ * Whether source code is openly available.
607
+ * Example: true for research papers with code
608
+ */
346
609
  isOpenSource: boolean;
610
+ /**
611
+ * Whether model weights are publicly downloadable.
612
+ * Example: true for LLaMA, Mistral; false for GPT-4
613
+ */
347
614
  isOpenWeights: boolean;
615
+ /**
616
+ * Allowed for commercial/business use.
617
+ * Example: true for Apache/MIT licensed models
618
+ */
348
619
  commercialUse: boolean;
620
+ /**
621
+ * Allowed for research purposes.
622
+ * Example: true for most models, even proprietary ones
623
+ */
349
624
  researchUse: boolean;
625
+ /**
626
+ * Must attribute/cite when using.
627
+ * Example: true for CC-BY licenses
628
+ */
350
629
  attributionRequired: boolean;
630
+ /**
631
+ * Derivatives must use same license.
632
+ * Example: true for GPL, CC-BY-SA licenses
633
+ */
351
634
  shareAlikeRequired: boolean;
635
+ /**
636
+ * Specific usage restrictions or conditions.
637
+ * Examples: ["No use for surveillance", "Monthly active user limits",
638
+ * "No competitive use against provider"]
639
+ */
352
640
  usageRestrictions: string[];
353
641
  }
354
642
  export declare const Architecture: MessageFns<Architecture>;