QDpy
Loading...
Searching...
No Matches
llmatic.py File Reference

Coupled prompt and architecture archives with provider-independent variation. More...

Go to the source code of this file.

Classes

class  qdpy.algorithms.llmatic.LLMaticRequest
 One typed architecture proposal, with explicit parents and generation controls. More...
class  qdpy.algorithms.llmatic.LLMaticResult
 Coupled archives and the distinct costs of generation and measurement. More...

Namespaces

namespace  qdpy

Functions

 qdpy.algorithms.llmatic.llmatic (archive, prompt_archive, *, initial, prompts, generate, evaluate, proposal_budget, evaluation_budget, batch_size=8, crossover_probability=.3, crossover_prompt="Combine the parents.", crossover_neighbors=2, prompt_exploration=.2, initial_temperature=.6, temperature_step=.1, seed=0)
 Evolve network and prompt archives under independent proposal and training budgets.

Detailed Description

Coupled prompt and architecture archives with provider-independent variation.

See also
https://doi.org/10.1145/3638529.3654017

Definition in file llmatic.py.

Function Documentation

◆ llmatic()

qdpy.algorithms.llmatic.llmatic ( archive,
prompt_archive,
* ,
initial,
prompts,
generate,
evaluate,
proposal_budget,
evaluation_budget,
batch_size = 8,
crossover_probability = .3,
crossover_prompt = "Combine the parents.",
crossover_neighbors = 2,
prompt_exploration = .2,
initial_temperature = .6,
temperature_step = .1,
seed = 0 )

Evolve network and prompt archives under independent proposal and training budgets.

Parameters
archiveEmpty best-only Grid or CVTGrid of immutable architecture payloads.
prompt_archiveDistinct Grid or CVTGrid over normalized prompt index and temperature.
initialKnown architecture payload or seed for the first proposals.
promptsOrdered collection of distinct mutation prompt strings.
generateCallable (LLMaticRequest, rng) returning an architecture or None.
evaluateCallable (architecture) returning scalar quality and descriptors, or None.
proposal_budgetMaximum calls to the generator.
evaluation_budgetMaximum distinct architecture training or lookup calls.
batch_sizeNumber of requests per frozen archive batch.
crossover_probabilityProbability of requesting crossover when neighbors exist.
crossover_promptFixed instruction for a crossover.
crossover_neighborsNumber of neighbors supplied with the anchor architecture.
prompt_explorationProbability of choosing a uniformly sampled prompt template.
initial_temperatureBaseline generator temperature in [0, 1].
temperature_stepMaximum temperature jitter and feedback adjustment scale.
seedPrivate NumPy seed.
Returns
LLMaticResult with both archives and budget accounting.
Reward prompts that produce good measured architectures.

Curiosity is tracked per template. A new archive entry earns one point,
rejection costs half a point, and a failed mutation costs one point.
Only measured models can earn credit for exceeding the previous batch's
best architecture. The prompt grid stores cumulative credits and uses
normalized template index and temperature as descriptors. The network
grid stores measured validation quality.

The evaluator is assumed stationary and deterministic for an immutable
architecture (including rejected ones). Each payload is measured at most
once. The initial architecture supplies a parent without using a
measurement call. It can enter the archive if a generator proposes it.

Definition at line 85 of file llmatic.py.