Live data from Hacker News

Cerebras Code

cerebras.ai

91–100 of 185 posts

Re: Cerebras Code

#91
Attn: Cerebras

Any attempt to deal with "" in the code gets it replaced with "".

Both in inference.cerebras.ai chat and API.

Same model on chat.qwen.ai doesn't do it.

Re: Cerebras Code

#92
post #70

Tried this out with Cline using my own API key (Cerebras is also available as a provider for Qwen3 Coder via via openrouter here: https://openrouter.ai/qwen/qwen3-coder ) and realized that without caching, this becomes very expensive very quickly. Specifically, after each new tool call, you're sending the entire previous message history as input tokens - which are priced at $2/1M via the API just like output tokens.…

Adding entire files into the context window and letting the AI sift through it is a very wasteful approach.

It was adopted because trying to generate diffs with AI opens a whole new can of worms, but there's a very efficient approach in between: slice the files on the symbol level.

So if the AI only needs the declaration of foo() and the definition of bar(), the entire file can be collapsed like this:

  class MyClass {
    void foo();
    
    void bar() {
        //code
    }
  }
Any AI-suggested changes are then easy to merge back (renamings are the only notable exception), so it works really fast.

I am currently working on an editor that combines this approach with the ability to step back-and-forth between the edits, and it works really well. I absolutely love the Cerebras platform (they have a free tier directly and pay-as-you-go offering via OpenRouter). It can get very annoying refactorings done in one or two seconds based on single-sentence prompts, and it usually costs about half a cent per refactoring in tokens. Also great for things like applying known algorithms to spread out data structures, where including all files would kill the context window, but pulling individual types works just fine with a fraction of tokens.

If you don't mind the shameless plug, there's a more explanation how it works here: https://sysprogs.com/CodeVROOM/documentation/concepts/symbol...

Re: Cerebras Code

#93

For those that have tried this, what kind of time-to-first-token latency are you seeing?

I had 9 seconds, earlier with Cline. That said, resulting output file I had requested generation of was over 122KB in 58.690 seconds, so I was approaching 2KB per second even factoring in high TTFT.

Re: Cerebras Code

#95
Some users who signed up for pro ($50 p.m.) are reporting further limitations than those advertised.

>While they advertise a 1,000-request limit, the actual daily constraint is a 7.5 million-token limit. [1]

Assumes an average of 7.5k/request whereas in their marketing videos they show API requests ballooning by ~24k per request. Still lower than the API price.

[1] https://old.reddit.com/r/LocalLLaMA/comments/1mfeazc/cerebra...

Re: Cerebras Code

#96
post #92
post #70

Tried this out with Cline using my own API key (Cerebras is also available as a provider for Qwen3 Coder via via openrouter here: https://openrouter.ai/qwen/qwen3-coder ) and realized that without caching, this becomes very expensive very quickly. Specifically, after each new tool call, you're sending the entire previous message history as input tokens - which are priced at $2/1M via the API just like output tokens.…

Adding entire files into the context window and letting the AI sift through it is a very wasteful approach. It was adopted because trying to generate diffs with AI opens a whole new can of worms, but there's a very efficient approach in between: slice the files on the symbol level. So if the AI only needs the declaration of foo() and the definition of bar(), the entire file can be collapsed like this: class MyClass {…

this works if your code is exceptionally well composed. anything less can lead to looney tunes levels of goofiness in behavior, especially if there’s as little as one or two lines of crucial context elsewhere in the file.

This approach saves tokens theoretically, but i find it can lead to wastefulness as it tries to figure out why things aren’t working when loading the full file would have solved the problem in a single step.

Re: Cerebras Code

#97

> running at speeds of up to 2,000 tokens per second, with a 131k-token context window, no proprietary IDE lock-in, and no weekly limits! I was excited, then I read this: > Send up to 1,000 messages per day—enough for 3–4 hours of uninterrupted vibe coding. I don't mind paying for services I use. But it's hard to take this seriously when the first paragraph claim is contradicting the fine prints.

Pretty sure this is there to prevent this[1] from happening to them [1] https://www.viberank.app/

Oh my god. That's insane.

The anti-AI people would be pulling their pitchforks out against these people.

Would there be any way of compiling this without people's consent? Looking at GitHub public repos, etc.?

I imagine a future where we're all automatically profiled like this. Kind of like perverse employee tracking software.

Re: Cerebras Code

#99

> running at speeds of up to 2,000 tokens per second, with a 131k-token context window, no proprietary IDE lock-in, and no weekly limits! I was excited, then I read this: > Send up to 1,000 messages per day—enough for 3–4 hours of uninterrupted vibe coding. I don't mind paying for services I use. But it's hard to take this seriously when the first paragraph claim is contradicting the fine prints.

It’s a true statement - no weekly limits, just a daily limit. Easier to work with when you can only get locked out of your tool for 23h59m

The weekly limit is the daily limit x 7.

Re: Cerebras Code

#100
post #92

Earlier quoted context omitted.

Adding entire files into the context window and letting the AI sift through it is a very wasteful approach. It was adopted because trying to generate diffs with AI opens a whole new can of worms, but there's a very efficient approach in between: slice the files on the symbol level. So if the AI only needs the declaration of foo() and the definition of bar(), the entire file can be collapsed like this: class MyClass {…

this works if your code is exceptionally well composed. anything less can lead to looney tunes levels of goofiness in behavior, especially if there’s as little as one or two lines of crucial context elsewhere in the file. This approach saves tokens theoretically, but i find it can lead to wastefulness as it tries to figure out why things aren’t working when loading the full file would have solved the problem in a sin…

It greatly depends on the type of work you are trying to delegate to the AI. If you ask it to add one entire feature at a time, file level could work better. But the time and costs go up very fast, and it's harder to review.

What works for me (adding features to huge interconnected projects), is think what classes, algorithms and interfaces I want to add, and then give very brief prompts like "split class into abstract base + child like this" and "add another child supporting x,y and z".

So, I still make all the key decisions myself, but I get to skip typing the most annoying and repetitive parts. Also, the code don't look much different from what I could have written by hand, just gets done about 5x faster.

Post reply on HN