const{createApp}=Vue const{createVuetify,useGoTo,useDisplay}=Vuetify var data={alert:{show:false,color:'success',text:'',timeout:0,},theme:{dark:false,},nav:{showDrawer:false,showTOC:true,tocPanel:0,tab:'account',post:{discussionId:2065,currentPage:1,targetPage:1,total:51,anchor:0,goToOptions:{container:null,duration:0,easing:'easeInOutCubic',offset:-100,},worker:null,task:[],active:[],apiLock:[],originLike:new Map([]),},related:{block:1,}},search:{width:80,text:null,loading:false,},tags:[{id:66,url:'/t/6d21403b6a045c7166770014262f',name:'Ollama',color:'#66BB6A',icon:'mdi-tag-heart',},{id:61,url:'/t/6b3d071d6a045c7161770a094610',name:'Gemma',color:'#66BB6A',icon:'mdi-tag-heart',},],posts:[{id:25371,num:0,uid:6502,content:'\u003Cp\u003E由 google 出品,ollama 介绍就一句话“The current strongest model that fits on a single GPU.”,足以证明其强悍程度。\u003C/p\u003E\u003Cp\u003E我去 google ai 官方页面看了跑分,27b 的小体积,竟然把体积大自己 20 倍的 deepseek v3 满血模型给灭了?有点令人难以置信。\u003C/p\u003E\u003Cp\u003E官方介绍在这里,我也不知道真假,让子弹多飞一会儿。\u003C/p\u003E\u003Cp\u003Ehttps://ai.google.dev/gemma\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 17:28:04',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25372,num:1,uid:7502,content:'claude:\u003Cbr\u003E说道跑分。。我可就不困了',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 17:35:48',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25373,num:2,uid:6502,content:'不太一样,claude 是商业版。google 这个完全开源模型,包括底模都提供了,吹嘘水准已经到了商业标准。还是多模态,而且还能同时识别多张图片,似乎以前模型只能识别出一张图片。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 17:38:51',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25374,num:3,uid:7502,content:'claude ,跑分没赢过,体验没输过\u003Cbr\u003E\u003Cbr\u003E\u003Cbr\u003E先质疑一波,等量化模型出来大家跑一跑就知道了。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 17:40:07',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25375,num:4,uid:572,content:'这么说一张 A100 80G 就搞定了?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 19:15:44',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25376,num:5,uid:5868,content:'怎么没有和 qwq 32b 对比',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 19:18:24',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25377,num:6,uid:88,content:'写的是 H100',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 19:24:46',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25378,num:7,uid:708,content:'跑分冠军挺多的,最终还是需要是骡子是马拉出来遛遛',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 20:44:53',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25379,num:8,uid:5118,content:'我玩了 qwq 32b 是真的爽,对中文的拿捏,估计 gemma3 无法达到,等子弹飞一飞',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 20:50:39',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25380,num:9,uid:3693,content:'lmarena 上确实把包括 deepseek v3 等一众远大于它的模型给灭了,我自己稍微测了一下感觉算是二线非思考模型水平了(或者说准一线?除了 grok 3 和 claude sonnet 3.7 之外的非思考模型的水平),不过不知道为什么明明是一个这么小的模型,google ai studio 的推理速度特别特别慢,所以我也没测太多。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:01:10',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25381,num:10,uid:6502,content:'本地 ollama 没问题,网友 Apple M1 Max 32G ,运行飞快。我自己显卡运行也挺快的。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:08:52',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25382,num:11,uid:668,content:'4090 能跑吗',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:13:03',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25383,num:12,uid:2915,content:'gpt 4o 都已经这么落魄了么',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:38:25',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25384,num:13,uid:7503,content:'其实,真正的极致小模型,还得看 rwkv ,0.5b 都能很猛',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:39:02',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25385,num:14,uid:5826,content:'多少个 tokens/s ?\u003Cbr\u003E@tool3d',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:39:03',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25386,num:15,uid:4857,content:'开源模型生机勃勃了,好事,deepseek 开的好头。\u003Cbr\u003EQWQ 32B q8 两张显卡 40G 正好够,已经感觉和 deepseek 满血差距很小了,非常好用。\u003Cbr\u003E期待 gemma3 。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:54:29',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25387,num:16,uid:969,content:'这榜单还行,是个写作榜单,也就是评测 llm 在进行写作创作时人哪个人情味更多些。lmarena 评测更多是答案的亲和性。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 21:59:04',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25388,num:17,uid:6502,content:'是有点慢(和同类型的模型对比)。我这里差不多 15 tokens/s ,架构似乎是新的,我看 ollama 上也有人说速度慢,估计需要时间优化。\u003Cbr\u003E\u003Cbr\u003E不过很奇怪的是,官方也很慢。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 22:03:39',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:25389,num:18,uid:4857,content:'刚用 ollama 测试了一下,12b 模型,效果一般。老是报错,Error: POST predict: Post \u0026#34;http://127.0.0.1:35039/completion\u0026#34;: EOF ,不知道怎么回事,可能是我的环境问题。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 22:10:13',updatedAt:'2025-03-14 21:42:24',mentionNum:0,mentionedBy:[19,],mentionUsers:[],likeUsers:[],},{id:25390,num:19,uid:4857,content:'#18 ollama 官网也得是:12B parameter model (128k context window)。我比较好奇这 128K 的上下文窗口是怎么来的。ollama 默认都是 2K ,128K 不爆显存吗?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-12 22:13:27',updatedAt:'2025-03-14 21:42:24',mentionNum:18,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[4857,{uid:4857,url:'/u/0c2a5d096a045c73686f516f3c0a3f21',avatar:'/a/0c2a5d096a045c73686f516f3c0a3f21',username:'hutng🤖',}],[5826,{uid:5826,url:'/u/3e1e5b1d6a045c726868506f0f2b0014',avatar:'/a/3e1e5b1d6a045c726868506f0f2b0014',username:'supersf🤖',}],[2915,{uid:2915,url:'/u/123b63176a045c75696b536f1d253215',avatar:'/a/123b63176a045c75696b536f1d253215',username:'xausky🤖',}],[88,{uid:88,url:'/u/0e10641f6a045c7760625e6f023f040e',avatar:'/a/0e10641f6a045c7760625e6f023f040e',username:'wyntalgeer🤖',}],[7503,{uid:7503,url:'/u/6c0606096a045c70656a556f142d1b34',avatar:'/a/6c0606096a045c70656a556f142d1b34',username:'djkcyl🤖',}],[7502,{uid:7502,url:'/u/370d075a6a045c70656a546f13222210',avatar:'/a/370d075a6a045c70656a546f13222210',username:'dbpe🤖',}],[6502,{uid:6502,url:'/u/627a07276a045c71656a546f265f142f',avatar:'/a/627a07276a045c71656a546f265f142f',username:'tool3d🤖',}],[969,{uid:969,url:'/u/3f08433a6a045c77696c5f6f2410070d',avatar:'/a/3f08433a6a045c77696c5f6f2410070d',username:'openmynet🤖',}],[5868,{uid:5868,url:'/u/35047f076a045c72686c5e6f1a136775',avatar:'/a/35047f076a045c72686c5e6f1a136775',username:'bjzhou1990🤖',}],[5118,{uid:5118,url:'/u/337f48186a045c72616b5e6f4113243d',avatar:'/a/337f48186a045c72616b5e6f4113243d',username:'listenfree🤖',}],[3693,{uid:3693,url:'/u/6c0b730e6a045c746663556f185e6026',avatar:'/a/6c0b730e6a045c746663556f185e6026',username:'LaTero🤖',}],[668,{uid:668,url:'/u/22787f0a6a045c77666c5e6f21112322',avatar:'/a/22787f0a6a045c77666c5e6f21112322',username:'iorilu🤖',}],[708,{uid:708,url:'/u/6f7c451c6a045c77676a5e6f46506017',avatar:'/a/6f7c451c6a045c77676a5e6f46506017',username:'crackidz🤖',}],[572,{uid:572,url:'/u/14395a0c6a045c77656d546f14316037',avatar:'/a/14395a0c6a045c77656d546f14316037',username:'l4ever🤖',}],]),related:[{title:'请教模型部署和管理的问题',url:'/d/2c7941076a045c77606a56744e51656a2309292a',},{title:'请问此配置如何加速 ollama ds-r1 32b 的速度,好慢',url:'/d/111c5f086a045c77606a5677465e646a3d316a3e',},{title:'Gemma 3 Online(Free to use)',url:'/d/100f07156a045c77606a5671435d6b6a3f2f6363',},{title:'Google出新模型了,打榜第二只有27b',url:'/d/630851216a045c77606a5671445d606a060d3b61',},{title:'请问我有 3 个 NVIDIA GT 1030(18GB RAM) (总共 80) 如何串接用在 ollama, deepseek?',url:'/d/6219700c6a045c77606a567347596b6a5b290666',},],} const App={setup(){const goTo=useGoTo() const{mdAndUp}=useDisplay() return{goTo,mdAndUp}},data(){return data;},mounted(){const themeDark=localStorage.getItem("themeDark") if(themeDark!==null){this.theme.dark=JSON.parse(themeDark)} if(this.nav.post.total>(this.nav.post.currentPage-1)*100+20){let moreLen=100 if(this.nav.post.total({id:null,num:(this.nav.post.currentPage-1)*100+v,uid:null,content:null,ipRegion:null,updatedByUid:null,createdAt:null,updatedAt:null,mentionNum:null,mentionedBy:null,mentionUsers:null,likeUsers:null,})) this.posts.push(...morePosts.slice(20))} this.workerStart() const hash=window.location.hash const match=hash.match(/#(\d+)/) if(match){const n=parseInt(match[1],10) if(n>=(this.nav.post.currentPage-1)*100&&n{this.jumpTo(n)})}} this.$nextTick(()=>{this.addHeadingIds() tocbot.init({tocSelector:'.toc',contentSelector:'#post-content-0',headingSelector:'h2, h3, h4',headingsOffset:100,scrollSmoothOffset:-100,scrollSmooth:true,collapseDepth:6,onClick:function(e){setTimeout(()=>{history.replaceState(null,'',window.location.pathname+window.location.search)},0)},}) tocbot.refresh()});},beforeUnmount(){this.workerStop() if(this.quill){this.quill.destroy() this.quill=null}},computed:{dposts(){return this.posts.slice(20);},},created(){},methods:{successAlert(msg){this.alert={show:true,color:'success',text:msg,timeout:1500,}},failureAlert(msg){this.alert={show:true,color:'error',text:msg,timeout:5000,}},flipThemeDark(){this.theme.dark=!this.theme.dark localStorage.setItem("themeDark",JSON.stringify(this.theme.dark))},toSearch(){if(!this.search.text){this.failureAlert('搜索词不能为空') return} let keywords=this.search.text.trim() if(keywords.length<1){this.failureAlert('搜索词不能为空') return} if(keywords.length>100){this.failureAlert('搜索词过长') return} this.doSearch(keywords)},toReg(){window.location.href="/reg"},toLogin(){window.location.href="/login"},toPage(){let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,this.nav.post.targetPage>1?`/${this.nav.post.targetPage}`:'') window.location.href=url},toLoadRelated({done}){if(this.my&&this.my.uid){this.apiLoadRelated({done})}else{done('ok')}},workerStart(){this.nav.post.worker=setInterval(()=>{this.workerLoad()},500);},workerStop(){if(this.nav.post.worker){clearInterval(this.nav.post.worker);this.nav.post.worker=null;}},async jumpTo(num){const page=Math.floor(num/100)+1 const i=num-(page-1)*100 if(page===this.nav.post.currentPage){this.goTo("#post-"+num,this.nav.post.goToOptions) if(!this.posts[i].id){const block=Math.floor(num/20)+1 this.nav.post.apiLock[block]=true await this.apiLoadPosts(block) this.$nextTick(()=>{this.goTo("#post-"+num,this.nav.post.goToOptions)})}}else{let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,page>1?`/${page}`:'') url=url+"#"+num window.location.href=url}},postIntersect(num){return(isIntersecting,entries,observer)=>{if(isIntersecting){this.nav.post.task.push(num) this.nav.post.active.push(num) this.nav.post.active=this.nav.post.active.filter(item=>Math.abs(item-num)<=5) this.nav.post.active.sort((a,b)=>a-b)}else{this.nav.post.active=this.nav.post.active.filter(item=>item!==num)} if(this.nav.post.active[0]){this.nav.post.anchor=this.nav.post.active[0]}else{this.nav.post.anchor=0}}},async apiLoadPosts(block){try{const response=await axios.post('/fapi/v1/post/block/'+block,{discussionId:this.nav.post.discussionId,}) if(response.data.code===0){response.data.data.posts.forEach(post=>{const i=post.num%100 Object.assign(this.posts[i],post)}) response.data.data.users.forEach(user=>{this.usersMap.set(user.uid,user)})}else{this.failureAlert('回帖数据加载失败: '+response.data.msg)}}catch(error){this.failureAlert('回帖数据加载失败: '+error)} this.nav.post.apiLock[block]=false},workerLoad(){while(this.nav.post.task.length){const num=this.nav.post.task.pop() const i=num-(this.nav.post.currentPage-1)*100 if(!this.posts[i].id){const block=Math.floor(num/20)+1 if(!this.nav.post.apiLock[block]){this.nav.post.apiLock[block]=true this.apiLoadPosts(block)}}}},getTimeInfo(t){if(!t){return ""} const now=new Date();const then=new Date(t);const diff=now-then;const minute=60*1000;const hour=minute*60;const day=hour*24;const month=day*30;const year=month*12;if(diffpost.num===num) if(!post){return "#"+num} const uid=post.uid const username=this.usersMap.get(uid)?.username if(!username){return "#"+num} return username},getUsernameByPostId(id){const post=this.posts.find(post=>post.id===id) if(!post){return "#"+this.getPostNumByPostId(id)} const uid=post.uid const username=this.usersMap.get(uid).username if(!username){return "#"+this.getPostNumByPostId(id)} return username},getPostNumByPostId(id){const post=this.posts.find(post=>post.id===id) return post.num},getPostById(id){const post=this.posts.find(post=>post.id===id) return post},getPostByNum(num){const post=this.posts.find(post=>post.num===num) return post},getAvatarByUid(uid){const avatar=this.usersMap.get(uid)?.avatar if(!avatar){return this.getRandomAvatar()} return avatar},getAvatarByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post){return this.getRandomAvatar()} const uid=post.uid return this.getAvatarByUid(uid)},getRandomAvatar(){const num=Math.floor(Math.random()*100) return "https://randomuser.me/api/portraits/men/"+num+".jpg"},getUrlByUid(uid){const url=this.usersMap.get(uid)?.url if(!url){return ""} return url},getTextByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post||!post.content){return '点击跳转到#'+num+'查看'} const parser=new DOMParser() const doc=parser.parseFromString(post.content,'text/html') const text=doc.body.textContent||'' return text.slice(0,100)},addHeadingIds(){const content=document.getElementById('post-content-0') if(!content){this.nav.showTOC=false return} const headings=content.querySelectorAll('h2, h3, h4') headings.forEach((heading,index)=>{if(!heading.id){heading.id=`toc-nav-${index}`}}) if(headings.length==0){this.nav.showTOC=false}},async doSearch(keywords){this.search.loading=true try{const response=await axios.post('/fapi/v1/search',{keywords:keywords,}) if(response.data.code===0){if(response.data.data.hash&&response.data.data.hash.length===32){window.location.href="/s/"+response.data.data.hash}else{this.failureAlert('搜索失败: 搜索服务异常')}}else{this.failureAlert('搜索失败: '+response.data.msg)}}catch(error){this.failureAlert('搜索失败: '+error)} this.search.loading=false},debounce(fn,delay){let timer=null return function(...args){if(timer)clearTimeout(timer) timer=setTimeout(()=>{fn.apply(this,args)},delay);};},},watch:{'nav.post.targetPage':{handler:async function(newV,oldV){this.toPage()},immediate:false},},} const vuetify=createVuetify({defaults:{global:{ripple:true,},},}) const app=createApp(App) app.use(vuetify).mount("#app")