TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Code Llama, a state-of-the-art large language model for coding

970 点作者 marcopicentini超过 1 年前

69 条评论

daemonologist超过 1 年前
Works nearly out of the box with llama.cpp, which makes it easy to try locally: <a href="https:&#x2F;&#x2F;github.com&#x2F;ggerganov&#x2F;llama.cpp&#x2F;issues&#x2F;2766">https:&#x2F;&#x2F;github.com&#x2F;ggerganov&#x2F;llama.cpp&#x2F;issues&#x2F;2766</a><p>Here&#x27;s some output from q4_0 quantization of CodeLlama-7b-Python (first four lines are the prompt):<p><pre><code> # prints the first ten prime numbers def print_primes(): i = 2 num_printed = 0 # end of prompt while num_printed &lt; 10: if is_prime(i): print(i) num_printed += 1 i += 1 def is_prime(n): i = 2 while i * i &lt;= n: if n % i == 0: return False i += 1 return True def main(): print_primes() if __name__ == &#x27;__main__&#x27;: main() </code></pre> It will be interesting to see how the larger models perform, especially after community tuning and with better context&#x2F;prompting.
评论 #37254548 未加载
评论 #37256822 未加载
评论 #37255208 未加载
评论 #37262286 未加载
评论 #37260646 未加载
评论 #37259445 未加载
评论 #37252749 未加载
redox99超过 1 年前
The highlight IMO<p>&gt; The Code Llama models provide stable generations with up to 100,000 tokens of context. All models are trained on sequences of 16,000 tokens and show improvements on inputs with up to 100,000 tokens.<p>Edit: Reading the paper, key retrieval accuracy really deteriorates after 16k tokens, so it remains to be seen how useful the 100k context is.
评论 #37250440 未加载
评论 #37249339 未加载
评论 #37251502 未加载
up6w6超过 1 年前
Even the 7B model of code llama seems to be competitive with Codex, the model behind copilot<p><a href="https:&#x2F;&#x2F;ai.meta.com&#x2F;blog&#x2F;code-llama-large-language-model-coding&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;ai.meta.com&#x2F;blog&#x2F;code-llama-large-language-model-cod...</a>
评论 #37251416 未加载
评论 #37249199 未加载
reacharavindh超过 1 年前
Code llama Python is very interesting. Specifically tuned for Python.<p>I wonder if we could make such specific LLMs (one that is proficient in all things Rust, another- all things Linux, all things genomics, all things physics modeling etc) and have them talk to each other to collaboratively solve problems.<p>That would be a crazy future thing! Putting machines truly to work..
评论 #37249213 未加载
评论 #37249120 未加载
评论 #37250246 未加载
评论 #37249143 未加载
评论 #37253918 未加载
Palmik超过 1 年前
The best model, Unnatural Code Llama, is not released. Likely because it&#x27;s trained on GPT4 based data, and might violate OpenAI TOS, because as per the &quot;Unnatural&quot; paper [1], the &quot;unnatural&quot; data is generated with the help of some LLM -- and you would want to use as good of an LLM as possible.<p>[1] <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;pdf&#x2F;2212.09689.pdf" rel="nofollow noreferrer">https:&#x2F;&#x2F;arxiv.org&#x2F;pdf&#x2F;2212.09689.pdf</a>
评论 #37250808 未加载
syntaxing超过 1 年前
TheBloke doesn’t joke around [1]. I’m guessing we’ll have the quantized ones by the end of the day. I’m super excited to use the 34B Python 4 bit quantized one that should just fit on a 3090.<p>[1] <a href="https:&#x2F;&#x2F;huggingface.co&#x2F;TheBloke&#x2F;CodeLlama-13B-Python-fp16" rel="nofollow noreferrer">https:&#x2F;&#x2F;huggingface.co&#x2F;TheBloke&#x2F;CodeLlama-13B-Python-fp16</a>
评论 #37251578 未加载
评论 #37251410 未加载
评论 #37252332 未加载
评论 #37251256 未加载
评论 #37253428 未加载
jmorgan超过 1 年前
To run Code Llama locally, the 7B parameter quantized version can be downloaded and run with the open-source tool Ollama: <a href="https:&#x2F;&#x2F;github.com&#x2F;jmorganca&#x2F;ollama">https:&#x2F;&#x2F;github.com&#x2F;jmorganca&#x2F;ollama</a><p><pre><code> ollama run codellama &quot;write a python function to add two numbers&quot; </code></pre> More models coming soon (completion, python and more parameter counts)
benvolio超过 1 年前
&gt;The Code Llama models provide stable generations with up to 100,000 tokens of context.<p>Not a bad context window, but makes me wonder how embedded code models would pick that context when dealing with a codebase larger than 100K tokens.<p>And this makes me further wonder if, when coding with such a tool (or at least a knowledge that they’re becoming more widely used and leaned on), are there some new considerations that we should be applying (or at least starting to think about) when programming? Perhaps having more or fewer comments, perhaps more terse and less readable code that would consume fewer tokens, perhaps different file structures, or even more deliberate naming conventions (like Hungarian notation but for code models) to facilitate searching or token pattern matching of some kind. Ultimately, in what ways could (or should) we adapt to make the most of these tools?
评论 #37249694 未加载
评论 #37249730 未加载
评论 #37249979 未加载
评论 #37252895 未加载
评论 #37249482 未加载
评论 #37250966 未加载
评论 #37267590 未加载
评论 #37249781 未加载
评论 #37258691 未加载
lordnacho超过 1 年前
Copilot has been working great for me thus far, but it&#x27;s limited by its interface. It seems like it only knows how to make predictions for the next bit of text.<p>Is anyone working on a code AI that can suggest refactorings?<p>&quot;You should pull these lines into a function, it&#x27;s repetitive&quot;<p>&quot;You should change this structure so it is easier to use&quot;<p>Etc
评论 #37250594 未加载
评论 #37250429 未加载
评论 #37252107 未加载
评论 #37253541 未加载
评论 #37250632 未加载
评论 #37251540 未加载
评论 #37253329 未加载
评论 #37250428 未加载
评论 #37250426 未加载
评论 #37260088 未加载
Draiken超过 1 年前
As a complete noob at actually running these models, what kind of hardware are we talking here? Couldn&#x27;t pick that up from the README.<p>I absolutely love the idea of using one of these models without having to upload my source code to a tech giant.
评论 #37250840 未加载
评论 #37250839 未加载
评论 #37250906 未加载
scriptsmith超过 1 年前
How are people using these local code models? I would much prefer using these in-context in an editor, but most of them seem to be deployed just in an instruction context. There&#x27;s a lot of value to not having to context switch, or have a conversation.<p>I see the GitHub copilot extensions gets a new release one every few days, so is it just that the way they&#x27;re integrated is more complicated so not worth the effort?
评论 #37252065 未加载
评论 #37250313 未加载
评论 #37250191 未加载
mymac超过 1 年前
Never before in the history of mankind was a group so absolutely besotted with the idea of putting themselves out of a job.
评论 #37250383 未加载
评论 #37253671 未加载
评论 #37251790 未加载
评论 #37255325 未加载
评论 #37252523 未加载
评论 #37252661 未加载
评论 #37251095 未加载
评论 #37255636 未加载
评论 #37258084 未加载
评论 #37252999 未加载
评论 #37259856 未加载
modeless超过 1 年前
Interesting that there&#x27;s a 34B model. That was missing from the original Llama 2 release. I wonder if it&#x27;s still usable for general non-code chat tasks or if the code fine tuning destroyed that. It should be the best model that would still fit on 24GB gaming GPUs with quantization, because 70B doesn&#x27;t fit.
评论 #37249293 未加载
评论 #37250379 未加载
评论 #37250113 未加载
ilaksh超过 1 年前
Between this, ideogram.ai (image generator which can spell, from former Google Imagen team member and others), and ChatGPT fine-tuning, this has been a truly epic week.<p>I would argue that many teams will have to reevaluate their LLM strategy _again_ for the second time in a week.
评论 #37258106 未加载
评论 #37253642 未加载
WhitneyLand超过 1 年前
How much am I’m missing out on with tools like this or code pilot, compared to using GPT-4?<p>I guess since Xcode doesn’t have a good plug-in architecture for this I began experimenting more with a chat interface.<p>So far gpt-4 has seemed quite useful for generating code, reviewing code for certain problems, etc.
评论 #37256076 未加载
1024core超过 1 年前
If GPT-4&#x27;s accuracy is 67% and this is 54%, how can these guys claim to be SOTA?
评论 #37255896 未加载
评论 #37255327 未加载
gorbypark超过 1 年前
I can&#x27;t wait for some models fine tuned on other languages. I&#x27;m not a Python developer, so I downloaded the 13B-instruct variant (4 bit quantized Q4_K_M) and it&#x27;s pretty bad at doing javascript. I asked it to write me a basic React Native component that has a name prop and displays that name. Once it returned a regular React component, and when I asked it to make sure it uses React Native components, it said sure and outputted a bunch of random CSS and an HTML file that was initializing a React project.<p>It might be the quantization or my lacklustre prompting skills affecting it, though. To be fair I did get it to output a little bit of useful code after trying a few times.
TheRealClay超过 1 年前
Anyone know of a docker image that provides an HTTP API interface to Llama? I&#x27;m looking for a super simple sort of &#x27;drop-in&#x27; solution like that which I can add to my web stack, to enable LLM in my web app.
评论 #37257048 未加载
KaiserPro超过 1 年前
This is great for asking questions like &quot;how do I do x with y&quot; and this code &lt;&lt;some code&gt;&gt; isn&#x27;t working, whats wrong? Much faster that googling, or a great basis for forming a more accurate google search.<p>Where its a bit shit is when its used to provide auto suggest. It hallucinates plausible sounding functions&#x2F;names, which for me personally are hard to stop if they are wrong (I suspect that&#x27;s a function of the plugin)
评论 #37258213 未加载
natch超过 1 年前
Why wouldn’t they provide a hosted version? Seems like a no brainer… they have the money, the hardware, the bandwidth, the people to build support for it, and they could design the experience and gather more learning data about usage in the initial stages, while putting a dent in ChatGPT commercial prospects, and all while still letting others host and use it elsewhere. I don’t get it. Maybe it was just the fastest option?
评论 #37250583 未加载
jasfi超过 1 年前
Now we need code quality benchmarks comparing this against GPT-4 and other contenders.
评论 #37251361 未加载
ilaksh超过 1 年前
<a href="https:&#x2F;&#x2F;github.com&#x2F;facebookresearch&#x2F;codellama">https:&#x2F;&#x2F;github.com&#x2F;facebookresearch&#x2F;codellama</a>
评论 #37249439 未加载
评论 #37249437 未加载
andrewjl超过 1 年前
What I found interesting in Meta&#x27;s paper is the mention of HumanEval[1] and MBPP[2] as benchmarks for code quality. (Admittedly maybe they&#x27;re well-known to those working in the field.)<p>I haven&#x27;t yet read the whole paper (nor have I looked at the benchmark docs which might very well cover this) but curious how these are designed to avoid issues with overfitting. My thinking here is that canned algorithm type problems common in software engineering interviews are probably over represented in the training data used for these models. Which might point to artificially better performance by LLMs versus their performance on more domain-specific type tasks they might be used for in day-to-day work.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;openai&#x2F;human-eval">https:&#x2F;&#x2F;github.com&#x2F;openai&#x2F;human-eval</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;google-research&#x2F;google-research&#x2F;tree&#x2F;master&#x2F;mbpp">https:&#x2F;&#x2F;github.com&#x2F;google-research&#x2F;google-research&#x2F;tree&#x2F;mast...</a>
msoad超过 1 年前
Is there any place we can try those models? Are they available on HuggingFace?
评论 #37249155 未加载
dangerwill超过 1 年前
It&#x27;s really sad how everyone here is fawning over tech that will destroy you own livelihoods. &quot;AI won&#x27;t take your job, those who use AI will&quot; is purely short term, myopic thinking. These tools are not aimed to help workers, the end goal is to make it so you don&#x27;t need to be an engineer to build software, just let the project manager or director describe the system they want and boom there it is.<p>You can scream that this is progress all you want, and I&#x27;ll grant you that these tools will greatly speed up the generation of code. But more code won&#x27;t make any of these businesses provide better services to people, lower their prices, or pay workers more. They are just a means to keep money from flowing out of the hands of the C-Suite and investor classes.<p>If software engineering becomes a solved problem then fine, we probably shouldn&#x27;t continue to get paid huge salaries to write it anymore, but please stop acting like this is a better future for any of us normal folks.
评论 #37250986 未加载
评论 #37250830 未加载
评论 #37250166 未加载
评论 #37253549 未加载
评论 #37252222 未加载
评论 #37250627 未加载
评论 #37250890 未加载
评论 #37250320 未加载
MuffinFlavored超过 1 年前
Can I feed this entire GitHub projects (of reasonable size) and get non-hallucinated up-to-date API refactoring recommendations?
e12e超过 1 年前
Curious if there are projects to enable working with these things self-hosted, tuned to a git repo as context on the cli, like a Unix filter - or with editors like vim? (I&#x27;d love to use this with Helix)<p>I see both vscode and netbeans have a concept of &quot;inference URL&quot; - are there any efforts like language server (lsp) - but for inference?
评论 #37254273 未加载
评论 #37254018 未加载
pmarreck超过 1 年前
I want &quot;safety&quot; to be opt-in due to the inaccuracy it introduces. I don&#x27;t want to pay that tax just because someone is afraid I can ask it how to make a bomb when I can just Google that and get pretty close to the same answer already, and I certainly don&#x27;t care about being offended by its answers.
robertnishihara超过 1 年前
If you want to try out Code Llama, you can query it on Anyscale Endpoints (this is an LLM inference API we&#x27;re working on here at Anyscale).<p><a href="https:&#x2F;&#x2F;app.endpoints.anyscale.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;app.endpoints.anyscale.com&#x2F;</a>
brucethemoose2超过 1 年前
Here is the paper:<p><a href="https:&#x2F;&#x2F;ai.meta.com&#x2F;research&#x2F;publications&#x2F;code-llama-open-foundation-models-for-code&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;ai.meta.com&#x2F;research&#x2F;publications&#x2F;code-llama-open-fo...</a>
naillo超过 1 年前
Feels like we&#x27;re like a year away from local LLMs that can debug code reliably (via being hooked into console error output as well) which will be quite the exciting day.
评论 #37249507 未加载
评论 #37249423 未加载
评论 #37256162 未加载
braindead_in超过 1 年前
The 34b Python model is quite close to GPT4 on HumanEval pass@1. Small specialised models are catching up to GPT4 slowly. Why not train a 70b model though?
awwaiid超过 1 年前
I want to see (more) code models trained on git diffs
pelorat超过 1 年前
To bad most models focus on Python, it&#x27;s not a popular language here in Europe (for anything).
评论 #37276654 未加载
bick_nyers超过 1 年前
Anyone know of a good plugin for the JetBrains IDE ecosystem (namely, PyCharm) that is CoPilot but with a local LLM?
评论 #37260737 未加载
dchuk超过 1 年前
Given this can produce code when prompted, could it also be used to interpret html from a crawler and then be used to scrape arbitrary URLs and extract structured attributes? Basically like MarkupLM but with massively more token context?
评论 #37257387 未加载
1024core超过 1 年前
&gt; Python, C++, Java, PHP, Typescript (Javascript), C#, and Bash<p>What?!? No Befunge[0], Brainfuck or Perl?!?<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Befunge" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Befunge</a><p>&#x2F;just kidding, of course!
jtwaleson超过 1 年前
This is probably a stupid question, but would it be possible to use these models to rate existing code and point to possible problems, rather than generating new code? That would be extremely useful to some use cases I&#x27;m working on.
akulbe超过 1 年前
Random tangential question given this is about llama, but how do you get llama.cpp or kobold (or whatever tool you use) to make use of multiple GPUs if you don&#x27;t have NVlink in place?<p>I got a bridge, but it was the wrong size.<p>Thanks, in advance.
dontupvoteme超过 1 年前
Did people *<i>really*</i> think only artists would be losing their jobs to AI?
gdcbe超过 1 年前
Is there somewhere docs to show you how to run this on your local machine and can you make it port it a script between languages? Gpt4 can do that pretty well but its context is too small for advanced purposes.
ai_g0rl超过 1 年前
this is cool, <a href="https:&#x2F;&#x2F;labs.perplexity.ai&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;labs.perplexity.ai&#x2F;</a> has been my favorite way to play w these models so far
RobKohr超过 1 年前
Now it just needs a vscode plugin to replace copilot.
rafaelero超过 1 年前
Those charts remind me just how insanely good GPT-4 is. It&#x27;s almost 5 months since its release and I am still at awe with its capabilities. The way it helps with coding is just crazy.
mdaniel超过 1 年前
it looks like <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37248844">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37248844</a> has gotten the traction at 295 points
评论 #37252469 未加载
WaitWaitWha超过 1 年前
Can someone point me to a ELI5 sequence of steps that shows how someone can install and use LLMs locally and in some way, functionally?<p>Asking for purposes of educating non-technologists.
评论 #37251534 未加载
eurekin超过 1 年前
theBloke cannot rest :)
评论 #37250465 未加载
评论 #37249301 未加载
m00nsome超过 1 年前
Why do they not release the unnatural Variant of the model? According to the paper it beats all of the other variants and seems to be close to GPT-4.
KingOfCoders超过 1 年前
Any performance tests? (e.G. tokens&#x2F;s on a 4090?)
born-jre超过 1 年前
34B is grouped query attention, right? Does that make it the smallest model with grouped attention?<p>I can see some people fine-tuning it again for general propose instruct.
bryanlyon超过 1 年前
Llama is a very cool language model, it being used for coding was all but inevitable. I especially love it being released open for everyone.<p>I do wonder about how much use it&#x27;ll get, seeing as running a heavy language model on local hardware is kinda unlikely for most developers. Not everyone is runnning a system powerful enough to equip big AIs like this. I also doubt that companies are going to set up large AIs for their devs. It&#x27;s just a weird positioning.
评论 #37253275 未加载
评论 #37250877 未加载
评论 #37250889 未加载
bracketslash超过 1 年前
So uhh…how does one go about using it?
the-alchemist超过 1 年前
Anyone know if it supports Clojure?
maccam912超过 1 年前
It appears we do have a 34B version now, which never appeared for non fine tuned llama 2.
评论 #37249146 未加载
评论 #37276682 未加载
marcopicentini超过 1 年前
It&#x27;s just a matter of time that Microsoft will integrate it into VSCode.
binary132超过 1 年前
I wonder whether org-ai-mode could easily support this.
jerrygoyal超过 1 年前
what is the cutoff knowledge of it? Also, what is the cheapest way to use it if I&#x27;m building a commercial tool on top of it?
waitingkuo超过 1 年前
Looks like that we need to request the access first
评论 #37249712 未加载
评论 #37276694 未加载
mercurialsolo超过 1 年前
Is there a version of this on replicate yet?
Dowwie超过 1 年前
What did the fine tuning process consist of?
gw67超过 1 年前
In your opinion, Why Meta does this?
评论 #37250453 未加载
praveenhm超过 1 年前
which is the best model for coding right now, GPT4&#x2F;copilot&#x2F;phind ?
nothrowaways超过 1 年前
Kudos to the team at FB.
likenesstheft超过 1 年前
no more work soon?
评论 #37252500 未加载
jrh3超过 1 年前
lol... Python for Dummies (TM)
Someone1234超过 1 年前
Business opportunity: I&#x27;d pay money for NICE desktop software that can run all these different models (non-subscription, &quot;2-year updates included, then discount pricing&quot; modal perhaps). My wishlist:<p>- Easy plug &amp; play model installation, and trivial to change which model once installed.<p>- Runs a local web server, so I can interact with it via any browser<p>- Ability to feed a model a document or multiple documents and be able to ask questions about them (or build a database of some kind?).<p>- Absolute privacy guarantees. Nothing goes off-machine from my prompt&#x2F;responses (USP over existing cloud&#x2F;online ones). Routine license&#x2F;update checks are fine though.<p>I&#x27;m not trying to throw shade at the existing ways to running LLMs locally, just saying there may be room for an OPTIONAL commercial piece of software in this space. Most of them are designed for academics to do academic things. I am talking about a turn-key piece of software for everyone else that can give you an &quot;almost&quot; ChatGPT or &quot;almost&quot; CoPilot-like experience for a one time fee that you can feed sensitive private information to.
评论 #37253852 未加载
评论 #37254497 未加载
评论 #37254504 未加载
评论 #37254261 未加载
评论 #37253920 未加载
评论 #37254160 未加载
评论 #37253898 未加载
评论 #37256145 未加载
评论 #37255756 未加载
评论 #37260800 未加载
评论 #37254120 未加载
评论 #37256148 未加载
lolinder超过 1 年前
Does anyone have a good explanation for Meta&#x27;s strategy with AI?<p>The only thing I&#x27;ve been able to think is they&#x27;re trying to commoditize this new category before Microsoft and Google can lock it in, but where to from there? Is it just to block the others from a new revenue source, or do they have a longer game they&#x27;re playing?
评论 #37249272 未加载
评论 #37249862 未加载
评论 #37249182 未加载
评论 #37250539 未加载
评论 #37249295 未加载
评论 #37249800 未加载
评论 #37249997 未加载
评论 #37249128 未加载
评论 #37249177 未加载
评论 #37250981 未加载
评论 #37252583 未加载
评论 #37250702 未加载
评论 #37252725 未加载
评论 #37254282 未加载
评论 #37249372 未加载
评论 #37249180 未加载
评论 #37249643 未加载
评论 #37253437 未加载
rvnx超过 1 年前
Amazing! It&#x27;s great that Meta is making AI progress.<p>In the meantime, we are still waiting for Google to show what they have (according to their research papers, they are beating others).<p>&gt; User: Write a loop in Python that displays the top 10 prime numbers.<p>&gt; Bard: Sorry I am just an AI, I can&#x27;t help you with coding.<p>&gt; User: How to ask confirmation before deleting a file ?<p>&gt; Bard: To ask confirmation before deleting a file, just add -f to the rm command.<p>(real cases)
评论 #37250690 未加载
评论 #37253449 未加载
6stringmerc超过 1 年前
So it’s stubborn, stinks, bites and spits?<p>No thanks, going back to Winamp.