Skip to content

Commit

Permalink
Including initial individuals to potentially include search efficienc…
Browse files Browse the repository at this point in the history
…y in the initialize_population function
  • Loading branch information
jshuadvd committed Jul 5, 2024
1 parent 2fa0129 commit 3649711
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,19 @@ def initialize_population(population_size, search_space, d_model):

population.append(ntk_individual)

# Add YaRN individual
yarn_individual = {
"lambda_i": [1.0] * (d_model // 6)
+ [
search_space["lambda_i"][1] ** (i / (d_model // 2))
for i in range(d_model // 6, d_model // 3)
]
+ [search_space["lambda_i"][1]] * (d_model // 2 - d_model // 3),
"n_hat": 0,
}

population.append(yarn_individual)

for _ in range(population_size):
individual = {
"lambda_i": [
Expand Down

0 comments on commit 3649711

Please sign in to comment.