Better HN
topnewbestaskshowjobs
Log inSign up

jchandra

117 karma · joined Mar 17, 2020 (6y ago) · 31 submissions

[ my public key: https://keybase.io/jchandra; my proof: https://keybase.io/jchandra/sigs/CZWAMEfii33T_DFtePEne5Zksf74ElLdHSgYnh7FOxw ]
Submissions

comment 7mo ago · link · parent

Yeah, that’s consistent. topK keeps the obvious tokens, but subtle context gets eroded over time rather than dropped all at once.

comment 7mo ago · link · parent

Fair point, the gap isn’t huge in that plot, and both degrade at low ratios. The difference is more in how they degrade: TopK can have sharper, localized failures, while HAE tends to be a bit more smooth. That doesn’t always show up strongly in average MSE.

That said, the gains are modest right now, this is still a research prototype exploring the tradeoff, and there’s clearly more work to be done.

comment 7mo ago · link · parent

Thanks, really appreciate the pointer. Will dig into it.

comment 7mo ago · link · parent

Haha, that’s a very fair reading :)

Yeah, the latency hit is definitely real. That said, most of what I’ve run so far is CPU-bound, which likely exaggerates it quite a bit so I didn’t want to draw strong conclusions from that.

Would need proper GPU implementations to really understand where it lands.

comment 7mo ago · link · parent

I completely agree.Right now this is all on a synthetic setup to isolate the behavior and understand the reconstruction vs memory tradeoff. Real models will definitely behave differently.

I’ve started trying this out with actual models, but currently running things CPU-bound, so it’s pretty slow. Would ideally want to try this properly on GPU, but that gets expensive quickly

So yeah, still very much a research prototype — but validating this on real models/data is definitely the next step.

comment 7mo ago · link · parent

That’s a great point and yeah, I’d agree SVD itself isn’t new at all.

On downsides: definitely a few. The biggest one is latency - SVD is fairly heavy, so even though it’s amortized (runs periodically, not per token), it still adds noticeable overhead. It’s also more complex than simple pruning, and I haven’t validated how well this holds on real downstream tasks yet.

This is very much a research prototype right now more about exploring a different tradeoff space than something ready for production.

comment 7mo ago · link · parent

In this prototype, OLS + SVD isn’t per-token, it runs only when the recycle bin fills (amortized over multiple tokens).

That said, it’s still heavier than Top-K. I haven’t benchmarked end-to-end latency yet; this is mainly exploring the accuracy vs memory tradeoff.

comment 7mo ago · link · parent

I’ve been exploring KV cache optimization for LLM inference.

Most methods (Top-K, sliding window) prune tokens. This works on average, but fails selectively — a few tokens cause large errors when removed.

I tried reframing the problem as approximating the attention function: Attn(Q, K, V)

Prototype: - entropy → identify weak tokens - OLS → reconstruct their contribution - SVD → compress them

Early results show lower error than Top-K at low memory, sometimes even lower memory overall.

This is still a small research prototype, would appreciate feedback or pointers to related work.

9.

High-Fidelity KV Cache Summarization Using Entropy and Low-Rank Reconstruction(jchandra.com ↗)

64 points · by jchandra · 7mo ago · 17 comments

comment 1y ago · link · parent

Totally fair point — at the end of the day, it's all about getting the best model performance. I was mostly trying to highlight how, under the hood, a lot of modern HPO algos really boil down to smart scheduling decisions.

11.

Hyperparameter Tuning Is a Resource Scheduling Problem(jchandra.com ↗)

2 points · by jchandra · 1y ago · 3 comments

comment 1y ago · link · parent

Pickle still is good for custom objects (JSON loses methods and also order), Graphs & circular refs (JSON breaks), Functions & lambdas (Essential for ML & distributed systems) and is provided out of box.

13.

AI Supply Chain Attack: How Malicious Pickle Files Backdoor Models(jchandra.com ↗)

4 points · by jchandra · 1y ago · 7 comments

comment 1y ago · link · parent

pytorch save/load still are pickle based models. Its fine for trusted sources but when you start using from untrusted sources then there is always a risk of ACE. If you want to execute it, would suggest to try it in a sandbox env like docker, VM or online notebooks envs or other option is to inspect the model file.

As Open source AI booms, the risk of supply chain attacks also increases.

comment 1y ago · link · parent

joblib is not fully secure because it still relies on Pickle internally. The reason it is slightly better in pickle is due to fact that pickle file gets immediately executed when it gets imported whereas joblib doesn’t execute code just by being imported.

16.

How Pickle Files Backdoor AI Models(jchandra.com ↗)

6 points · by jchandra · 1y ago · 6 comments

comment 1y ago · link · parent

2

comment 1y ago · link · parent

our approach wasn’t about over-engineering, we were trying to leverage our existing investments (like Confluent BYOC) while optimizing for flexibility, cost, and performance. We wanted to stay loosely coupled to adapt to cloud restrictions across multiple geographic deployments.

comment 1y ago · link · parent

We did have a discussion on Self vs Managed and TCOs associated with it. 1> We have multi regional setup so it came up with Data Sovereignty requirements. 2> Vendor Lock ins - Few of the services were not available in that geographic region 3> With managed services, you often pay for capacity you might not always use. our workloads were often consistent and predictable, so self managed solutions helped in fine tuning our resources. 4> One og the goal was to keep our storage and compute loosely coupled while staying Iceberg-compatible for flexibility. Whether it’s Trino today or Snowflake/Databricks tomorrow, we aren’t locked in.

comment 1y ago · link · parent

As for BigQuery, while it's a great tool, we faced challenges with high-volume, small queries where costs became unpredictable as it is priced per data volume scanned. Clustered tables, Materialised views helped to some extent, but they didn’t fully mitigate the overhead for our specific workloads. There are ways to overcome and optimize it for sure so i wouldn't exactly put it on GBQ or any limitations.

It’s always a trade-off, and we made the call that best fit our scale, workloads, and long-term plans

21.

We built a modern data stack from scratch and reduced our bill by 70%(jchandra.com ↗)

83 points · by jchandra · 1y ago · 59 comments

22.

Building a Modern Data Stack: Our 70% Cost Reduction with Open Source(jchandra.com ↗)

3 points · by jchandra · 1y ago · discuss

23.

Anti-Vaxxer on Linux mailing list(lkml.iu.edu ↗)

2 points · by jchandra · 5y ago · discuss

comment 5y ago · link · parent

https://www.greenhouse.io/ down as well.

comment 5y ago · link · parent

IMO, i dont think terraform is the right tool for containerized services. I had experimented with terraform and ansible for deployments earlier but i could see simpler deployments using serverless or apex.

Informative article though.

26.

Pentagon Planned for a Bitcoin Rebellion(forbes.com ↗)

87 points · by jchandra · 6y ago · 90 comments

27.

Ask HN: What are the dont's in a tech interview

3 points · by jchandra · 6y ago · 2 comments

28.

Barnum Effect(en.wikipedia.org ↗)

2 points · by jchandra · 6y ago · discuss

12