Diffusion + Coding = DiffuCode. How Apple Released a Weirdly Interesting Coding Language Model
"Apple quietly dropped a new AI model on Hugging Face with an interesting twist," writes 9to5Mac. "Instead of writing code like traditional LLMs generate text (left to right, top to bottom), it can also write out of order, and improve multiple chunks at once."
"The result is faster code generation, at a performance that rivals top open-source coding models."
Traditionally, most LLMs have been autoregressive. This means that when you ask them something, they process your entire question, predict the first token of the answer, reprocess the entire question with the first token, predict the second token, and so on. This makes them generate text like most of us read: left to right, top to bottom... An alternative to autoregressive models is diffusion models, which have been more often used by image models like Stable Diffusion. In a nutshell, the model starts with a fuzzy, noisy image, and it iteratively removes the noise while keeping the user request in mind, steering it towards something that looks more and more like what the user requested...
Lately, some large language models have looked to the diffusion architecture to generate text, and the results have been pretty promising... This behavior is especially useful for programming, where global structure matters more than linear token prediction... [Apple] released an open-source model called DiffuCode-7B-cpGRPO, that builds on top of a paper called DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation, released just last month... [W]ith an extra training step called coupled-GRPO, it learned to generate higher-quality code with fewer passes. The result? Code that's faster to generate, globally coherent, and competitive with some of the best open-source programming models out there.
Even more interestingly, Apple's model is built on top of Qwen2.5-7B, an open-source foundation model from Alibaba. Alibaba first fine-tuned that model for better code generation (as Qwen2.5-Coder-7B), then Apple took it and made its own adjustments. They turned it into a new model with a diffusion-based decoder, as described in the DiffuCoder paper, and then adjusted it again to better follow instructions. Once that was done, they trained yet another version of it using more than 20,000 carefully picked coding examples.
"Although DiffuCoder did better than many diffusion-based coding models (and that was before the 4.4% bump from DiffuCoder-7B-cpGRPO), it still doesn't quite reach the level of GPT-4 or Gemini Diffusion..." the article points out.
But "the bigger point is this: little by little, Apple has been laying the groundwork for its generative AI efforts with some pretty interesting and novel ideas."
Read more of this story at Slashdot.
Richard Gere kisses the hand of the Dalai Lama as Hollywood legend and devout buddhist celebrates the spiritual leader's 90th birthday in India
Gere, a practicing buddhist since 1978, was seen reverently kissing the spiritual leader's hand at the event, held at Dharamshala.
The ultimate guide to the Cotswolds: Our writer has visited this much-loved region more than 100 times. Here are her top tips for where to stay, what villages to see... and the ones to avoid
I was distraught when my brother and sister-in-law announced they were moving to the Cotswolds with my nephew, writes KATHERINE SPENLEY. But all that changed the first time I visited them.
Off their boat races! Revellers at Henley Regatta look a little worse for wear after hours of drinking and hot weather
The rowing event, which was established in 1839, takes place every year and sees teams compete in more than 300 races along the river in Oxfordshire.
My top tip for how YOU can become a billionaire: Serial entrepreneur RICHARD HARPIN reveals the key secret to business success (and it even saved his local pub)
Richard Harpin, founder of HomeServe, built his domestic emergency repairs business into a £4 billion FTSE 100 company. Now he wants to inspire other entrepreneurs to do the same.
The Essex village with a restaurant loved by Rylan
This rural spot has only a few hundred residents
World War III will start with simultaneous Xi and Putin invasions taking the globe to the brink of Armageddon, warns NATO chief Mark Rutte
According to the NATO chief Mark Rutte, China would start by seeking to grab Taiwan - while ensuring the Kremlin dictator simultaneously attacks NATO territory.
'I fell from a balcony during lads' holiday in Ayia Napa and I've been in hospital in agony for weeks, with nightmares every night and I can't walk. I was an idiot - this is my warning to others'
Sam Hudson, 24, had been partying with his brother and a pal at the resort town when he tumbled from the second floor of his hotel while drunk.
All Greater Anglia trains from London to Essex disrupted after police incident
ALL major train services across Essex faced widespread disruption today following a police-led incident near the railway between Stratford and Shenfield.
All Greater Anglia trains from London to Essex disrupted after police incident
ALL major train services across Essex faced widespread disruption today following a police-led incident near the railway between Stratford and Shenfield.
Ex-Labour leader Neil Kinnock calls for Keir Starmer to impose a 2% 'wealth tax' on Brits' assets as ministers scramble to plug a hole in the public finances
Lord Kinnock, who led Labour between 1983 and 1992, said a two per cent levy on assets worth more than £10million could be a 'pathway' out of the Government's woes.
Inside my strange friendship with a notorious serial killer... and how our daily calls led me to victims of decades-old murders
He was a married father of three from New Jersey who led a sadistic double life - family man by day, serial killer by night.
Reunited Gallagher brothers hold hands in display of unity as they take to the stage for night two of Oasis tour and share 'real reason' for their long-awaited reunion after 16 years
Liam and Noel Gallagher held hands as they walked out on the stage at Cardiff for night two of the Oasis tour on Saturday, before revealing the 'real reason' for their long-awaited reunion.
Partygoer who killed man who made a pass at him is jailed for ANOTHER murder after he throttled his cell-mate to death while on remand
Vitalie Tanga, 41, was given a life sentence last year for the 'senseless' killing of Alfred Mattox, who was gay, after beating him to death in his own home in 2021.
It's the vacation paradise Americans love to visit. But spate of people vanishing have tourists terrified
Two tourists arrived within weeks of one another, seeking sun, sand and escape.
Is THIS Britain's most depressed suburb? How deprived community has highest amount of people claiming for mental health as locals say 'its a dump'
Almost one in 20 people in this constituency area, which is home to Everton's Goodison Park and Liverpool Anfield, claim PIP for depression and anxiety.
Texas rancher fights back tears as he describes flooded town's 'unbelievable' devastation as death toll climbs to 50
At least 50 people have died after the Guadalupe River surged 30 feet above its normal height, devastating children's summer camps and ripping apart families.
Family reveals desperate final words of brave Texas father who died saving kids and fiancée from floods
Julian Ryan, 27, died early Friday morning when fast-moving floodwaters from the Guadalupe River - which surged over 30 feet above its normal height - swept into his family's home in Ingram.
Beekeeper at war with neighbours after claims his swarms are rendering their gardens 'unusable'
A beekeeper has become embroiled in a war with angry neighbours after they claimed his swarms were rendering their gardens 'unusable'.
Inside Julian McMahon's colourful love life - from a whirlwind marriage to Dannii Minogue, a fling with Shannen Doherty and his private romance with wife Kelly Paniagua - following the actor's death at age 56
Julian McMahon's tragic death this week has prompted fans across the globe to reflect on the actor's prolific career - and his dramatic relationship history.