How to reset a counter


Purpose: Original value is origVal, we want to use increase/decrease to update to a specified number

How?
  1. origValue = origValue + expectedValue
  2. diff = expectedValue - origValue
  3. origValue = origValue + diff

Ex. origValue = 54, newValue = 50
  1. origValue = origValue (54) + expectedValue (50) = 104
  2. diff = expectedValue (50) - origValue (104) = -54
  3. origValue = origValue (104) + diff (-54) = 50


沒有留言:

張貼留言

Lessons Learned While Benchmarking vLLM with GPU

Recently, I benchmarked vLLM on a GPU to better understand how much throughput can realistically be expected in an LLM serving setup. One ...