Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simultaneous fwd/bwd in peft finetuning + layer-level finetuning #1544

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e3b7e79
first commit
goliaro Nov 22, 2024
bd93585
rename
goliaro Nov 23, 2024
00d1a1b
helpers
goliaro Nov 23, 2024
82284f2
backup
goliaro Nov 23, 2024
6266ec7
backup
goliaro Nov 24, 2024
4fcdf79
finished impl
goliaro Nov 25, 2024
6d7aa57
add benchmarking scripts
goliaro Nov 25, 2024
09aa5af
fix
goliaro Nov 25, 2024
9c0d827
fix
goliaro Nov 25, 2024
784c8d9
build fix
goliaro Nov 25, 2024
ee48def
fix bugs
goliaro Nov 26, 2024
450c98f
update
goliaro Nov 27, 2024
98e025c
fix
goliaro Nov 27, 2024
d963933
fixes
goliaro Nov 27, 2024
287dadb
fix
goliaro Nov 27, 2024
6a1544d
update
goliaro Nov 28, 2024
10e1596
use one bc only
goliaro Nov 29, 2024
89a6287
fix
goliaro Nov 29, 2024
caa4880
fix
goliaro Nov 29, 2024
f27a224
fix
goliaro Nov 30, 2024
68dfa8c
fix
goliaro Nov 30, 2024
529d9f1
fix
goliaro Nov 30, 2024
6cb9266
fix
goliaro Nov 30, 2024
03498c1
fix
goliaro Nov 30, 2024
9fcf6a3
update
goliaro Nov 30, 2024
7fba224
Merge branch 'inference' into flexllm
goliaro Dec 1, 2024
07e8e62
add file to get dolly
goliaro Dec 1, 2024
bbde408
update
goliaro Dec 1, 2024
de2fcd9
update
goliaro Dec 1, 2024
c8dc468
add warmup requests
goliaro Dec 2, 2024
0b150e3
update
goliaro Dec 3, 2024
4ec561e
update
goliaro Dec 3, 2024
07b9e50
fix
goliaro Dec 4, 2024
b077d27
update
goliaro Dec 4, 2024
3939025
add scripts
goliaro Dec 4, 2024
943c06b
fix
goliaro Dec 4, 2024
9516e59
gqa fwd
goliaro Dec 5, 2024
bf1ff34
bwd gqa
goliaro Dec 5, 2024
b3a393a
fix
goliaro Dec 6, 2024
04c6857
fix
goliaro Dec 6, 2024
ec500d2
add overhead test
goliaro Dec 6, 2024
16b3a99
update script
goliaro Dec 7, 2024
c65cf0d
update script
goliaro Dec 7, 2024
bc30870
fixes
goliaro Dec 7, 2024
2cc42d1
fix
goliaro Dec 8, 2024
b094c12
add plot script
goliaro Dec 8, 2024
2d7910b
fixes, add data
goliaro Dec 8, 2024
ab0b209
update
goliaro Dec 8, 2024
066d9e8
add results and plots
goliaro Dec 9, 2024
5cc5535
update
goliaro Dec 10, 2024
770b5a9
add new files
goliaro Dec 10, 2024
8cddc22
update
goliaro Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions benchmarking/add_arrival_times.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import numpy as np

def generate_poisson_arrivals(n, arrival_rate):
"""
Generate arrival times for n requests following a Poisson process.

Parameters:
n (int): Number of requests to generate
arrival_rate (float): Average arrival rate (requests per second)

Returns:
numpy.ndarray: Array of arrival times in seconds
"""
# Generate n exponentially distributed inter-arrival times
# For a Poisson process, inter-arrival times follow exponential distribution
inter_arrival_times = np.random.exponential(scale=1/arrival_rate, size=n)

# Calculate cumulative sum to get arrival times
arrival_times = np.cumsum(inter_arrival_times)

# Round to 6 decimal places for practical purposes (microsecond precision)
arrival_times = np.round(arrival_times, decimals=6)

return arrival_times

# Example usage
if __name__ == "__main__":
# Example: Generate 10 arrivals with rate of 2 requests per second
n_requests = 250
rate = 0.1 # requests per second

arrivals = generate_poisson_arrivals(n_requests, rate)

print("Arrival times (seconds):")
for i, time in enumerate(arrivals, 1):
print(f"Request {i}: {time:.6f} s")

# Calculate average inter-arrival time to verify
avg_inter_arrival = np.diff(arrivals).mean()
print(f"\nAverage inter-arrival time: {avg_inter_arrival:.6f} s")
print(f"Expected inter-arrival time: {1/rate:.6f} s")

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Loading