5 ms·
I've been using Cactus for a few months, great product! Makes it really easy to plug and play different models on my phone. If anybody is curious what a Pixel
by cco 1y ago
I've been using Cactus for a few months, great product!
Makes it really easy to plug and play different models on my phone.
If anybody is curious what a Pixel 9 Pro is capable of:
Tokens: 277- TTFT: 1609ms 9 tok/sec
qwen2.5 1.5b instruct q6_k
Sure, here's a simple implementation of the Bubble Sort algorithm in Python:
def bubble_sort(arr):
n = len(arr)
for i in range(n):
# Flag to detect any swap in current pass
swapped = False
for j in range(0, n-i-1):
# Swap if the element found is greater than the next element
if arr[j] > arr[j+1]:
arr[j], arr[j+1] = arr[j+1], arr[j]
swapped = True
# If no swap occurs in the inner loop, the array is already sorted
if not swapped:
break
# Example usage:
arr = [64, 34, 25, 12, 22, 11, 90]
bubble_sort(arr)
print("Sorted array is:", arr)
This function sorts the array in ascending order using the Butbble Sort algorithm. The outer loop runs n times, where n is the length of the array. The inner loop runs through the array, comparing adjacent elements and swapping them if they are in the wrong order. The swapped flag is used to detect if any elements were swapped in the current pass, which would indicate that the array is already sorted and can be exited early.
- HenryNdubuaku 1y agoThanks for the kind words, we’ve improved performance now actually, follow the instructions on the core repo. Same model should run 3x faster on the same phone. These improvements are still being pushed to the SDKs though.
- cco 1y agoWow! 3x is huge. I've had great experiences with gpt-oss20b on my laptop, a genuinely useful local model. 3x probably doesn't get my Pixel Pro 9 to being able to run 20b models, but its getting close!
- HenryNdubuaku 1y agoAlthough GPT OSS 20B has 1.7B activated parameters which will be fast, 20B weights is a lot for developers to bundle or consumers to download. That’s the actual problem.