Jev in 25 Lines of Python
Hacker News 热议:Jev in 25 Lines of Python(591 赞 / 190 评论,来源 nobodywho.ai)
一句话概要
Everyone is talking about Jev - here it is in 25 lines of Python.
原文开头节选
Everyone and their mom is talking about Jev . Jev this, Jev that. Everyone on Twitter is all over Jev, how it’s the next frontier of large language models and the AI paradigm. We don’t really think so. So here’s Jev in 25 lines of Python.
/// script # requires-python = ”>=3.12” # dependencies = [“huggingface-hub”, “llama-cpp-python”, “numpy”] # /// import numpy from llama_cpp import Llama # Really, you can use any GGUF model from https://huggingface.co/models?library=gguf model = Llama . from_pretrained ( repo_id = “Qwen/Qwen3-0.6B-GGUF” , filename = “Qwen3-0.6B-Q8_0.gguf” , n_ctx = 512 , logits_all = True , verbose = False , ) Load the prompt and define your choices.
labels = [ “A” , “B” , “C” ] choices = [ “Legitimate” , “Spam” , “Phishing” ] email = “Payroll asks for your password on a non-company sign-in page.” options = “\n” . join ( f” { label } . { choice } ” for label , choice in zip ( labels , choices , strict = True ) ) prompt = f"""<|im_start|>system Choose one option.<|im_end|> <|im_start|>user Email: { email } \n\n { options } <|im_end|> <|im_start|>assistant …
(以上为原文节选,完整内容见下方”原文来源”)
这条动态今日登上 Hacker News 首页(591 赞 / 190 评论,来源 nobodywho.ai)。技术雷达每日自动聚合 AI 工程、后端架构、DevOps 方向的前沿动态;相关工程落地可浏览下方的相关服务与延伸阅读,或直接与我们团队交流。
原文来源: Hacker News