9 ms·
Launch HN: Morph (YC S23) – Apply AI code edits at 4,500 tokens/sec
Hey HN, I’m Tejas at Morph. We’ve built a blazing-fast model for applying AI-generated code edits directly into your files at 4,500+ tokens/sec. No more slow full-file rewrites or brittle search-and-replace hacks.
Here's a demo video: https://www.youtube.com/watch?v=LdT8epGHJPk https://www.youtube.com/watch?v=LdT8epGHJPk.
Why? AI spits out code that can’t reliably be inserted into existing code. Full file rewrites, brittle search-and-replace hacks are too slow, expensive, or error-prone.
Morph's approach:
- Your agent outputs edits “lazily”, referencing unmodified lines in the existing file (ex: // ...existing code...)
- Morph instantly applies these edits to a file using our Fast Apply model + speculative decoding against the original file, making AI patches fast, reliable, and production-ready.
This approach was pioneered by Cursor last year, but their models aren’t available as APIs—so we built Morph for developers everywhere (with a large free tier!)
Live demo (no signup): https://morphllm.com/dashboard https://morphllm.com/dashboard and docs: https://docs.morphllm.com/quickstart https://docs.morphllm.com/quickstart
We have 2 Fast Apply models: morph-v3-fast - 4500+ tok/sec, and morph-v3-large - 2500+ tok/sec. These models power Fast Apply at create.xyz, databutton, continue.dev, and more!
We also provide retrieval models for embedding + reranking.
Next Up: Inline Edit Model (Cmd-K): Extremely fast inline edits - keep dev flow state; and Morph Tab API: Our Next Edit Prediction model guesses your next code edit + action with sub-500ms latency. It's currently in private beta, but you can request early access here: https://morphllm.com/tab https://morphllm.com/tab
Hot takes:
1) Raw inference speed matters more than incremental accuracy gains for dev UX—agree or disagree?
2) Full-file rewrites by frontier models are legacy—Fast Apply edits win on speed, cost, reliability.
3) As benchmarks on narrow tasks saturate to 99%+, complexity is shifting from single frontier models to specialized inference-optimized models. As frontier models move upmarket, they'll leave simple tasks behind, and they'll be used to do tasks only frontier models can do
We’d love to hear your ideas and experiences with coding agents!
- handfuloflight 1y agoIs there anyway to bring this into Claude Code?
- bhaktatejas922 1y agoThere might be a way to using their new hooks commands, but out of the box, not yet. email us if you want to make it happen! https://docs.anthropic.com/en/docs/claude-code/hooks https://docs.anthropic.com/en/docs/claude-code/hooks
- booli 1y agoIf this proves the way forward, it will be in Claude Code soon enough natively
- koakuma-chan 1y agoThere is already https://www.relace.ai/ https://www.relace.ai/, albeit not as blazing fast at mere 4300 tok/s
- bhaktatejas922 1y agoPerhaps. Boris from the Claude Code team shares a bit about their view here https://www.youtube.com/watch?v=Yf_1w00qIKc https://www.youtube.com/watch?v=Yf_1w00qIKc My read is that despite Claude moving upmarket in what it can do, they are keen on clinging to all the (token heavy) tasks they're leaving behind
- halfjoking 1y agoMake an MCP server, and turn off the Write|Edit|MultiEdit tools? Actually - that's what this company should do. It should be an MCP server so anyone could plug it into any agent with a url and an API key.
- bhaktatejas922 1y agogreat idea! we'll have one up soon :)
- SatvikBeri 1y agoCan you set up a mailing list or something where we can keep up with updates? I'm interested in trying this as soon as it works with Claude Code. Edit: I'd be particularly interested if there's a way to run a sort of comparison mode for a while, so I can get a sense of how much accuracy I'm losing, if any. Even at the cost of initial performance.
- saltserv 1y ago[dead]
- amelius 1y agoCan't you ask these LLMs to simply output a patch file? https://man7.org/linux/man-pages/man1/patch.1.html https://man7.org/linux/man-pages/man1/patch.1.html
- bhaktatejas922 1y agoyou can - but they dont work reliably in practice. Common issues include search match fails, missing commas in replaced items (model doesnt have surround context while replacing), and a few other error cases. This issues are much worse for scattered edits across a file from real world queries (ex: make this page look nicer). Patches tend to work fine for single line or extremely focused edits though - Cursor uses s&r/patches for single line edits: https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools/blob/main/Cursor%20Prompts/Agent%20Prompt%20v1.2.txt https://github.com/x1xhlol/system-prompts-and-models-of-ai-t...
- treyd 1y agoI wonder if it'd be feasible to have a much smaller model that could go in and correct these meshing issues that require simpler reasoning?
- bhaktatejas922 1y agohm maybe but correction/issue detection is a much harder task for models. If you pipe back the errors in it could work, but personally still see Fast Apply as the better approach
- deepdarkforest 1y ago> 1) Raw inference speed matters more than incremental accuracy gains for dev UX—agree or disagree? I know you are trying to generate some controversy/visibility, but i think if we are being transparent here, you know this is wrong. People prefer using larger (or reasoning) models, with much bigger diff in tok/sec just for quality in coding, it comes first. Even if i have a big edit to apply, like 5k tokens, 200-300ms of difference in edit time are nothing. Edit speed is definitely not a bottleneck for dev UX, quality is. A dev who wants to save 200ms every code change over quality is someone who well, i cannot relate. If im using 1-2 agents in parallel, most of the time the edits are already applied while im reviewing code from the other agents. But again maybe that's just me. Speaking of quality, how do you measure it? Do you have any benchmarks? How big is the difference in error rate between the fast and large model?
- k__ 1y agoI have to admit, that using slow models is unbearable when I used fast one before. I don't know if the quality and speed are linearly related, though.
- AirMax98 1y agoSeriously agree — try using something like Sonnet 3.7 and then switching to Gemini 2.5 Pro. The code that both output is fine enough — especially given that I mostly use LLMs as a fancy autocomplete. Generally a better prompt is going to get me closer to what I want than a more robust model. The speed hit with Gemini 2.5 Pro is just too substantial for me to use it as a daily driver. I imagine the speed difference might not matter so much if you are performing seismic updates across a codebase though.
- bhaktatejas922 1y agoyeah speed and flow state are for sure linked. People love to say Cursor is a Claude wrapper but they miss the reality that Cursor is a fast apply wrapper. Intensely sticky user experience
- 1y ago
- rs186 1y agoSounds interesting, but I imagine all the big players (Cursor, Windsurf, and maybe even OpenAI/Anthropic) will achieve something similar very quickly in their tools first-party, which will decimate the company. And I don't get the API part of this -- at the end of the day people use those IDEs, and I don't see developers/companies want to send their code to yet another endpoint.
- bhaktatejas922 1y agoPerhaps - Cursor does this in house. I see the coding agent space being large as we shift into a market of on-demand software. Sending code externally is meh especially for companies with tight security rules. We do self-hosting for them in their infra
- kruxigt 1y ago[dead]
- Qerbz 1y agoHeard some insane rumors of the efficacy increase of this in action even though I don't know how you do it
- bhaktatejas922 1y agothe rumors are true! learn how we do it by joining the team :)
- bigyabai 1y agoThat's an interesting first comment to post from a 5-month old account.
- zackangelo 1y agoFor anyone more curious about how this works, Fireworks wrote a blog post about it last year (I think): https://fireworks.ai/blog/cursor https://fireworks.ai/blog/cursor
- bhaktatejas922 1y agoyep - great post!
- simonw 1y agoThis uses an OpenAI-compatible endpoint, so got this working with my https://llm.datasette.io/ https://llm.datasette.io/ CLI tool. First I added their models to my ~/Library/Application Support/io.datasette.llm/extra-openai-models.yaml file: - model_id: morph-auto model_name: auto api_base: https://api.morphllm.com/v1 api_key_name: morph Then I added the API key like this: llm keys set morph # Paste in API key from https://morphllm.com/api-keys Then I saved an LLM template with their prompting pattern: llm -m morph-auto '<code>$code</code><update>$update</update>' --save morph Now I can run operations like this: llm -t morph -p code "$(cat orig.txt)" -p update "$(cat update.txt)" The -t option is the template I named when I ran --save. The -p name value options then set the content for the template $code and $update variables. Example transcript here: https://gist.github.com/simonw/de67818603d448a3fee788ace29765fe#response https://gist.github.com/simonw/de67818603d448a3fee788ace2976... One thing that worries me: since it's using XML-style tags <code> and <update>, if my own source code contains those tags I expect it may get confused.
- deleted 1y ago[deleted]
- bhaktatejas922 1y agoWow that was fast - this is awesome. it shouldnt be a problem unless your code has both <code> and <update> internally. 1 or the other should be fine
- nailer 1y ago[flagged]
- seanw265 1y agoLast time I looked into Morph, I noticed you weren’t yet on OpenRouter. I see that’s changed, but it looks like only an older model is listed. Any plans to be more active there? Also, are there any benchmarks comparing your fast apply models to others like Relace or even Llama via Cerebras? I’m particularly interested in output accuracy.
- bhaktatejas922 1y agothe v2 model listed currently points to morph-v3-large. We're working with them to get v3-large and v3-fast listed
- bhaktatejas922 1y agothe power of hacker news! New models are listed there now
- bijection 1y agoHow does this compare to relace, which I believe is also a YC company? They seem to have very similar functionality [0] [0] https://www.relace.ai/ https://www.relace.ai/
- Workaccount2 1y agoJust for clarification here because I am a bit confused, Morph is a tool for integrating the output of other LLMs and not an LLM itself? It doesn't generate 4500 tok/sec, it can edit 4500 tok/sec?
- bhaktatejas922 1y agoCorrect, but morph is a LLM as well. In practice its basically Big LLM using small LLM as a tool call
- Workaccount2 1y agoI see. How is this not going to get run over immediately by big players? Google's diffusion model is already in the wings, and it's both wicked fast and ~flash-lite intelligent.
- bhaktatejas922 1y agoyou could make the argument about any startup really. To me its the same reason they don't build the foundational model for legal, for sales, etc.. - everything comes at a cost. Allocating researcher time to this is attention not spent on the general frontier model - losing 1-2% there is the difference of billions of dollars for them
- nailer 1y agoGoogle's a great tech organization but they generally don't create dominant tech products like they used to back in the Maps / Mail days (this is nearly two decades ago). Google wrote AKYNIA. OpenAI wrote ChatGPT.
- bhaktatejas922 1y agofactual
- conartist6 1y agoConventional tools are also a threat. Nothing about this problem is AI-specific.
- eabeezxjc 1y agowhy not ruby? because ruby no need corecting. It works.
- nico 1y agoWould be awesome to have a browser extension that could create a bridge between ChatGPT and VSCode, applying Morph in between (or Claude instead of ChatGPT). Essentially use the web interface, instead of the APIs for agentic coding
- bhaktatejas922 1y agoI think an MCP would do the job. We're shipping one out as we speak
- sidgarimella 1y ago+1 hyped for an mcp that I might be able to plug zed into
- bhaktatejas922 1y agomcp is out! https://morphllm.com/mcp https://morphllm.com/mcp
- elzbardico 1y ago1) Raw inference speed matters more than incremental accuracy gains for dev UX—agree or disagree? Yeah, I love reviewing and debugging thousands of lines of buggy and dirty AI generated code. Who cannot love it?
- bhaktatejas922 1y agokey word incremental - for fast apply to be useful it should be so fast and accurate that most people don't realize there's a model there at all
- callamdelaney 1y agoYeah sounds like exactly what we need
- laborcontract 1y agoReally like this. I've been trying microsoft's copilot and it's so clunky, particularly when applying edits. One would assume they have the resources to train the model.. Request: please provide a system prompt in the docs to help the llm generate the diff format that performs best w/ your models. LLMs frequently change the way they present diffs on upgrades and I don't want to be guessing which format is best. EDIT: Please clarify your privacy policy. If my interpretation is correct, paying users will have their data retained and trained on? Is there any way to pay to use the service (w/o picking up the phone) and not have my data trained on? 4.1 Use of Service Data Depending on your subscription tier: Free Tier: We may use your submitted code data to train our models, improve our Services, and develop new features. Engineer Tier: We may use your submitted code data to train our models, improve our Services, and develop new features, subject to the confidentiality provisions in your service agreement. Enterprise Tier: We do not use your submitted code data for any purpose other than processing your immediate request. Your code data is never used for model training or service improvement. [0] https://morphllm.com/privacy https://morphllm.com/privacy
- bhaktatejas922 1y agodone! Yeah we have ZDR options as well, just email us to enable it info@morphllm.com Morph via OpenRouter is always zero data retention
- laborcontract 1y agoGood to know. Thanks a lot!
- fastball 1y agoThis whole "don't train on my data" thing is so silly. Do you know how these models were created? By training them on code. Very selfish / tragedy of the commons for you to want to use tools that were trained on the code of others but not your own. That is how these models get better.
- laborcontract 1y ago
- lastdong 1y agoIs this similar to Gemini Diffusion? Thanks
- bhaktatejas922 1y agoNo, we use autoregressive llms. Diffusion models would be super interesting here. Mercury is doing some interesting work with diffusion in code gen but still too early to tell if it'll get good enough for production usage
- kaycey2022 1y ago[flagged]
- deleted 1y ago[deleted]
- scottpersinger 1y agoI’d just like to put a pitch in here for someone to do “smart rebase+merge” with AI. Now THAT would really speed up development, if my AI was intelligently merging code from different users in the background, based on understanding the intent behind each conflicting change.
- bhaktatejas922 1y agohow often do you run into merge conflicts?
- weird-eye-issue 1y agoYou can do that with Claude Code. Just tell it to merge in another branch and fix the merge conflicts.
- bbe327 1y agoI didn’t know that. Thank you for the info. It’s been annoying. Will hail Claude Code. Hoorays
- FridgeSeal 1y ago> Raw inference speed matters more than incremental accuracy gains for dev UX Now I can be wrong, faster!
- z3ugma 1y agoHow do I start using this on a codebase on my local computer? I'm quite confused by the quickstart. Do I use a VSCode extension? One of the Claude Code like clones but with this as a custom model?
- fcpguru 1y agosame question! +1
- joshmlewis 1y agoThis is more of a model that VSCode would integrate, not something for end users to use.
- bhaktatejas922 1y agoif you make an account, we'll email you when we have something easier to try!
- michaelneale 1y agoHave been using morph for a while (I am one of the authors of goose) and was surprised when introduced at the boost it gave me (much less iteration with the main expensive LLM, and I can even make the editing process simpler to take a load off the agent). Used it with claude 3.5, 3.7, 4 and currently with a o3/openai and anthropic/claude4 + morphllm combo today.
- bhaktatejas922 1y agoyeah its such a better experience! - it was really the difference maker between the cursor experience and everything else previously
- orge 1y agoIt would be great to have an integration with Aider or OpenCode.
- bhaktatejas922 1y agoworking on it
- golergka 1y agoI don't think this makes any sense as a standalone product, but I wish I had it in my claude code and aider as an intermediate step right away. The latter tool, while less popular, already supports _exactly_ this workflow in the architect mode — a good candidate to be your first integration, I think.
- shifald 1y agoNice! Will give it a try. Congrats on the launch
- bhaktatejas922 1y agothanks, let us know how it goes
- joshmlewis 1y agoI'm going to test implementing this for my project https://promptslice.com https://promptslice.com and see how it does with text based edits. I assume it will do ok. I'm also really curious about the XML tool calls in the documentation. I have not heard of this being the norm for tools like Cursor. Is that still the case? I feel like I'm pretty in the know about this stuff but must have missed that trend.
- bhaktatejas922 1y agoIts true - Cursor, Cline, and many others still use xml for tool calls. In JSON, the model needs to "focus" on escaping characters correctly while also sampling from a reduced token distribution. https://aider.chat/2024/08/14/code-in-json.html https://aider.chat/2024/08/14/code-in-json.html
- weird-eye-issue 1y agoSeems completely broken. I used the provided HTML example on https://morphllm.com/dashboard/playground/apply https://morphllm.com/dashboard/playground/apply. Without editing anything at all, I pressed apply. Your model added a bunch of CSS even though that wasn't in the update instructions at all. It also added a contact section, which again, wasn't in the update instructions that your demo provided.
- bhaktatejas922 1y agonice catch. the html example was using a hardcoded snippet we forgot to uncomment. fixed
- weird-eye-issue 1y agoThanks I will give it another try because our use case is HTML/Markdown documents, not code, and this could be interesting. I'm just hesitant to trust an LLM to do replacements and your broken example really didn't help with my confidence. Even a 1% error rate wouldn't be worth it because if find/replace doesn't work you know it doesn't work and can feed that error back into the agent to fix it (like how Claude Code recovers from its editing errors) edit: The example is still broken. I've inspected the network request and it's definitely your backend that is broken not something being hardcoded... The CSS is not present in the request at all, but in the response it's being inserted.
- bhaktatejas922 1y agotook a closer look, the update snippet provided is referencing css thats not defined. this is sort of a overreach example of the "semantic" nature of the edits - ie, if an update explicitly contains syntax, or minor reference errors, the apply model corrects them. you can argue that this is an overstep in this example - but at the same time its not something claude/gemini would suggest
- weird-eye-issue 1y ago
- Bluestein 1y ago"Let's be wrong faster! It's a feature, we swear!"
- bhaktatejas922 1y agoor lets be right faster
- Bluestein 1y agoYes. Or, no. Who knows.-
- bhaktatejas922 1y agoThe shoggoth knows
- charcircuit 1y agoIt's better than being right slower than I can manually make the change.
- deleted 1y ago[deleted]
- w10-1 1y ago(warning: outside, naive perspective) > 1) Raw inference speed matters [most] for dev UX—agree or disagree? Or maybe incremental content-assist and full-file problem-solving are two significantly different uses, though they're both dev UX use cases. Because they're confusingly similar, comparing them (and denigrate full-file solutions) wastes time/energy. You muddy your own message. Just concentrate on showing the value of what you do where and when. To wit... In the inference case, you're really using context to provide affordances -- next steps. In the full-file case, you're starting instead from a goal statement, with context providing constraints. I think where you want to go is to show when the tool anticipates where you *should* go; i.e., the extent to which it can lead junior developers to the next step, and senior developers to the next constraint/issue they're ignoring. I believe just as "attention is all you need" surprised people, this kind of bottom-up approach has more legs than people expect. I understand the naked probability model is trained on world code corpus; what would interest me is whether you can also create a model that learns the developer's biases. Then the work is to see the issues in the context, but address them in the order and manner that the developer would. Lock-in would occur because, well, the system understands me. And it would be particularly nice when Programmer A wants to code like Programmer B. If your assistant has a model of Programmer B, the assistant could guide Programmer A in that direction.
- bhaktatejas922 1y ago"Creating models that learn developer biases" has a great ring to it - maybe we should make that our mission statement. Thats exactly what we're doing with our models. The Next-Edit completion model especially resonates with this now if you meant one step further and meaning the literal single developer, that's probably best serve in context - albiet with a model that's learned developer biases
- boleary-gl 1y agoKilo Code team member here Would love to chat about integrating the models into Kilo Code if you’re interested You can contact me at brendan [at] kilocode [dot] ai
- b0a04gl 1y ago[dead]
- nimchimpsky 1y ago[dead]
- furyofantares 1y agoDoes Claude Code have a similar apply model? It does create diffs for you to accept/reject but then I feel like it's always using a find/replace tool to apply it rather than a model that rewrites the whole file. I don't know how the speed of this approach compares but the accuracy feels great.
- bhaktatejas922 1y agoClaude Code uses find and replace, errors get piped back to the agent so you rarely feel them unless you hit an infinite error loop
- krishvs 1y agoReally impressive. I'm in the market for such a solution for our internal AI coding systems - how do you compare to the opensource https://huggingface.co/osmosis-ai/Osmosis-Apply-1.7B https://huggingface.co/osmosis-ai/Osmosis-Apply-1.7B? I am assuming your models are not opensource/openweights?
- bhaktatejas922 1y agoYou should give both a try! key difference is our models are faster and more accurate by a large margin
- csomar 1y ago1- I agree that speed is intelligence[+], but you're suggesting we can reduce accuracy, increase speed, and get better results. I don't buy it. 2- I'm confused. Claude Code and a Neovim plugin I used both do edits/diffs. Are you saying they're actually rewriting entire files instead? 3- Aren't "simple tasks" just things you train the model on? If so, are you solving a bunch of simple tasks or offering custom training? > No more slow full-file rewrites or brittle search-and-replace hacks. Here's the thing - LLMs are already blazing fast. I commented the other day that you could probably write Chrome's entire code base in a couple months at average speed. The bottleneck isn't speed, it's accuracy; that's of course my opinion. +: https://omarabid.com/claude-magic https://omarabid.com/claude-magic
- bhaktatejas922 1y agoAccuracy of course comes first - errors of any sort break flow state and are massively disruptive. Claude Code does search and replace. The failure rate of search and replace is rather high (over 11%) but claude can self correct them. Fast Apply is more accurate than search and replace. Full file rewrites for files under 10k tokens can work quite well - like 98%+ but its absurdly expensive and slow. Fast Apply is a much better option that balances speed and accuracy
- csomar 1y agoI'm having trouble getting your platform to work properly. When I tried the examples you provided, I couldn't understand what they were supposed to demonstrate. The code I wrote either breaks or just outputs your sample code instead of working correctly. My usage dashboard shows 0, so I can't tell if the platform is actually functioning. The only thing that seems to work is the payment redirect to Stripe. I think you need to take a step back and contemplate.
- bigtimegangstar 1y agoGotta try this, maybe even a obsidian plugin?
- bhaktatejas922 1y agosay more! We're in the smart composer plugin, but the integration is out of date
- dsp_person 1y ago2. Sometimes watching Claude do inline edits I cringe watching it delete almost the entire file line by line. I think when early in exploring a problem it's best to torch the previous version and fully re-write than to assume incremental.
- bhaktatejas922 1y agoYeah, incremental updates are something models struggle with, which is what we're trying to solve.
- strogonoff 1y agoThe most important question for any new company based around generative ML: how did you source training data, and did you observe the licesning (e.g., never use code under GPL or default copyright conditions)? Very few companies can or are willing to answer that.
- pcwelder 1y agoImpressive demo! Is there any rate limit (TPM)?
- bhaktatejas922 1y agofor companies and startups we raise it considerably. For free tier there's rate limits + a limit of 100 req per month
- Kamshak 1y agoIt's more expensive than Gemini flash which can actually write pretty decent code (not just apply a diff). Fast AI edit application is definitely great but that's pretty expensive Morph v3 fast: Input: $1.20 / M tokens, Output $2.70 / M tokens Gemini 2.5 Flash: $0.30 / M tokens, Output $2.50 / M tokens (Source: OpenRouter)
- bhaktatejas922 1y agoThats for 0 data retention - on the Morph website its: 0.80 /1M token input, $1.20 /1M token output. We have discounts for large volumes/reserved instances as well
- helsinki 1y agoDoesn’t Apple’s new model do the same thing? https://huggingface.co/apple/DiffuCoder-7B-cpGRPO https://huggingface.co/apple/DiffuCoder-7B-cpGRPO
- bhaktatejas922 1y agoThis is a coding model, not a code merge model. What we do is 1 thing, extremely well - merging code edits into original files
- kordlessagain 1y agoThis is what I use and it's free for anyone to use individually: https://github.com/kordless/gnosis-evolve/blob/main/contrib_tools/core/file_diff_editor.py https://github.com/kordless/gnosis-evolve/blob/main/contrib_...
- deleted 1y ago[deleted]
- agrippanux 1y agoHow does this compare to Google Diffusion? Diffusion writes out at seemingly the speed of thought.
- bhaktatejas922 1y agowe're quite a bit faster and specifically training for merging code edits. Google diffusion is a swing at a generalist model. Super cool work nonetheless
- fazkan 1y agoCan someone help me understand the value of this? I've build a vibe-coding product, and the existing model (both claude and openai) work well enough in apply. Its all a function of prompting/context.
- bhaktatejas922 1y agoit really matters when you care deeply about the product experience. The gap between something that works sometimes and something that works great everytime is what separated Cursor from the rest. Try it out: https://morphllm.com/dashboard/playground/apply https://morphllm.com/dashboard/playground/apply