Stan (@stanqin) profile picture

Machine learning engineer

Hong Kong
Joined January 2011
Photo by Stan (@stanqin)
EFFICIENT LLM INFERENCE - The interview pocket notes you actually need drive.google.com/file/d/1mfT…
7
214
1
1,481
76,765
Code Memphis. Initiate!
15
My deep learning course @unige_en is available on-line. 1000+ slides, ~20h of screen-casts. Full of examples in @PyTorch. fleuret.org/dlc/ And my "Little Book of Deep Learning" is available as a phone-formatted pdf (400k downloads!) fleuret.org/lbdl/
62
706
41
3,626
588,959
I think I *finally* get it:
5
107
4
783
81,970
Everything is smooth.
5
Traditional RAG vs. HyDE, visually explained! One critical problem with the traditional RAG system is that questions are not semantically similar to their answers. Consider the example where you want to find a sentence similar to "What is ML?" It is likely that "What is AI?" will appear more similar than "Machine learning is fun." This semantic dissimilarity leads to several irrelevant contexts being retrieved during the retrieval step. HyDE solves this issue. The visual below illustrates how this approach differs from traditional RAG. Here's how it works: - Use an LLM to generate a hypothetical answer (H) for the query (Q). This answer doesn't have to be entirely correct. - Embed the answer using a contriever model to obtain E. Bi-encoders trained with contrastive learning are generally used for this purpose. - Use the embedding E to query the vector database and retrieve relevant context (C). - Pass the hypothetical answer H, the retrieved context C, and the query Q to the LLM to produce a final answer. Done! Now, of course, the hypothetical generated will likely contain hallucinated details. But this does not severely affect the performance due to the contriever model—one which embeds. More specifically, this model is trained using contrastive learning and it also functions as a near-lossless compressor whose task is to filter out the hallucinated details of the fake document. This produces a vector embedding that is expected to be more similar to the embeddings of actual documents than the question is to the real documents. Several studies have shown that HyDE improves the retrieval performance compared to the traditional embedding model. But this comes at the cost of increased latency and more LLM usage. Enjoyed this? You should also my RAG series! From building and optimizing RAG apps to evaluating performance and crafting agentic & multi-modal systems—it's all here. Link in the next tweet! _____ Find me → @akshay_pachaar ✔️ For more insights and tutorials on AI and Machine Learning!
29
242
4
1,336
243,248
A friend in #OpenAI said #AGI will be achieved in 2027. Let's wait and see.
16
Indulging in Dover's math books ... simply amazing.
6
Here is everything that happened in AI Agents this week 🧵  (save for later)
88
447
32
3,161
485,761
Embodied learning
OpenAI’s biggest competitor just gave AI the ability to control computers We gave 250+ hackers 24 hours to see what it’s capable of Here’s what we saw at the Nexgen Computer Use Agents Hackathon w/ @AnthropicAI + @AgentOpsAI @notablecap at @AGIHouseSF (🧵):
15
Vision finetuning is finally in🦥@UnslothAI! It took a while, but Llama 3.2 Vision, Pixtral, Qwen2 VL & all Llava variants now work! 1. QLoRA / LoRA is 1.3x to 2x faster for each 2. 30-70% less VRAM usage 3. 3 examples - Radiography, LaTeX, Q&A Extra stuff: 1. Pixtral chat template in HF conversion now fixed. Added SDPA to Pixtral. Pixtral finetuning also fits in a free 16GB Colab with Unsloth! Also uploaded HF format for Pixtral Base to Unsloth - huggingface.co/unsloth/Pixtr… 2. Qwen VL had only partial gradient checkpointing support - adding it reduces VRAM usage from 24GB to ~3GB for Qwen VL 2B. 3. Added selective LoRA - select either the language and/or vision parts to finetune. Also select the MLP/attention layers. 4. Uploaded 4bit bitsandbytes quants for Llama 3.2 11B, 90B, Qwen2 VL 2B, 7B, 72B, Pixtral 12B & Base, Llava 1.5 Vicuna and 1.6 Mistral to huggingface.co/unsloth 5. Native long context support for vision finetuning! Unsloth can finetune Qwen 72B in < 48Gb VRAM and Llama 3.2 90B in 1x 80GB card! 6. Added merging to 16bit directly for vision to export to vLLM for inference. Ollama also works for Llama vision! Update Unsloth via `pip install --upgrade unsloth unsloth_zoo` to get the latest updates! Github: github.com/unslothai/unsloth Radiography Llama 3.2 Colab: colab.research.google.com/dr… OCR LaTeX Qwen2 VL Colab: colab.research.google.com/dr… General Q&A Pixtral Colab: colab.research.google.com/dr… Blog: unsloth.ai/blog/vision
11
102
11
562
45,501
A master is who knows when to sell but not when to buy
5
Impressive work.
Meet Tülu 3 -- a set of state-of-the-art instruct models with fully open data, eval code, and training algorithms. We invented new methods for fine-tuning language models with RL and built upon best practices in the community to scale synthetic instruction and preference data. Demo, GitHub, technical report, and models below 👇
13
The clothes folding problem is not easy. It may require a small world model at first glance, though it could be simplified to transfer learning.
87
If you have an Apple M1 or M2 and don't take advantage of its GPU, I'm about to change your life. These instructions allow TensorFlow to use your GPU: 1 of 10
147
864
36
6,232
Unbelievable. Telegram is down.
3
"This analysis provides evidence that SARS-CoV-2 is not a laboratory construct nor a purposefully manipulated virus." Before you read any speculation about SARS-CoV-2 origins, read this post by some leading researchers in pathogen evolution/genomics virological.org/t/the-proxim…
16
194
32
347