<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jofia Jose Prakash on Medium]]></title>
        <description><![CDATA[Stories by Jofia Jose Prakash on Medium]]></description>
        <link>https://medium.com/@jofiajose.prakash?source=rss-1787d482ee03------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pjhloqSSEIOHmgOC</url>
            <title>Stories by Jofia Jose Prakash on Medium</title>
            <link>https://medium.com/@jofiajose.prakash?source=rss-1787d482ee03------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 23:18:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jofiajose.prakash/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Brains to Agents: My Journey Building LLM Systems That Act]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/from-brains-to-agents-my-journey-building-llm-systems-that-act-d559d47c3509?source=rss-1787d482ee03------2"><img src="https://cdn-images-1.medium.com/max/1536/1*DCKNmvGwXx7EPyd1cRbsEQ.png" width="1536"></a></p><p class="medium-feed-snippet">How I moved from &#x201C;answers&#x201D; to &#x201C;actions&#x201D; with retrieval, tools, and agent loops</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/from-brains-to-agents-my-journey-building-llm-systems-that-act-d559d47c3509?source=rss-1787d482ee03------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/from-brains-to-agents-my-journey-building-llm-systems-that-act-d559d47c3509?source=rss-1787d482ee03------2</link>
            <guid isPermaLink="false">https://medium.com/p/d559d47c3509</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Jofia Jose Prakash]]></dc:creator>
            <pubDate>Thu, 15 Jan 2026 12:02:47 GMT</pubDate>
            <atom:updated>2026-01-15T21:55:13.565Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Build a Practical Distillation Loop: Cross-Entropy, KL, and Dark Knowledge in Action]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/build-a-practical-distillation-loop-cross-entropy-kl-and-dark-knowledge-in-action-febf7f6af3da?source=rss-1787d482ee03------2"><img src="https://cdn-images-1.medium.com/max/2600/1*xbNvrmKVzhR5ZzvbA2sKkw.jpeg" width="6232"></a></p><p class="medium-feed-snippet">Learn the hidden signal inside teacher probabilities (&#x201C;dark knowledge&#x201D;) and use cross-entropy + KL to transfer it to a smaller model.</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/build-a-practical-distillation-loop-cross-entropy-kl-and-dark-knowledge-in-action-febf7f6af3da?source=rss-1787d482ee03------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/build-a-practical-distillation-loop-cross-entropy-kl-and-dark-knowledge-in-action-febf7f6af3da?source=rss-1787d482ee03------2</link>
            <guid isPermaLink="false">https://medium.com/p/febf7f6af3da</guid>
            <category><![CDATA[cross-entropy]]></category>
            <category><![CDATA[dark-knowledge]]></category>
            <category><![CDATA[knowledge-distillation]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Jofia Jose Prakash]]></dc:creator>
            <pubDate>Thu, 25 Dec 2025 00:02:25 GMT</pubDate>
            <atom:updated>2025-12-25T00:02:25.183Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Accelerating Data Processing with Multi-GPU Cluster]]></title>
            <link>https://medium.com/@jofiajose.prakash/accelerating-data-processing-with-multi-gpu-cluster-87f2ea00c2b7?source=rss-1787d482ee03------2</link>
            <guid isPermaLink="false">https://medium.com/p/87f2ea00c2b7</guid>
            <category><![CDATA[model-parallelism]]></category>
            <category><![CDATA[dask-cuda-implementation]]></category>
            <category><![CDATA[dask-cudf]]></category>
            <category><![CDATA[data-parallelism]]></category>
            <category><![CDATA[multi-gpu-processing]]></category>
            <dc:creator><![CDATA[Jofia Jose Prakash]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 02:45:00 GMT</pubDate>
            <atom:updated>2025-02-28T22:38:05.832Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3PB825x8uuAAQAI_iUqhqg.jpeg" /></figure><p>Processing large datasets often requires harnessing the power of multiple GPUs to achieve significant speedups. In this post, we’ll explore best practices for setting up a multi-GPU cluster using Dask and CUDA, and highlight key techniques for efficient data loading, model caching, and safe concurrent file writes.</p><p><strong>Setting Up a Multi-GPU Cluster</strong></p><p>The first step is to create a multi-GPU environment. Tools like Dask with CUDA make it easy to spin up a local GPU cluster where each GPU runs as a worker. This allows you to parallelize tasks across available GPUs.</p><pre>from dask_cuda import LocalCUDACluster<br>from distributed import Client<br><br># Create a cluster using 4 GPUs<br>with LocalCUDACluster(<br>    n_workers=4,<br>    threads_per_worker=1,<br>    CUDA_VISIBLE_DEVICES=&quot;0,1,2,3&quot;,<br>    rmm_pool_size=&quot;10GB&quot;,<br>    memory_limit=&quot;10GB&quot;<br>) as cluster, Client(cluster) as client:<br>    print(&quot;Cluster ready. Dashboard:&quot;, client.dashboard_link)<br>    # Your parallel tasks can be scheduled here.</pre><p><strong>Efficient Data Loading and Partitioning</strong></p><p>Loading data efficiently is critical for large-scale processing. Dask-cuDF extends Dask dataframes to work on GPUs by leveraging cuDF, which is designed for high-performance GPU computing. The snippet below shows how to use Dask-cuDF to load and partition data from non-empty JSONL files. Notice how the code handles file listing and uses an explicit block size to optimize I/O operations:</p><pre>import os, dask_cudf, logging<br><br>def load_dataset(folder_path):<br>    # List only non-empty JSONL files<br>    files = [os.path.join(folder_path, f) for f in os.listdir(folder_path)<br>             if f.endswith(&#39;.jsonl&#39;) and os.path.getsize(os.path.join(folder_path, f)) &gt; 0]<br>    <br>    # Create a file pattern if there are multiple files<br>    file_pattern = files[0] if len(files) == 1 else os.path.join(folder_path, &quot;*.jsonl&quot;)<br>    <br>    # Load files with an explicit block size for optimal I/O<br>    ddf = dask_cudf.read_json(file_pattern, lines=True, engine=&#39;cudf&#39;, blocksize=&quot;64MB&quot;)<br>    logging.info(f&quot;Loaded {ddf.npartitions} partitions&quot;)<br>    return ddf</pre><p><strong>Caching Models on Each Worker</strong></p><p>For compute-intensive tasks, such as generating embeddings or performing other heavy computations, caching the model on each GPU worker is essential. Each worker maintains a local instance of the model, avoiding the overhead of reloading it for every partition. Below is a generic snippet demonstrating how each worker can cache its model:</p><pre>from sentence_transformers import SentenceTransformer<br>from distributed import get_worker<br><br>def process_partition(partition):<br>    worker = get_worker()<br>    if not hasattr(worker, &quot;local_model&quot;):<br>        worker.local_model = SentenceTransformer(&quot;your-model-name&quot;)<br>    <br>    # Process the partition (e.g., generate embeddings)<br>    texts = partition[&#39;text&#39;].to_arrow().to_pylist()<br>    embeddings= worker.local_model.encode(texts, batch_size=16, convert_to_tensor=False)<br>    return embeddings</pre><p><strong>Finer-Grained Distributed Locking for Safe Concurrent File Writes</strong></p><p>Finer-grained locking improves concurrency by assigning locks at a more granular level, such as per partition, file, or resource, rather than using a single global lock. This approach allows multiple GPUs or workers to write output simultaneously without blocking each other, enhancing performance and scalability. When combined with a distributed locking mechanism and unique filenames, it ensures safe and efficient parallel writes in distributed environments</p><pre>import os, time, uuid<br>from distributed import Lock<br><br>def write_output(data, partition_idx):<br>    output_dir = &#39;/path/to/output/&#39;<br>    os.makedirs(output_dir, exist_ok=True)<br>    unique_id = f&quot;{int(time.time())}-{partition_idx}-{uuid.uuid4()}&quot;<br>    file_path = os.path.join(output_dir, f&quot;output_{unique_id}.parquet&quot;)<br>    <br>    # Use a finer-grained lock based on the partition identifier<br>    lock_name = f&quot;write-lock-{partition_idx}&quot;<br>    with Lock(lock_name):<br>        data.to_parquet(file_path, compression=&#39;snappy&#39;)<br>    print(f&quot;Saved output to {file_path}&quot;)</pre><p><strong>Conclusion</strong></p><p>By combining these techniques — setting up a robust multi-GPU cluster, efficiently loading data with Dask-cuDF, caching models locally for fast processing, and managing concurrent outputs with distributed locks — you can build a highly scalable and efficient data processing pipeline.</p><h3>References</h3><ul><li><a href="https://docs.dask.org/">Dask Documentation</a></li><li><a href="https://docs.rapids.ai/api/dask-cudf/stable/">Dask-cuDF Documentation</a></li><li><a href="https://distributed.dask.org/">Dask Distributed</a></li><li><a href="https://rapids.ai/">RAPIDS.ai</a></li></ul><p>Happy coding and optimized processing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87f2ea00c2b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>