Close Menu
geekfence.comgeekfence.com
    What's Hot

    M&A Monthly: February/March 2026

    March 7, 2026

    Posit AI Blog: luz 0.4.0

    March 7, 2026

    Top Reasons to Choose Precisely for SAP and Salesforce Process Automation

    March 7, 2026
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook Instagram
    geekfence.comgeekfence.com
    • Home
    • UK Tech News
    • AI
    • Big Data
    • Cyber Security
      • Cloud Computing
      • iOS Development
    • IoT
    • Mobile
    • Software
      • Software Development
      • Software Engineering
    • Technology
      • Green Technology
      • Nanotechnology
    • Telecom
    geekfence.comgeekfence.com
    Home»Artificial Intelligence»Posit AI Blog: luz 0.4.0
    Artificial Intelligence

    Posit AI Blog: luz 0.4.0

    AdminBy AdminMarch 7, 2026No Comments4 Mins Read0 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    Posit AI Blog: luz 0.4.0
    Share
    Facebook Twitter LinkedIn Pinterest Email



    A new version of luz is now available on CRAN. luz is a high-level interface for torch. It aims to reduce the boilerplate code necessary to train torch models while being as flexible as possible,
    so you can adapt it to run all kinds of deep learning models.

    If you want to get started with luz we recommend reading the
    previous release blog post as well as the ‘Training with luz’ chapter of the ‘Deep Learning and Scientific Computing with R torch’ book.

    This release adds numerous smaller features, and you can check the full changelog here. In this blog post we highlight the features we are most excited for.

    Support for Apple Silicon

    Since torch v0.9.0, it’s possible to run computations on the GPU of Apple Silicon equipped Macs. luz wouldn’t automatically make use of the GPUs though, and instead used to run the models on CPU.

    Starting from this release, luz will automatically use the ‘mps’ device when running models on Apple Silicon computers, and thus let you benefit from the speedups of running models on the GPU.

    To get an idea, running a simple CNN model on MNIST from this example for one epoch on an Apple M1 Pro chip would take 24 seconds when using the GPU:

      user  system elapsed 
    19.793   1.463  24.231 

    While it would take 60 seconds on the CPU:

      user  system elapsed 
    83.783  40.196  60.253 

    That is a nice speedup!

    Note that this feature is still somewhat experimental, and not every torch operation is supported to run on MPS. It’s likely that you see a warning message explaining that it might need to use the CPU fallback for some operator:

    [W MPSFallback.mm:11] Warning: The operator 'at:****' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance implications. (function operator())

    Checkpointing

    The checkpointing functionality has been refactored in luz, and
    it’s now easier to restart training runs if they crash for some
    unexpected reason. All that’s needed is to add a resume callback
    when training the model:

    # ... model definition omitted
    # ...
    # ...
    resume <- luz_callback_resume_from_checkpoint(path = "checkpoints/")
    
    results <- model %>% fit(
      list(x, y),
      callbacks = list(resume),
      verbose = FALSE
    )

    It’s also easier now to save model state at
    every epoch, or if the model has obtained better validation results.
    Learn more with the ‘Checkpointing’ article.

    Bug fixes

    This release also includes a few small bug fixes, like respecting usage of the CPU (even when there’s a faster device available), or making the metrics environments more consistent.

    There’s one bug fix though that we would like to especially highlight in this blog post. We found that the algorithm that we were using to accumulate the loss during training had exponential complexity; thus if you had many steps per epoch during your model training,
    luz would be very slow.

    For instance, considering a dummy model running for 500 steps, luz would take 61 seconds for one epoch:

    Epoch 1/1
    Train metrics: Loss: 1.389                                                                
       user  system elapsed 
     35.533   8.686  61.201 

    The same model with the bug fixed now takes 5 seconds:

    Epoch 1/1
    Train metrics: Loss: 1.2499                                                                                             
       user  system elapsed 
      4.801   0.469   5.209

    This bugfix results in a 10x speedup for this model. However, the speedup may vary depending on the model type. Models that are faster per batch and have more iterations per epoch will benefit more from this bugfix.

    Thank you very much for reading this blog post. As always, we welcome every contribution to the torch ecosystem. Feel free to open issues to suggest new features, improve documentation, or extend the code base.

    Last week, we announced the torch v0.10.0 release – here’s a link to the release blog post, in case you missed it.

    Photo by Peter John Maridable on Unsplash

    Enjoy this blog? Get notified of new posts by email:

    Posts also available at r-bloggers

    Reuse

    Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don’t fall under this license and can be recognized by a note in their caption: “Figure from …”.

    Citation

    For attribution, please cite this work as

    Falbel (2023, April 17). Posit AI Blog: luz 0.4.0. Retrieved from 

    BibTeX citation

    @misc{luz-0-4,
      author = {Falbel, Daniel},
      title = {Posit AI Blog: luz 0.4.0},
      url = {},
      year = {2023}
    }



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    The Download: an AI agent’s hit piece, and preventing lightning

    March 6, 2026

    The Accidental Orchestrator – O’Reilly

    March 5, 2026

    How AI trained on birds is surfacing underwater mysteries

    March 4, 2026

    Copilot Tasks: From Answers to Actions  | Microsoft Copilot Blog

    March 3, 2026

    Featured video: Coding for underwater robotics | MIT News

    March 2, 2026

    KV Caching in LLMs: A Guide for Developers

    March 1, 2026
    Top Posts

    Hard-braking events as indicators of road segment crash risk

    January 14, 202619 Views

    Understanding U-Net Architecture in Deep Learning

    November 25, 202518 Views

    How to integrate a graph database into your RAG pipeline

    February 8, 202610 Views
    Don't Miss

    M&A Monthly: February/March 2026

    March 7, 2026

    Fresh from TeleGeography’s GlobalComms team is this month’s edition of M&A Monthly—your intelligence report on…

    Posit AI Blog: luz 0.4.0

    March 7, 2026

    Top Reasons to Choose Precisely for SAP and Salesforce Process Automation

    March 7, 2026

    Introducing OpenClaw on Amazon Lightsail to run your autonomous private AI agents

    March 7, 2026
    Stay In Touch
    • Facebook
    • Instagram
    About Us

    At GeekFence, we are a team of tech-enthusiasts, industry watchers and content creators who believe that technology isn’t just about gadgets—it’s about how innovation transforms our lives, work and society. We’ve come together to build a place where readers, thinkers and industry insiders can converge to explore what’s next in tech.

    Our Picks

    M&A Monthly: February/March 2026

    March 7, 2026

    Posit AI Blog: luz 0.4.0

    March 7, 2026

    Subscribe to Updates

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2026 Geekfence.All Rigt Reserved.

    Type above and press Enter to search. Press Esc to cancel.