Skip to content

Instantly share code, notes, and snippets.

View nathanhere's full-sized avatar
🤠

Nathan nathanhere

🤠
View GitHub Profile
@nathanhere
nathanhere / calc-gpu-layers.py
Created March 17, 2024 09:08 — forked from mrseanryan/calc-gpu-layers.py
Rough PoC using binary search to find the optimal number of model layers to offload to the GPU, for this LLM and this hardware.
"""
Rough PoC using binary search to find the optimal number of model layers to offload to the GPU, for this LLM and this hardware.
"""
import time
def call_llm(prompt, gpu_layers):
# TODO fill in the actual call to LLM here
# dummy GPU memory limit
test_best_layers = 60
@nathanhere
nathanhere / selection-command.js
Created December 19, 2019 17:36 — forked from erquhart/selection-command.js
Text selection commands for Cypress.io
/**
* Credits
* @Bkucera: https://github.com/cypress-io/cypress/issues/2839#issuecomment-447012818
* @Phrogz: https://stackoverflow.com/a/10730777/1556245
*
* Usage
* ```
* // Types "foo" and then selects "fo"
* cy.get('input')
* .type('foo')