@localmode/bench 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ var x="localmode-bench/1",R=1;var ke=["You are helping a small public library plan its move to a new building across town.","The collection holds forty thousand books, two thousand audio recordings, and a local","history archive that must stay in labeled order. Volunteers are available on weekends","only, and the budget covers one rental truck. Describe a practical week-by-week moving","plan that keeps the library partially open, protects the archive, and finishes within","eight weeks. Be specific about labeling, sequencing, and volunteer coordination."].join(" "),Ae=["Read the following notes from a town planning meeting and then answer the question at the end.","The town of Milbrook has grown from eight thousand residents to eleven thousand in six years.","The old water treatment plant, built fifty years ago, operates at ninety two percent of its","rated capacity during summer months. An engineering survey found that the intake pipes show","corrosion consistent with their age but no immediate risk of failure. Replacing the plant","entirely would cost an estimated thirty one million dollars and take four years, during which","a temporary treatment module would be rented at two hundred thousand dollars per month.","Upgrading the existing plant in three phases would cost nineteen million dollars, take six","years, and raise capacity by forty percent, but phase two requires shutting one of the three","treatment trains for nine months. The town engineer favors the upgrade because the town can","fund it from reserves plus a small bond, avoiding a rate increase larger than four percent.","The finance director notes that construction costs have risen eleven percent in two years and","argues that delaying the full replacement will only make it more expensive, and that a larger","bond issued now at current rates would cost less over thirty years than a later one. Several","residents raised concerns about summer watering restrictions during phase two, and a local","manufacturer that employs three hundred people said an unreliable water supply would force it","to install its own storage tanks at significant cost. The mayor asked both officials to prepare","a comparison covering total cost of ownership over thirty years, resilience during construction,","capacity margins in the final state, and the effect on household water rates under three growth","scenarios: flat, moderate, and rapid. The engineer also mentioned that federal infrastructure","grants covering up to twenty percent of qualifying water projects open for applications next","spring, though awards are competitive and would delay the start by at least eight months either way.","Question: Write a balanced recommendation memo to the town council. Weigh both options against","the four criteria the mayor listed, account for the grant opportunity, and end with a clear","recommendation and two conditions under which the council should switch to the other option."].join(" "),$=128,ne=[{id:"chat-pp128-tg128",kind:"llm-generate",label:"Chat pp128/tg128",prompt:ke,approxPromptTokens:128,maxTokens:$,temperature:0},{id:"chat-pp512-tg128",kind:"llm-generate",label:"Long-context pp512/tg128",prompt:Ae,approxPromptTokens:512,maxTokens:$,temperature:0}];function Se(){let e=["the maintenance schedule for a fleet of electric delivery vans in a coastal city","a beginner guide to fermenting vegetables safely at home in small batches","the migration patterns of shorebirds along the Atlantic flyway in autumn","how a public library catalogs and preserves regional oral history recordings","the tradeoffs between timber framing and steel framing for small workshops","a training plan that prepares a new runner for a half marathon in twenty weeks","the way tide pools support diverse life despite extreme daily changes","budgeting practices for a volunteer-run community theater production"],t=[];for(let o=0;o<32;o++){let n=e[o%e.length];t.push(`Document ${o+1}: This passage explains ${n}. It covers the key steps, common mistakes, expected costs, and a short checklist that a careful reader can apply immediately, with concrete numbers where they matter.`);}return t}var te=Se(),oe=[{id:"embed-single",kind:"embed-single",label:"Embedding single-query latency",texts:[te[0]]},{id:"embed-batch32",kind:"embed-batch",label:"Embedding batch-32 throughput",texts:te}],se=[{id:"quality-mmlu-25",kind:"quality-mmlu",label:"tinyMMLU fidelity (25 items)",items:25},{id:"quality-mmlu-100",kind:"quality-mmlu",label:"tinyMMLU fidelity (100 items)",items:100},{id:"quality-sts-100",kind:"quality-sts",label:"STS-B Spearman (100 pairs)",items:100}],Ie=new Map([...ne,...oe,...se].map(e=>[e.id,e])),xe={quick:{warmupRuns:1,timedRuns:3,cooldownMs:5e3,pressureGate:true,pressureGateTimeoutMs:15e3,measureWarmReload:false,highVarianceCv:.05},standard:{warmupRuns:1,timedRuns:3,cooldownMs:8e3,pressureGate:true,pressureGateTimeoutMs:3e4,measureWarmReload:true,highVarianceCv:.05},thorough:{warmupRuns:1,timedRuns:5,cooldownMs:1e4,pressureGate:true,pressureGateTimeoutMs:3e4,measureWarmReload:true,highVarianceCv:.05}};var F={"transformers-webgpu":"estimated","transformers-wasm":"estimated",webllm:"chunk-count",wllama:"estimated",litert:"estimated","chrome-ai":"estimated",mediapipe:"estimated"};function f(){return typeof performance<"u"?performance.now():Date.now()}function z(e=64){if(typeof performance>"u")return null;let t=[],o=performance.now(),n=0;for(;t.length<e&&n<2e6;){let r=performance.now();r>o&&(t.push(r-o),o=r),n++;}if(t.length===0)return null;let s=Math.min(...t);return Math.round(s*1e3*100)/100}function C(e,t){return new Promise((o,n)=>{if(t?.aborted){n(A());return}let s=setTimeout(()=>{t?.removeEventListener("abort",r),o();},e);function r(){clearTimeout(s),n(A());}t?.addEventListener("abort",r,{once:true});})}function A(){if(typeof DOMException<"u")return new DOMException("Aborted","AbortError");let e=new Error("Aborted");return e.name="AbortError",e}var _=class{events=[];disposers=[];hidden=false;lastPressureState;wakeLockSentinel=null;record(t,o){this.events.push({t:f(),type:t,...o!==void 0?{detail:o}:{}});}get isHidden(){return this.hidden}get pressureState(){return this.lastPressureState}get all(){return this.events}async attach(){if(typeof document<"u"){let n=()=>{this.hidden=document.visibilityState==="hidden",this.record(this.hidden?"visibility-hidden":"visibility-visible");};document.addEventListener("visibilitychange",n),this.disposers.push(()=>document.removeEventListener("visibilitychange",n)),this.hidden=document.visibilityState==="hidden";}let t=globalThis.PressureObserver;if(t)try{let n=new t(s=>{let r=s[s.length-1];r&&(this.lastPressureState=r.state,this.record("pressure-change",r.state));});await n.observe("cpu",{sampleInterval:1e3}),this.disposers.push(()=>n.disconnect());}catch{}let o=typeof navigator<"u"?navigator.wakeLock:void 0;if(o)try{let n=await o.request("screen");this.wakeLockSentinel=n,this.record("wakelock-acquired"),n.addEventListener("release",()=>{this.record("wakelock-released"),this.wakeLockSentinel=null;});}catch{}}async dispose(){for(let t of this.disposers)t();if(this.disposers=[],this.wakeLockSentinel){try{await this.wakeLockSentinel.release();}catch{}this.wakeLockSentinel=null;}}};function q(){return typeof performance<"u"&&"measureUserAgentSpecificMemory"in performance&&typeof crossOriginIsolated<"u"&&crossOriginIsolated?"uaSpecific":typeof performance<"u"&&"memory"in performance&&typeof performance.memory?.usedJSHeapSize=="number"?"legacyHeap":"none"}async function E(e=25e3){let t=q();if(t==="uaSpecific")try{let o=await Promise.race([performance.measureUserAgentSpecificMemory(),new Promise(n=>setTimeout(()=>n(null),e))]);if(o&&typeof o.bytes=="number")return o.bytes}catch{}if(t!=="none"){let o=performance.memory;if(typeof o?.usedJSHeapSize=="number")return o.usedJSHeapSize}return null}var Re=["maxBufferSize","maxStorageBufferBindingSize","maxComputeWorkgroupStorageSize","maxComputeInvocationsPerWorkgroup","maxComputeWorkgroupSizeX"];async function V(e){let t=typeof navigator<"u"?navigator:void 0,{browser:o,os:n}=await Me(t),s=await Ee(t);return {capturedAt:new Date().toISOString(),browser:o,os:n,hardware:{cores:t?.hardwareConcurrency??null,coresClamped:o.name!=="Chrome"&&o.name!=="Edge",deviceMemoryGB:t&&"deviceMemory"in t?t.deviceMemory??null:null,deviceMemoryCapped:true},gpu:s,webglRenderer:Le(),flags:{crossOriginIsolated:typeof crossOriginIsolated<"u"?crossOriginIsolated:false,sharedArrayBuffer:typeof SharedArrayBuffer<"u",wasmSimd:Pe()},storage:await Be(t),power:await Ce(t),pressure:{supported:typeof globalThis<"u"&&"PressureObserver"in globalThis},timerResolutionUs:z(),screen:typeof screen<"u"?{width:screen.width,height:screen.height,dpr:typeof devicePixelRatio<"u"?devicePixelRatio:1}:null,languages:t?.languages?[...t.languages].slice(0,3):void 0,userReportedDevice:e?.userReportedDevice}}async function Me(e){let t=e&&"userAgentData"in e?e.userAgentData:void 0;if(t)try{let n=await t.getHighEntropyValues(["platform","platformVersion","architecture","bitness","model","fullVersionList"]),s=n.fullVersionList??t.brands??[],r=s.find(a=>!/not.?a.?brand/i.test(a.brand)&&a.brand!=="Chromium")??s.find(a=>!/not.?a.?brand/i.test(a.brand));return {browser:{name:r?.brand??"Chromium",version:r?.version??"unknown",source:"ua-ch",brands:s.map(a=>({brand:a.brand,version:a.version}))},os:{platform:String(n.platform??"unknown"),version:String(n.platformVersion??"unknown"),architecture:n.architecture?String(n.architecture):void 0,bitness:n.bitness?String(n.bitness):void 0,model:n.model?String(n.model):void 0}}}catch{}let o=e?.userAgent??"";return {browser:Te(o),os:_e(o)}}function Te(e){let t=[["Firefox",/Firefox\/(\d+[\d.]*)/],["Edge",/Edg(?:e|A|iOS)?\/(\d+[\d.]*)/],["Safari",/Version\/(\d+[\d.]*).*Safari/],["Chrome",/Chrome\/(\d+[\d.]*)/]];for(let[o,n]of t){let s=e.match(n);if(s)return {name:o,version:s[1],source:"ua-parse"}}return {name:"unknown",version:"unknown",source:"ua-parse"}}function _e(e){let t="unknown";return /Windows/.test(e)?t="Windows":/iPhone|iPad|iPod/.test(e)?t="iOS":/Mac OS X/.test(e)?t="macOS":/Android/.test(e)?t="Android":/Linux/.test(e)&&(t="Linux"),{platform:t,version:"unknown-frozen"}}async function Ee(e){let t=e&&"gpu"in e?e.gpu:void 0;if(!t)return {available:false};try{let o=await Promise.race([t.requestAdapter(),new Promise(a=>setTimeout(()=>a(null),3e3))]);if(!o)return {available:!1};let n=o.info??{},s={},r=o.limits;if(r)for(let a of Re){let i=r[a];typeof i=="number"&&(s[a]=i);}return {available:!0,vendor:j(n.vendor),architecture:j(n.architecture),device:j(n.device),description:j(n.description),isFallbackAdapter:typeof n.isFallbackAdapter=="boolean"?n.isFallbackAdapter:void 0,features:o.features?[...o.features].sort():void 0,limits:s}}catch{return {available:false}}}function j(e){return typeof e=="string"&&e.length>0?e:void 0}function Le(){try{if(typeof document>"u")return null;let e=document.createElement("canvas"),t=e.getContext("webgl2")??e.getContext("webgl");if(!t)return null;let o=t.getExtension("WEBGL_debug_renderer_info"),n=o?t.getParameter(o.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER);return typeof n=="string"?n:null}catch{return null}}function Pe(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))}catch{return false}}async function Be(e){try{if(!e?.storage?.estimate)return null;let t=await e.storage.estimate();return {quotaBytes:t.quota??void 0,usageBytes:t.usage??void 0}}catch{return null}}async function Ce(e){try{let t=e&&"getBattery"in e?e.getBattery:void 0;if(!t)return {batterySupported:!1};let o=await t.call(e);return {batterySupported:!0,charging:o.charging,level:o.level}}catch{return {batterySupported:false}}}function qe(e){let t=e>>>0;return ()=>(t=Math.imul(t,1664525)+1013904223>>>0,t/4294967295)}async function H(e){let t=e?.n??160,o=e?.minDurationMs??600,n=qe(780228),s=new Float32Array(t*t),r=new Float32Array(t*t);for(let g=0;g<t*t;g++)s[g]=n()-.5,r[g]=n()-.5;let a=new Float32Array(t*t),i=2*t*t*t,c=0,l=f(),d=0;for(;d<o;)je(s,r,a,t),c++,d=f()-l,c%4===0&&await Promise.resolve();let m=0;for(let g=0;g<t*t;g+=97)m+=a[g];return {mflops:i*c/(d*1e3),n:t,iterations:c,durationMs:d,checksum:Math.fround(m)}}function je(e,t,o,n){for(let s=0;s<n;s++)for(let r=0;r<n;r++){let a=0;for(let i=0;i<n;i++)a+=e[s*n+i]*t[i*n+r];o[s*n+r]=a;}}var re=[12.706,4.303,3.182,2.776,2.571,2.447,2.365,2.306,2.262,2.228,2.201,2.179,2.16,2.145,2.131,2.12,2.11,2.101,2.093,2.086,2.08,2.074,2.069,2.064,2.06,2.056,2.052,2.048,2.045,2.042];function ie(e){return [...e].sort((t,o)=>t-o)}function W(e,t){if(e.length===0)throw new RangeError("quantile() requires a non-empty sample");if(t<0||t>1)throw new RangeError(`quantile q must be in [0,1], got ${t}`);let o=ie(e),n=(o.length-1)*t,s=Math.floor(n),r=Math.ceil(n);return s===r?o[s]:o[s]+(o[r]-o[s])*(n-s)}function O(e){return W(e,.5)}function L(e){if(e.length===0)throw new RangeError("mean() requires a non-empty sample");let t=0;for(let o of e)t+=o;return t/e.length}function ce(e){if(e.length<2)return 0;let t=L(e),o=0;for(let n of e)o+=(n-t)*(n-t);return Math.sqrt(o/(e.length-1))}function We(e){if(e.length===0)throw new RangeError("geomean() requires a non-empty sample");let t=0;for(let o of e){if(o<=0)throw new RangeError(`geomean() requires positive values, got ${o}`);t+=Math.log(o);}return Math.exp(t/e.length)}function v(e){if(e.length===0)throw new RangeError("summarize() requires a non-empty sample");let t=e.length,o=L(e),n=ce(e),s=ie(e),r=t>=2?re[Math.min(t-2,re.length-1)]*n/Math.sqrt(t):0;return {n:t,median:O(e),mean:o,sd:n,iqr:W(e,.75)-W(e,.25),min:s[0],max:s[t-1],ci95:r,cv:o===0?0:n/Math.abs(o)}}function G(e,t){if(e.length!==t.length)throw new RangeError("spearman() requires equal-length samples");if(e.length<2)throw new RangeError("spearman() requires n >= 2");let o=ae(e),n=ae(t);return Oe(o,n)}function ae(e){let t=e.map((s,r)=>[s,r]).sort((s,r)=>s[0]-r[0]),o=new Array(e.length),n=0;for(;n<t.length;){let s=n;for(;s+1<t.length&&t[s+1][0]===t[n][0];)s++;let r=(n+s)/2+1;for(let a=n;a<=s;a++)o[t[a][1]]=r;n=s+1;}return o}function Oe(e,t){let o=L(e),n=L(t),s=0,r=0,a=0;for(let c=0;c<e.length;c++){let l=e[c]-o,d=t[c]-n;s+=l*d,r+=l*l,a+=d*d;}let i=Math.sqrt(r*a);return i===0?0:s/i}var Ne=1,Ue=[{maxBytes:5e8,max:4e3},{maxBytes:1e9,max:2500},{maxBytes:2e9,max:1500},{maxBytes:Number.POSITIVE_INFINITY,max:1e3}],De=2e3,$e=[/swiftshader/i,/llvmpipe/i,/softpipe/i,/\bwarp\b/i,/microsoft basic render/i,/parallels/i,/vmware/i,/virtio/i,/virtualbox/i];function le(e){let t=[],o=a=>{t.length<50&&t.push(a);};if(typeof e!="object"||e===null)return ["result must be an object"];let n=e;n.protocol!==x&&o(`protocol must be "${x}"`),n.schemaVersion!==1&&o(`schemaVersion must be ${1}`),(typeof n.runId!="string"||n.runId.length<8||n.runId.length>64)&&o("runId must be a string (8-64 chars)"),(typeof n.createdAt!="string"||Number.isNaN(Date.parse(n.createdAt)))&&o("createdAt must be an ISO date string");let s=n.harness;(!s||typeof s.name!="string"||typeof s.version!="string")&&o("harness {name, version} is required"),["quick","standard","thorough","custom"].includes(n.suite)||o("suite must be quick|standard|thorough|custom");let r=n.environment;if(!r||typeof r!="object")o("environment is required");else {let a=r.browser;(!a||typeof a.name!="string")&&o("environment.browser.name is required"),(!r.os||typeof r.os.platform!="string")&&o("environment.os.platform is required");}return Array.isArray(n.cells)?n.cells.length===0?o("cells must not be empty"):n.cells.length>500?o("cells exceeds the 500-cell limit"):n.cells.forEach((a,i)=>Fe(a,i,o)):o("cells must be an array"),Array.isArray(n.events)||o("events must be an array"),t}function Fe(e,t,o){if(typeof e!="object"||e===null){o(`cells[${t}] must be an object`);return}let n=e,s=`cells[${t}]`;typeof n.cellId!="string"&&o(`${s}.cellId must be a string`),typeof n.runtimeId!="string"&&o(`${s}.runtimeId must be a string`),typeof n.workloadId!="string"&&o(`${s}.workloadId must be a string`),["ok","invalid","error","skipped"].includes(n.status)||o(`${s}.status must be ok|invalid|error|skipped`);let r=n.model;if((!r||typeof r.benchModelId!="string"||typeof r.providerModelId!="string")&&o(`${s}.model {benchModelId, providerModelId} is required`),!Array.isArray(n.iterations)){o(`${s}.iterations must be an array`);return}n.iterations.forEach((a,i)=>{if(typeof a!="object"||a===null){o(`${s}.iterations[${i}] must be an object`);return}let c=a;(typeof c.startT!="number"||typeof c.endT!="number")&&o(`${s}.iterations[${i}] needs numeric startT/endT`),"chunks"in c&&!Array.isArray(c.chunks)&&o(`${s}.iterations[${i}].chunks must be an array`),"text"in c&&typeof c.text=="string"&&c.text.length>2e4&&o(`${s}.iterations[${i}].text exceeds 20000 chars`);});}function de(e){return e.length>0&&"chunks"in e[0]}function N(e,t=.05,o){let n={cellId:e.cellId,status:e.status,highVariance:false};if(e.load&&(n.loadMs=e.load.endT-e.load.startT,n.loadCached=e.load.cached),e.quality&&(n.qualityScore=e.quality.score),e.iterations.length===0)return n;if(de(e.iterations)){let r=[],a=[],i=[],c=[],l=[];for(let d of e.iterations){let m=d.chunks.find(p=>p.c>0);if(!m)continue;let g=m.t-d.startT;r.push(g);let h=d.chunks[d.chunks.length-1],u=d.chunks.reduce((p,b)=>p+b.c,0)-m.c,y=h.t-m.t;y>0&&u>0&&(a.push(u/y*1e3),i.push((d.chunks.length-1)/y*1e3)),c.push(d.chunks.reduce((p,b)=>p+b.c,0)),o&&g>0&&l.push(o/g*1e3);}r.length>0&&(n.ttftMs=v(r)),a.length>0&&(n.decodeCharsPerSec=v(a)),i.length>0&&(n.decodeChunksPerSec=v(i)),c.length>0&&(n.generatedChars=v(c)),l.length>0&&(n.prefillTokPerSecApprox=v(l));}else {let r=e.iterations,a=r.map(i=>i.endT-i.startT).filter(i=>i>0);a.length>0&&(r[0].count===1?n.singleLatencyMs=v(a):n.batchTextsPerSec=v(r.filter(i=>i.endT-i.startT>0).map(i=>i.count/(i.endT-i.startT)*1e3)));}let s=[n.ttftMs,n.decodeCharsPerSec,n.singleLatencyMs,n.batchTextsPerSec];return n.highVariance=s.some(r=>r!==void 0&&r.n>=2&&r.cv>t),n}function M(e,t=.05,o){let s=o??new Map([["chat-pp128-tg128",128],["chat-pp512-tg128",512]]);return e.cells.map(r=>N(r,t,s.get(r.workloadId)))}function ue(e){let t=[],o=(i,c,l,d)=>t.push({code:i,message:c,severity:l,...d?{cellId:d}:{}});e.fingerprint?(e.fingerprint.mflops<=1||e.fingerprint.mflops>1e5||!Number.isFinite(e.fingerprint.checksum))&&o("fingerprint-implausible",`fingerprint mflops=${e.fingerprint.mflops}`,"reject"):o("fingerprint-missing","no hardware fingerprint in submission","reject");let n=e.environment.timerResolutionUs;for(let i of e.cells)if(i.status==="ok"){if(i.load&&i.load.endT<i.load.startT&&o("load-time-reversed","load endT precedes startT","reject",i.cellId),de(i.iterations)){for(let l of i.iterations){let d=l.startT,m=true;for(let h of l.chunks)h.t<d&&(m=false),d=h.t;if(!m||l.endT<d){o("trace-not-monotonic","chunk timestamps are not monotonic","reject",i.cellId);break}let g=l.chunks.reduce((h,u)=>h+u.c,0);if(l.text.length!==g){o("text-chunk-mismatch",`text length ${l.text.length} != chunk sum ${g}`,"reject",i.cellId);break}}let c=N(i);if(c.decodeCharsPerSec){let l=i.model.sizeBytes??Number.POSITIVE_INFINITY,d=Ue.find(m=>l<=m.maxBytes);d&&c.decodeCharsPerSec.median>d.max&&o("decode-rate-envelope",`decode ${Math.round(c.decodeCharsPerSec.median)} chars/s exceeds envelope ${d.max} for model size`,"reject",i.cellId);}if(c.ttftMs&&c.ttftMs.median<1&&o("ttft-implausible",`median TTFT ${c.ttftMs.median}ms < 1ms`,"reject",i.cellId),n!=null&&n>=4){let l=n/1e3,d=0,m=0;for(let g of i.iterations)for(let h of g.chunks)m++,Math.abs(h.t/l-Math.round(h.t/l))>.01&&d++;m>=20&&d/m>.5&&o("timer-grid",`${d}/${m} chunk timestamps off the ${n}us timer grid`,"warn",i.cellId);}}else if(i.iterations.length>0){let c=N(i);c.batchTextsPerSec&&c.batchTextsPerSec.median>De&&o("embed-rate-envelope",`embedding throughput ${Math.round(c.batchTextsPerSec.median)} texts/s exceeds envelope`,"reject",i.cellId),c.singleLatencyMs&&c.singleLatencyMs.median<.05&&o("embed-latency-implausible","sub-50us embedding latency","reject",i.cellId);}}let s=e.environment.gpu.vendor?.toLowerCase()??"",r=e.environment.os.platform.toLowerCase();s==="apple"&&r.includes("windows")&&o("env-cross-field","Apple GPU adapter with Windows platform","reject");let a=[e.environment.gpu.vendor,e.environment.gpu.architecture,e.environment.gpu.device,e.environment.gpu.description,e.environment.webglRenderer].filter(Boolean).join(" ");if($e.some(i=>i.test(a))){let i=e.cells.some(c=>c.status==="ok"&&/webgpu|^gpu$/.test(c.resolvedBackend));o("software-renderer",`GPU identity matches a software/virtual renderer: "${a.slice(0,120)}"`,i?"reject":"warn");}return t}function ze(e){let t=le(e);if(t.length>0)return {ok:false,shapeErrors:t,flags:[],summaries:[]};let o=M(e),n=ue(e);if(e.clientSummaries){let s=new Map(o.map(r=>[r.cellId,r]));for(let r of e.clientSummaries){let a=s.get(r.cellId);if(a)for(let i of ["ttftMs","decodeCharsPerSec","singleLatencyMs","batchTextsPerSec"]){let c=r[i]?.median,l=a[i]?.median;c!==void 0&&l!==void 0&&l!==0&&Math.abs(c-l)/Math.abs(l)>.01&&n.push({code:"client-summary-disagrees",cellId:r.cellId,message:`${i} client median ${c} vs recomputed ${l}`,severity:"reject"});}}}return {ok:n.every(s=>s.severity!=="reject"),shapeErrors:[],flags:n,summaries:o}}var K=[{question:"The number of days it takes to build a new house has a variance of 386. A sample of 40 new homes shows an average building time of 83 days. With what confidence can we assert that the average building time for a new house is between 80 and 90 days?",subject:"high_school_statistics",choices:["15.4%","17.8%","20.0%","82.1%"],answer:3},{question:"According to trials on diabetes prevention, high-risk individuals can reduce their risk to develop diabetes by doing the following:",subject:"nutrition",choices:["Eating a very low carbohydrate diet","Consuming a diet high in monounsaturated fats","Losing 5-7% of body weight through a hypocaloric low fat diet and 30 minutes of daily activity","Initiating metformin 850 mg BID and practicing daily vigorous exercise"],answer:2},{question:"Which of the following is true regarding the complications of a large goitre?",subject:"clinical_knowledge",choices:["It causes stridor due to compression of the oesophagus","Dysphagia is an indication for surgery","It causes hoarseness due to compression of the trachea","It causes a more florid thyrotoxicosis than a smaller goitre"],answer:1},{question:"Doses of substances used in animal toxicity studies are usually many times greater than those experienced by people because:",subject:"nutrition",choices:["Animals are generally much less sensitive than people","Such tests can detect only very large risks because of the fact that only small numbers of animals can be used","It is difficult in such studies to determine whether the observed toxic effects were caused by the substance","It is the only way to ensure results are applicable to people"],answer:1},{question:"Rowena can paint a room in $14$ hours, while Ruby can paint it in $6$ hours. If Rowena paints for $x$ hours and Ruby paints for $y$ hours, they will finish half of the painting, while if Rowena paints for $y$ hours and Ruby paints for $x$ hours they will paint the whole room. Find the ordered pair $(x,y)$.",subject:"high_school_mathematics",choices:["(\\frac{11}{10}, \\frac{11}{10})","(\\frac{231}{20}, \\frac{21}{20})","(\\frac{231}{40}, \\frac{21}{40})","(1,1)"],answer:2},{question:"Which of the following statements would Macedo disagree with?",subject:"moral_disputes",choices:["States should give special weight to their own citizens.","Immigration policies can have powerful economic effects.","Self-governance is morally irrelevant to the immigration debate.","There are reasons to think U.S. immigration policy has had detrimental effects on income distribution among citizens."],answer:2},{question:"A 17-year-old girl is brought to the physician by her mother because she has not had a menstrual period for 6 months. The patient is unconcerned about the lack of menses. Menarche occurred at the age of 12 years, and menses had occurred at regular 28-day intervals until they became irregular 1 year ago. She is a member of her high school gymnastics team. She appears emaciated. She is 163 cm (5 ft 4 in) tall and weighs 40 kg (88 lb); BMI is 15 kg/m2 . Her pulse is 54/min, and blood pressure is 80/50 mm Hg. Which of the following is the most likely cause of this patient's amenorrhea?",subject:"professional_medicine",choices:["Hyperthyroidism","Hypogonadotropic hypogonadism","Hypothyroidism","Polycystic ovarian syndrome"],answer:1},{question:"The Yang-shao culture gave way to the Lung-Shan sometime after:",subject:"prehistory",choices:["6,000 B.P.","5,000 B.P.","4,000 B.P.","3,000 B.P."],answer:1},{question:"Cultural homogenization.",subject:"business_ethics",choices:["1,3,4","1,2,3","1,2,3,4","2,3,4"],answer:1},{question:"Of the ways of escaping moral arguments that he discusses, Hare claims:",subject:"philosophy",choices:["none of them are successful.","some, but not all of them are successful.","all are entirely successful.","all might be successful, but at a price."],answer:3},{question:"An employee of large manufacturing firm finds the work dull, and pursues the job only for the money. The employee performs minimally, and is not motivated so produce highest quantity or better quality. According to F. Herzberg's two-factor theory, the best way 10 increase this worker's self-motivation would be to",subject:"professional_psychology",choices:["offer a raise and incentive pay for greater productivity","redesign the job to provide a challenge and a sense of accomplishment","increase opportunities for informed social interaction","provide the employee with a job tide carrying greater prestige"],answer:1},{question:"In an e-commerce environment that requires that the information technology (IT) system be available on a continuous basis, more emphasis will be placed on which of the following aspects of the planning than in a traditional organization?",subject:"professional_accounting",choices:["Maintain appropriate written source documents so the data can be re-entered if it is lost or compromised","Maintain redundant systems for instant availability to assure the flow of transactions","Review additional expenses to obtain the required amount of business interruption insurance coverage for the organization","Assure that appropriate data backups are stored in an off-site location"],answer:1},{question:"The Space Shuttle orbits 300 km above the Earth\u2019s surface; the Earth\u2019s radius is 6400 km. What is the acceleration due to Earth\u2019s gravity experienced by the Space Shuttle?",subject:"high_school_physics",choices:["4.9 m/s^2","8.9 m/s^2","9.8 m/s^2","10.8 m/s^2"],answer:1},{question:"Statement 1 | The image of a group of 6 elements under a homomorphism may have 12 elements. Statement 2 | There is a homomorphism of some group of 6 elements into some group of 12 elements.",subject:"abstract_algebra",choices:["True, True","False, False","True, False","False, True"],answer:3},{question:"At which of the following locations does bile enter the digestive tract?",subject:"anatomy",choices:["Gastroesophageal sphincter","Duodenum","Ileocecum","Jejunum"],answer:1},{question:`This question refers to the following information.
2
+ Is it not unity alone that can weld us into an effective force, capable of creating our own progress and making our valuable contribution to world peace? Which independent African state will claim that its financial structure and banking institutions are fully harnessed to its national development? Which will claim that its material resources and human energies are available for its own national aspirations? We are fast learning that political independence is not enough to rid us of the consequences of colonial rule. We have been too busy nursing our separate states to understand fully the basic need for union, rooted in common purpose, common planning and common endeavour.
3
+ Ghana's president, Kwame Nkrumah, addressing the Organization of African Unity, 1963
4
+ The speaker in the passage above is espousing which of the following causes?`,subject:"high_school_world_history",choices:["Nationalism","Socialism","Pan-Africanism","Neocolonialism"],answer:2},{question:"Monte Alban is located in the ________ and was built by the _________.",subject:"prehistory",choices:["Valley of Mexico; Aztec.","Valley of Oaxaca; Zapotec.","Amazon floodplain; Olmec.","Yucat\xE1n Peninsula; Maya."],answer:1},{question:`Sauna use, sometimes referred to as "sauna bathing," is characterized by short-term passive exposure to extreme heat. This exposure elicits mild hyperthermia \u2013 an increase in the body's core temperature \u2013 that induces a thermoregulatory response involving neuroendocrine, cardiovascular, and cytoprotective mechanisms that work together to restore homeostasis and condition the body for future heat stressors\u2026 In recent decades, sauna bathing has emerged as a means to increase lifespan and improve overall health, based on compelling data from observational, interventional, and mechanistic studies. Of particular interest are the findings from studies of participants in the Kuopio Ischemic Heart Disease Risk Factor (KIHD) Study, an ongoing prospective population-based cohort study of health outcomes in more than 2,300 middle-aged men from eastern Finland, which identified strong links between sauna use and reduced death and disease\u2026 The KIHD findings showed that men who used the sauna two to three times per week were 27 percent less likely to die from cardiovascular-related causes than men who didn't use the sauna.[2] Furthermore, the benefits they experienced were found to be dose-dependent: Men who used the sauna roughly twice as often, about four to seven times per week, experienced roughly twice the benefits \u2013 and were 50 percent less likely to die from cardiovascular-related causes.[2] In addition, frequent sauna users were found to be 40 percent less likely to die from all causes of premature death. These findings held true even when considering age, activity levels, and lifestyle factors that might have influenced the men's health.[2]... The KIHD also revealed that frequent sauna use reduced the risk of developing dementia and Alzheimer's disease in a dose-dependent manner. Men who used the sauna two to three times per week had a 66 percent lower risk of developing dementia and a 65 percent lower risk of developing Alzheimer's disease, compared to men who used the sauna only one time per week\u2026 The health benefits associated with sauna use extended to other aspects of mental health, as well. Men participating in the KIHD study who used the sauna four to seven times per week were 77 percent less likely to develop psychotic disorders, regardless of the men's dietary habits, socioeconomic status, physical activity, and inflammatory status (as measured by C-reactive protein)\u2026Exposure to high temperature stresses the body, eliciting a rapid, robust response. The skin and core body temperatures increase markedly, and sweating ensues. The skin heats first, rising to 40\xB0C (104\xB0F), and then changes in core body temperature occur, rising slowly from 37\xB0C (98.6\xB0F, or normal) to 38\xB0C (100.4\xB0F) and then rapidly increasing to 39\xB0C (102.2\xB0F)\u2026 Cardiac output, a measure of the amount of work the heart performs in response to the body's need for oxygen, increases by 60 to 70 percent, while the heart rate (the number of beats per minute) increases and the stroke volume (the amount of blood pumped) remains unchanged.[5] During this time, approximately 50 to 70 percent of the body's blood flow is redistributed from the core to the skin to facilitate sweating. The average person loses approximately 0.5 kg of sweat while sauna bathing.[11] Acute heat exposure also induces a transient increase in overall plasma volume to mitigate the decrease in core blood volume. This increase in plasma volume not only provides a reserve source of fluid for sweating, but it also acts like the water in a car's radiator, cooling the body to prevent rapid increases in core body temperature and promoting heat tolerance\u2026 Repeated sauna use acclimates the body to heat and optimizes the body's response to future exposures, likely due to a biological phenomenon known as hormesis, a compensatory defense response following exposure to a mild stressor that is disproportionate to the magnitude of the stressor. Hormesis triggers a vast array of protective mechanisms that not only repair cell damage but also provide protection from subsequent exposures to more devastating stressors\u2026 The physiological responses to sauna use are remarkably similar to those experienced during moderate- to vigorous-intensity exercise. In fact, sauna use has been proposed as an alternative to exercise for people who are unable to engage in physical activity due to chronic disease or physical limitations.[13]
5
+
6
+ Based on the article, which of the following statements is the author likely to agree with?`,subject:"college_medicine",choices:["Heart surgery patients who cannot run on treadmills may benefit from sauna use.","Patients on a diet would benefit from sauna use.","Salt restriction would be equal to sauna use for hypertensive patients.","Patients with skin conditions may be cured with sauna use."],answer:0},{question:`A department store had suffered a succession of thefts of merchandise over a period of months. From reports by employees and customers, the department store's manager concluded that the losses were due, wholly or in large part, to the depredations of a female shoplifter, aged 30 to 40 years, about 5 feet 5 inches in height, with red hair and green eyes, who usually wore a suit. This information was passed on to all of the employees of the department store. One day, a woman entered the store to purchase accessories. The woman was 5 feet 5 inches tall, 37 years old, red-haired and green-eyed, and dressed in a smartly tailored suit. She carried a large shopping bag. The manager noticed her as she picked up, examined, and put down a number of gloves and scarves. After a while, she looked about tentatively, and then started to walk out, swinging her bag. The manager intercepted her and, standing in front of her, politely asked the woman if she would accompany her to the store manager's office. When the woman asked for an explanation, the manager told her of the store's recent experience and the suspicion that the woman might be concealing pilfered merchandise in her bag. Flushing angrily, the woman replied, "Very well," and followed her to the office. Once there, the manager began to question the woman quite intensively. After the questioning, the manager then asked the woman's permission to inspect the contents of her shopping bag. At first, the woman curtly refused and announced that she had had enough of this nonsense. When she rose to go, the manager told her, "Listen, unless you let me look inside that bag, I'm going to call the police. " The woman replied, "Very well," and handed her the bag. The manager inspected the contents of the bag thoroughly but did not find any pilfered merchandise. She then gave the woman permission to leave. The total length of the woman's detention was 30 minutes. If the woman asserts a claim for false imprisonment against the department store, she will most likely`,subject:"professional_law",choices:["prevail, because she was detained for an unreasonably long period of time.","prevail, because the manager did not have reasonable grounds to suspect that the woman had committed a theft.","not prevail, because under the circumstances, the manager had reasonable grounds to suspect that the woman had committed a theft.","not prevail, because the manager gave the woman permission to leave after conducting her investigation."],answer:0},{question:"Which language family is most widely spoken in North America and Europe and includes Baltic, Celtic, Germanic, and Greek?",subject:"high_school_geography",choices:["Dravidian","Uralic-Altaic","Sino-Tibetan","Indo-European"],answer:3},{question:"For which of these two scenarios does the main character (who uses I/me/my) do something clearly morally wrong, according to ordinary moral standards in the US as of 2020? Scenario 1 | I decided to cook a potato for my girlfriend. Scenario 2 | I cornered the rat forcing it to go outside",subject:"moral_scenarios",choices:["Wrong, Wrong","Wrong, Not wrong","Not wrong, Wrong","Not wrong, Not wrong"],answer:3},{question:"How does rubella cause foetal abnormalities?",subject:"virology",choices:["By crossing the placenta early in pregnancy and infecting the foetus","By only infecting the placenta","By inducing cytokines and chemokines in the mother","By raising the temperature of the mother and inducing an abnormal immune reaction to the foetus"],answer:0},{question:"Find the opposite of the number \u22127.",subject:"elementary_mathematics",choices:["7","\u22127","0.7","\u22127.7"],answer:0},{question:"Silver metal, often amalgamated with mercury, is used to reduce substances to a desired oxidation state. If the silver metal amalgam cannot be used because of concerns about mercury, which of the following would be a reasonable and safe substitute?",subject:"high_school_chemistry",choices:["H+(aq)","Na(s)","Ca2+(aq)","Mg(s)"],answer:3},{question:"A 52-year-old man is brought to the emergency department 30 minutes after he had an episode of chest pain radiating to his jaw while shoveling snow. His pulse is 80/min, and blood pressure is 130/70 mm Hg. The lungs are clear to auscultation. Cardiac examination shows an S4. While undergoing an ECG, the patient says that he feels the chest pain returning. The most appropriate immediate treatment is a drug with which of the following mechanisms of action?",subject:"professional_medicine",choices:["Increases cAMP concentration","Increases nitric oxide concentration","Inhibits potassium flux","Inhibits sodium flux"],answer:1},{question:"For which of these two scenarios does the main character (who uses I/me/my) do something clearly morally wrong, according to ordinary moral standards in the US as of 2020? Scenario 1 | I voted twice in the presidential election. Scenario 2 | I rolled the grocery cart to my car.",subject:"moral_scenarios",choices:["Wrong, Wrong","Wrong, Not wrong","Not wrong, Wrong","Not wrong, Not wrong"],answer:1},{question:"A mechanism is a sequence of elementary reactions that add up to the overall reaction stoichiometry. A substance that is produced in one elementary reaction and consumed in another is called",subject:"high_school_chemistry",choices:["a catalyst","an intermediate","a reactant","a complex"],answer:1},{question:"A 22-year-old woman comes to the office because of urticaria. This is her first episode of urticaria and it has occurred and then resolved several times in the past week. The history and physical examination disclose no abnormalities. Which of the following is the most appropriate course of action?",subject:"professional_medicine",choices:["Determine the serum IgE concentration","Determine the total eosinophil count","Refer her to an allergist","Treat the symptoms"],answer:3},{question:"For which of these two scenarios does the main character (who uses I/me/my) do something clearly morally wrong, according to ordinary moral standards in the US as of 2020? Scenario 1 | I spent my afternoon swimming in the pool. Scenario 2 | I made my partner scream for help the entire evening.",subject:"moral_scenarios",choices:["Wrong, Wrong","Wrong, Not wrong","Not wrong, Wrong","Not wrong, Not wrong"],answer:2},{question:"If you were to travel at a speed close to the speed of light, you could notice that your own",subject:"conceptual_physics",choices:["mass changes.","pulse decreases.","Both of these.","Neither of these."],answer:3},{question:"Form A of a standardized personality test was given in the fall and again in the spring co the same group of people. The reliability estimate that resulted from this research is referred to as",subject:"professional_psychology",choices:["external consistency","equivalence","stability","internal consistency"],answer:2},{question:"All of the following statements are true EXCEPT",subject:"high_school_biology",choices:["thyroxine increases the rate of metabolism","insulin decreases storage of glycogen","vasopressin stimulates water reabsorption in the kidney","epinephrine increases blood sugar levels and heart rate"],answer:1},{question:"For which of these two scenarios does the main character (who uses I/me/my) do something clearly morally wrong, according to ordinary moral standards in the US as of 2020? Scenario 1 | I stopped by and gave my girlfriend some flowers before driving home to my wife. Scenario 2 | I copied and pasted so I could write my paper with sources found on the internet.",subject:"moral_scenarios",choices:["Wrong, Wrong","Wrong, Not wrong","Not wrong, Wrong","Not wrong, Not wrong"],answer:0},{question:"The majority of Kurds are found in which country?",subject:"high_school_geography",choices:["Iran","Iraq","Turkey","Egypt"],answer:2},{question:"Including the bottom how many sides are on a square-based pyramid?",subject:"miscellaneous",choices:["three","four","five","six"],answer:2},{question:"One of the following is the primary function of an oscillator",subject:"electrical_engineering",choices:["produces sinusoidal oscillations","generates non sinusoidal waveforms","generates sustained oscillations at a constant amplitude and specific frequency","none of the above"],answer:2},{question:"In what ways, if any, can the environment be considered a security concern?",subject:"security_studies",choices:["Environmental security entails a consideration of the security of the global environment, as well as its nested sub-systems and social systems beyond the boundaries of the nation state.","Environmental security is a critical security project in that it questions who and what is to be secured and from what threat by orthodox security policies, or whether linkages between environmental, security and development issues can be made.","Environmental security is a practical endeavour to assess how environmental change causes violent conflict within and between countries, and the ways in which environmental security can undermine national security.","All of these options. The environment is both an object to be secured and a source of risk, although it may mean different things to different people. Whilst deepening the concept of security it has both critical and practical dimensions although the utility of the concept is contested."],answer:3},{question:"________ are a business ethics management tool that have grown over the last few decades. Areas which these typically cover are compliance, corruption and environmental issues. However, they are constantly evolving, with for example, the onus on __________ having grown in recent years.",subject:"business_ethics",choices:["Annual reports, Company financial performance","Annual report, Internet - social media and networking","Codes of ethics, Company financial performance","Codes of ethics, Internet - social media and networking"],answer:3},{question:"If an iron nucleus split in two, its fission fragments would have",subject:"conceptual_physics",choices:["less mass per nucleon","more mass per nucleon","the same mass per nucleon","either more or less mass per nucleon"],answer:1},{question:"In one metropolitan region, technical writers have an annual salary that is approximately normally distributed with a mean of $55,800. The first quartile of salaries is $48,815. What is the standard deviation?",subject:"high_school_statistics",choices:["$6,984 ","$10,356 ","$10,476 ","$13,968 "],answer:1},{question:"What is the communal meal offered at the place of worship called in Sikhism?",subject:"world_religions",choices:["Sangat","Langar","Gurdwara","Panth"],answer:1},{question:"For which of these two scenarios does the main character (who uses I/me/my) do something clearly morally wrong, according to ordinary moral standards in the US as of 2020? Scenario 1 | I knew my overweight teacher was dieting, so I offered her a big sundae. Scenario 2 | I found a wallet in the park and became its new owner.",subject:"moral_scenarios",choices:["Wrong, Wrong","Wrong, Not wrong","Not wrong, Wrong","Not wrong, Not wrong"],answer:0},{question:'A state law imposes penalties for "any public statement containing false or misleading information about a service or product." An airline falsely claimed in an advertisement that its competitor had an inferior safety record. The claim was based on erroneous information, found on the website of a nonprofit consumer advocacy group, that the airline assumed to be true. The airline was charged under the state law for making a false statement. No federal statute applies. Which of the following best supports the airline in a defense based on the First Amendment?',subject:"professional_law",choices:["Its statement about the safety record was made without malice.","Its statement about the safety record was protected noncommercial speech.","The state law is a prior restraint.","The state law is overbroad."],answer:3},{question:"When Berger & Luckmann said that reality is socially constructed, they meant:",subject:"sociology",choices:["scientists are guided in their work by social values and interests, so they define and measure phenomena that will support their theories","people negotiate shared definitions of their situation and live according to these, often forgetting that these social worlds are not fixed and external","sociologists decide what constitutes social reality and measure only that","terms like 'reality' have no deeper meaning beyond the level of discourse"],answer:1},{question:"If c > 0 and f(x) = e^x - cx for all real numbers x, then the minimum value of f is",subject:"college_mathematics",choices:["f(c)","f(e^c)","f(1/c)","f(log c)"],answer:3},{question:"These factors increase risk of osteoporotic fracture:",subject:"nutrition",choices:["High bone mineral density","High body weight","High lean mass","Poor muscle strength"],answer:3},{question:"To prevent desiccation and injury, the embryos of terrestrial vertebrates are encased within a fluid secreted by the",subject:"college_biology",choices:["amnion","chorion","allantois","yolk sac"],answer:0},{question:"Let A be a finite set with m elements, and let B be a finite set with n elements. The number of distinct functions mapping A into B is",subject:"college_computer_science",choices:["n^m","n!/(n - m)!","n!","n!/(m!(n - m)!)"],answer:0},{question:"A disk of radius 0.1 m initially at rest undergoes an angular acceleration of 2.0 rad/s^2. If the disk only rotates, find the total distance traveled by a point on the rim of the disk in 4.0 s.",subject:"high_school_physics",choices:["0.4 m","0.8 m","1.2 m","1.6 m"],answer:3},{question:"Identify the only construct that is not pertinent to developmental models on intelligence:",subject:"professional_psychology",choices:["Investment theory","The positive manifold","G theory","Primary mental ability theory"],answer:0},{question:"Which of the following statements does NOT accurately describe voting behavior in the United States?",subject:"high_school_government_and_politics",choices:["Registered voters between the ages of 35 and 45 are more likely to vote than are those under the age of 21.","A registered voter who has attained his or her General Educational Development (GED) is less likely to vote than a high school dropout.","Registered voters are more likely to vote in general elections than they are in primary elections.","More women than men have voted in every presidential election since 1980."],answer:1},{question:"For which of these two scenarios does the main character (who uses I/me/my) do something clearly morally wrong, according to ordinary moral standards in the US as of 2020? Scenario 1 | When I checked out from the hotel I turned in the dirty towels. Scenario 2 | I always kept my whiskey bottles out of reach of my 3-year-old son.",subject:"moral_scenarios",choices:["Wrong, Wrong","Wrong, Not wrong","Not wrong, Wrong","Not wrong, Not wrong"],answer:3},{question:`A state imposes a graduated income tax upon net income calculated under federal law. Section 22 of the city's reform act of 2010, which is to become effective on January 1, 2010, provides: "Any parent or guardian financially responsible for the education of his ward may claim a direct tax credit against his income tax liability equal to the amount of tuition of a child or children of high school age who does not attend a public high school. " Other provisions define "tuition" very broadly but limit the credit to tuition paid to schools meeting the educational requirements as determined by the state. On December 1, 2009, the parents of two students who attend a public high school in the state sue for a declaratory judgment and injunction in federal court, claiming that Section 22 violates the establishment clause of the First Amendment. The federal court will most likely`,subject:"professional_law",choices:["dismiss the action, because the suit involves a political question.","dismiss the action, because the plaintiffs lack standing as taxpayers.","dismiss the action, because the issues are not ripe.","dismiss the action, because the issues being litigated are moot."],answer:2},{question:`A member of the president's cabinet is said to have "gone native" when that cabinet member`,subject:"high_school_government_and_politics",choices:["resigns to take a position as a consultant to lobbying groups","cedes control of his or her department to lifelong bureaucrats within the department","places his or her department's priorities above the president's","accepts bribes or expensive favors from businesses regulated by his or her department"],answer:2},{question:"Order the following (risk, return) pairs from least to most favourable, assuming the perspective of a rational and risk-averse investor: (2,2),(2,3) and (4,2). Risk is measured in standard deviations and return in percentage. HINT: Imagine a scatter diagram with standard deviation on the x-axis and return on the y-axis.",subject:"professional_accounting",choices:["(4,2),(2,2),(2,3)","(2,2),(2,3),(4,2)","(2,2),(4,2),(2,3)","(2,3),(2,2),(4,2)"],answer:0},{question:"What is the main reason why many Critical Race Theorists are hostile to concepts such as 'justice', 'neutrality', and 'truth'?",subject:"jurisprudence",choices:["Because of their vagueness.","Because they have failed to produce racial justice.","Because they are unrelated to contemporary conditions.","Because these ideas are alien to most people of colour."],answer:1},{question:"What is personal (ratione personae) immunity?",subject:"international_law",choices:["Personal immunity is afforded to all physical persons","Personal immunity is that which is afforded in a personal capacity and hence does not cover conduct of the State as such","Personal immunity is afforded only to particular persons irrespective if their conduct was undertaken in a private or public capacity","Personal immunity is afforded to State officials for conduct undertaken in a public capacity"],answer:2},{question:"Who is an 'injured State' in the law of international responsibility?",subject:"international_law",choices:["A State is 'injured' in case that it has suffered a damage from the internationally wrongful conduct","A State is 'injured' in cases that there has been a violation of a peremptory norm of international law","A State is 'injured' should it acknowledge the existence of the internationally wrongful conduct","A State is 'injured' if the obligation breached was owed to it individually or if it was owed to a group of States, including that State, and it was specially affected"],answer:3},{question:"A national association brought suit in federal court against a city. The suit charged the city with violating several federal statutes. During the trial, the association's attorney called the city attorney as an adverse witness. The city attorney asserted the attorney-client privilege and objected that the matters communicated to him were intended to be confidential. The issues raised by the objections of the city attorney should be resolved under",subject:"professional_law",choices:["federal privilege law.","the privilege law of the forum state.","either federal privilege law or the privilege law of the forum state as determined by the court.","either federal privilege law or the privilege law of the forum state, whichever the court determines is more likely to admit the evidence."],answer:0},{question:"There are three main types of buying situations in an organization, referred to by Robinson, Faris, and Wind (1967) as _____________.",subject:"marketing",choices:["Repeat purchases.","Buyphases.","Buyclasses.","Tenders."],answer:2},{question:"For which of these two scenarios does the main character (who uses I/me/my) do something clearly morally wrong, according to ordinary moral standards in the US as of 2020? Scenario 1 | My mom asked me to deep clean the bath so I covered it in bleach. Scenario 2 | For the funeral, I wore my clown costume to honor the dead.",subject:"moral_scenarios",choices:["Wrong, Wrong","Wrong, Not wrong","Not wrong, Wrong","Not wrong, Not wrong"],answer:2},{question:"A ________ campaign occurs when people from two or more opposing sides of an argument have emotional convictions about a decision that has the power to impact their lives.",subject:"public_relations",choices:["public relations","public issues","crisis management","consumer relations"],answer:1},{question:`One afternoon a motorist was driving her car when she struck a pedestrian who entered the intersection. The pedestrian was seriously injured in the accident and sued the motorist to recover damages for personal injuries. There were no witnesses to the accident. The motorist claims that the traffic light was green at the time she entered the intersection. The pedestrian now has amnesia and cannot remember how the accident occurred. At trial, the pedestrian's attorney calls a witness to testify. The witness proposes to testify that she was in the emergency room at the hospital when the pedestrian was brought in following the accident. The witness further testifies that while the pedestrian was being treated for his injuries, the nurse asked him, "How did you get hurt?" The pedestrian replied, "The car ran the red light and struck me as I was walking through the intersection. "Upon objection, this evidence is`,subject:"professional_law",choices:["admissible as a statement made for purposes of medical treatment and diagnosis.","admissible as a present sense impression.","inadmissible, because the witness was eavesdropping on a confidential communication between the pedestrian and a hospital representative.","inadmissible, because it is hearsay not within any recognized exception."],answer:3},{question:"Which of the following samples would be considered most representative of male college students?",subject:"high_school_psychology",choices:["A group of thirty fraternity brothers from Penn State","A random sample taken between classes in the business wing of various universities","Sixty male members of each class from Princeton, Yale, Harvard, Dartmouth, and Columbia","Twenty male members of each class from a cross-section of colleges and universities"],answer:3},{question:"Which statement below is the least likely to follow logically from Dworkin's notion of law as integrity?",subject:"jurisprudence",choices:["It is likely to generate more individual rights and greater liberty.","It renders a community more genuine.","It opens the door to authoritarianism.","It improves the moral justification for the exercise of political power."],answer:2},{question:"X-chromosome inactivation",subject:"medical_genetics",choices:["results in genetically turning off one of the two X chromosomes in female mammals","takes place in humans so that the same X chromosome is inactive in all of the cells of a female","is the cause of the Y chromosome being genetically inactive","occurs in fruit flies but not in mammals"],answer:0},{question:"In the fetus, the ductus arteriosus passes blood from the",subject:"anatomy",choices:["pulmonary vein to the aorta.","aorta to pulmonary vein.","pulmonary artery to the aorta.","aorta to the pulmonary artery."],answer:2},{question:"The follicular phase is to the __________ as the luteal phase is to the secretory phase.",subject:"human_sexuality",choices:["postovulatory","menstrual","proliferative","myometrial"],answer:2},{question:"Buffer-overflow may remain as a bug in apps if __________ are not done fully.",subject:"computer_security",choices:["boundary hacks","memory checks","boundary checks","buffer checks"],answer:2},{question:`Let T be a depth-first search tree of a connected undirected graph G. For each vertex v of T, let pre(v) be the number of nodes visited up to and including v during a preorder traversal of T, and post(v) be the number of nodes visited up to and including v during a postorder traversal of T. The lowest common ancestor of vertices u and v in T is a vertex w of T such that w is an ancestor of both u and v, and no child of w is an ancestor of both u and v. Let (u, v) be an edge in G that is not in T, such that pre(u) < pre(v). Which of the following statements about u and v must be true?
7
+ I. post(u) < post(v)
8
+ II. u is an ancestor of v in T.
9
+ III. If w is the lowest common ancestor of u and v in T, then w = u.`,subject:"college_computer_science",choices:["I only","II only","III only","II and III"],answer:3},{question:`This question refers to the following information.
10
+ Every two months His Majesty sends from Lima 60,000 pesos to pay for the mita of the Indians. Up on the Huanacavelica range there are 3,000 or 4,000 Indians working in the mercury mine, with picks and hammers, breaking up the ore. And when they have filled up their little sacks, the poor fellows, loaded down, climb up those ladders and rigging, so distressing that a man can hardly get up them. That is the way they work in this mine, with many lights and the loud noise of the pounding and great confusion. Nor is that the greatest evil; that is due to thievish and undisciplined superintendents. According to His Majesty's warrant, the mine owners at Potos\xED have a right to the mita of 13,300 Indians. These mita Indians earn each day 4 reals. Besides these there are others not under obligation, who hire themselves out voluntarily: these each get from 12 to 16 reals, and some up to 24, according to how well they wield their picks or their reputation for knowing how to get the ore out.
11
+ Antonio Vasquez de Espinosa, report on mining in Huanacavelica and Potos\xED, 1620s
12
+ The third principal reason the local Yakut and Tungus natives are ruined is that from the time they first came under Russian control, they have been forced to pay yasak tribute. Some have paid in sables, others in red foxes, still others in cash. At first there were plenty of furbearing animals there, but now there are no sables and not many foxes in those lands, from the shores of the Arctic Ocean all the way south to the great Lena River. Moreover, almost half the natives cannot hunt because they no longer have horses, many of which have been pawned to the yasak collectors.
13
+ Heinrich von F\xFCch, "On the Treatment of Natives in Northeast Siberia," 1744
14
+ Both passages are best seen in the context of which of the following broad developments?`,subject:"high_school_world_history",choices:["Emerging systems of coerced labor","The expansion of chattel slavery","Increased reliance on prison-camp workforces","Colonization of overseas territories by joint-stock companies"],answer:0},{question:"A soccer team has $90.00 to buy soccer balls. If one soccer ball costs $15.60, what is the greatest number of soccer balls the team can buy?",subject:"elementary_mathematics",choices:["4","5","6","7"],answer:1},{question:"Current estimates of how many people exercise on a regular basis suggest that _____ do",subject:"human_aging",choices:["Less than 50%","More than 75%","Less than 25%","More than 50%"],answer:0},{question:"An object carries a charge of \u20131 C. How many excess electrons does it contain?",subject:"high_school_physics",choices:["6.25 \xD7 10^18","8.00 \xD7 10^18","1.60 \xD7 10^19","3.20 \xD7 10^19"],answer:0},{question:"According to Socrates, it is important that we discover what makes a particular action (e.g., a merciful or just act) the kind of action that it is, because without such knowledge:",subject:"philosophy",choices:["no one in society will ever do any action that really is merciful or just, only those actions that they think are merciful or just.","the primary purpose of human existence--which is to think and to know--is replaced by a focus on morality (acting and doing).","we can refer only to how people characterize actions without knowing why such actions should be characterized that way.","there would be no way to distinguish one kind of action (e.g., a merciful action) from another kind of action (e.g., a just action)."],answer:2},{question:"A woman leased a condo from the owner for a period of one year. After six months, the owner gave the woman a written option to purchase the condo for $100,000 before the expiration of the lease. With the owner's approval, the woman spent $10,000 to have the kitchen remodeled to her personal specifications. One month before the end of the lease, the owner notified the woman that he was revoking the option to purchase the condo. One week later, the woman delivered a written notice of acceptance of the option, but the owner refused to sell. If the woman initiates suit for breach of contract, which of the following is her strongest argument that an enforceable contract was formed between her and the owner?",subject:"professional_law",choices:["Because the woman had until the expiration of the lease to accept the offer, the owner's revocation would be ineffective.","Because the owner was a merchant, the written offer was irrevocable for a period not exceeding three months.","Because the owner's offer invited a return promise as acceptance, the woman manifested her intent to accept by remodeling the kitchen.","After the woman paid to have the kitchen remodeled, an option contract resulted, because the owner knew the woman was relying on the offer to her detriment."],answer:3},{question:"What does the presence of discouraged workers do to the measurement of the unemployment rate?",subject:"high_school_macroeconomics",choices:['Discouraged workers are counted as "out of the labor force" thus the unemployment rate is understated making the economy look stronger than it is.','Discouraged workers are counted as "out of the labor force" thus the unemployment rate is understated making the economy look weaker than it is.',"Discouraged workers are not surveyed so there is no impact on the unemployment rate.",'Discouraged workers are counted as "unemployed" thus the unemployment rate is understated making the economy look stronger than it is.'],answer:0},{question:"In the film 'The Talented Mr Ripley' who plays Mr Ripley?",subject:"miscellaneous",choices:["Jude Law","Matt Damon","Dustin Hoffman","Ben Affleck"],answer:1},{question:"Which of the following allows gas exchange in the lungs?",subject:"anatomy",choices:["Alveoli","Bronchi","Bronchioles","Capillaries"],answer:0},{question:"Anscombe criticizes as absurd Kant\u2019s idea of:",subject:"philosophy",choices:["the thing in itself.","the categorical imperative.","the phenomenal self.","legislating for oneself."],answer:3},{question:"Select the best translation into predicate logic. Some firefighters rescue victims from danger. (Dx: x is danger; Fx: x is a firefighter; Vx: x is a victim; Rxyz: x rescues y from z)",subject:"formal_logic",choices:["(\u2203x){Fx \u2022 (\u2200y)[Dy \u2283 (\u2203z)(Vz \u2022 Rxyz)]}","(\u2203x){Fx \u2022 (\u2203y)[Vy \u2022 (\u2203z)(Dz \u2022 Rxyz)]}","(\u2203x){Fx \u2022 (\u2203y)(\u2203z)[(Vy \u2022 Dz) \u2022 Rxzy]}","(\u2200x){Fx \u2283 (\u2203y)[Vy . (\u2203z)(Dz \u2022 Rxyz)]}"],answer:1},{question:"During a clinical study examining the effects of exercise, men between the ages of 20 and 30 years are evaluated during a 15- minute session on a treadmill. The average pulse for the last 2 minutes of the session is 175/min. During the last minute of exercise, various measurements are taken. Compared with the measurement before the session, which of the following is most likely to be decreased?",subject:"professional_medicine",choices:["Pulse pressure","Stroke volume","Systolic blood pressure","Total peripheral resistance"],answer:3},{question:"Which of the following was described as \u201Cthe slow agency of existing causes\u201D?",subject:"prehistory",choices:["natural selection","catastrophism","uniformitarianism","unilineal evolution"],answer:2},{question:"A car gets 24 miles per gallon of gasoline (mi/gal). How many gallons of gasoline would the car need to travel 144 miles?",subject:"elementary_mathematics",choices:["6.5 gallons","6 gallons","5.5 gallons","5 gallons"],answer:1},{question:"A school psychologist is providing feedback to a student's parents regarding the student's performance on a measure of academic achievement. To explain the concept of grade equivalent, the school psychologist should explain that it is",subject:"high_school_psychology",choices:["the average score on that measure obtained by students in a given grade","the average score on that measure obtained by students at a given age","the grade in which a student should be placed in school","utilized to determine accountability among peers"],answer:0},{question:"Global and regional international trade agreements work by using which of the following mechanisms?",subject:"us_foreign_policy",choices:["Reciprocity across multiple issues","Reputational concerns of the actors","Side payments for adjusting to the organization (such as the Common Agricultural Policy in the EU)","ALL of the above"],answer:3},{question:"When did Mohenjo-daro develop into a complex urban center?",subject:"prehistory",choices:["during the Early Shang Dynasty, from 1,000 to 400 B.P.","during the Qin Dynasty, from 3,500 to 3,000 B.P.","during the Mature Harappan period, from 4,500 to 4,000 B.P.","during the Early Harappan period, from 8,500 to 6,000 B.P."],answer:2},{question:'The Traditional Religion Advocacy Party (TRAP) has successfully lobbied the State of Texarkana for a statute named "Equal Rights for All Religions." The law requires broadcasters that air segments discussing Christianity to allow equal time for segments on Judaism, Islam, Hinduism, and Buddhism. The American Atheism Association (AAA) has put together a broadcast segment about atheism, rejecting all religions, but four of the five Texarkana stations have declined to air the segment because they believe it would violate the statute. AAA has filed suit against the state, challenging the constitutionality of the statute. What is the strongest argument AAA can make in support of striking down the Equal Rights for All Religions statute?',subject:"professional_law",choices:["The First Amendment prohibits government interference with freedom of the press.","The fact that the statute involves only broadcast media and not print media is an Equal Protection violation.","The First Amendment prohibits government interference with the free exercise of religion.","The statute is not narrowly tailored to promote a compelling governmental interest."],answer:3},{question:"Adaptive thermogenesis refers to:",subject:"nutrition",choices:["A decrease in heat loss when exposed to cold","A decrease in non-shivering thermogenesis when exposed to cold","An increase in basal metabolic rate that is not fully explained by a change in body composition during chronic overfeeding","A decrease in spontaneous physical activity during chronic overfeeding."],answer:2},{question:"In all of her relationships Helen is typically uncomfortable feeling close to another person or having that person feel close to her. According to attachment theory Helen would best be described as:",subject:"human_sexuality",choices:["a secure lover","an avoidant lover","an anxious-ambivalent lover","a passionate lover"],answer:1},{question:"In primates, the location of which of the following determines if it is a quadruped or biped?",subject:"prehistory",choices:["the feet","the skull","the foramen magnum","the ulna"],answer:2},{question:"What is the meaning of collective security?",subject:"international_law",choices:["The right to self-defence by more than one nation acting in concert","The right of one's allies to defend the victim State","The authorisation of armed force by the UN Security Council","The authorisation of peacekeeping missions by the UN General Assembly"],answer:2},{question:"In the comic strip 'Peanuts' what is Schroeder known for doing?",subject:"miscellaneous",choices:["Dancing","playing football","playing the piano","Flying an imaginary plane"],answer:2},{question:"A writer's latest novel created a debate among critics regarding whether the sexual references and the graphic practices in the book made it obscene. While the publisher was readying the book for distribution, the head of a state commission for morality contacted her to tell her that the book was obscene and that she should collect all copies and turn them over for seizure by the government. He also advised that the commission was putting the book on a list of obscene works that retailers should not handle. She responded that dozens of retailers already had the book for an opening day promotion. The commission seized all of the books from the retailers and destroyed them, without any due process procedural safeguards to the author or the publisher. The author and publisher appealed the case and eventually received a writ of certiorari issued by the U.S. Supreme Court. Will the Court uphold the procedure that was used to declare the book obscene and to restrain its distribution?",subject:"professional_law",choices:["Yes, if the authorities determine the book to be obscene, then they may seize and prevent its prospective distribution for the protection of the public.",'Yes, the determination of obscenity can be made prior to publication because the local authorities have a right to determine the local "community morals" standard.',"No, the state must first give the publisher and author a preliminary hearing before a magistrate to get a determination if the book is obscene.","No, the state cannot exercise prior restraint over published material because that has a chilling effect on free speech; a full judicial determination, with a criminal trial, is required before there can be a finding of a work being obscene."],answer:3},{question:`This question refers to the following information.
15
+ "But you, my dear Pangloss," said Candide, "how can it be that I behold you again?"
16
+ "It is true," said Pangloss, "that you saw me hanged&\u2026.A surgeon purchased my body, carried home, and dissected me. He began with making a crucial incision on me from the navel to the clavicula. One could not have been worse hanged than I was. The executioner of the Holy Inquisition was a sub-deacon, and knew how to burn people marvellously well, but he was not accustomed to hanging. The cord was wet and did not slip properly, and besides it was badly tied; in short, I still drew my breath, when the crucial incision made me give such a frightful scream that my surgeon fell flat upon his back&\u2026[At length he] sewed up my wounds; his wife even nursed me. I was upon my legs at the end of fifteen days&\u2026.
17
+ One day I took it into my head to step into a mosque, where I saw an old Iman and a very pretty young devotee who was saying her paternosters&\u2026.She dropped her bouquet; I picked it up, and presented it to her with a profound reverence. I was so long in delivering it that the Iman began to get angry, and seeing that I was a Christian he called out for help. They carried me before the cadi, who ordered me a hundred lashes on the soles of the feet and sent me to the galleys. I was chained to the very same galley and the same bench as the young Baron. On board this galley there were four young men from Marseilles, five Neapolitan priests, and two monks from Corfu, who told us similar adventures happened daily. The Baron maintained that he had suffered greater injustice than I&\u2026.We were continually disputing, and received twenty lashes with a bull's pizzle when the concatenation of universal events brought you to our galley, and you were good enough to ransom us."
18
+ "Well, my dear Pangloss," said Candide to him, "when you had been hanged, dissected, whipped, and were tugging at the oar, did you always think that everything happens for the best?"
19
+ "I am still of my first opinion," answered Pangloss, "for I am a philosopher and I cannot retract, especially as Leibnitz could never be wrong; and besides, the pre-established harmony is the finest thing in the world, and so is his plenum and materia subtilis."
20
+ Voltaire, French Enlightenment writer, Candide, 1759
21
+ The themes of the passage and the mode in which Pangloss tells them show the influence of`,subject:"high_school_european_history",choices:["Medievalism","Empiricism","Rationalism","Romanticism"],answer:2},{question:"Which of the following is the symplastic pathway for the movement of sucrose from the site of photosynthesis in mesophyll cells into the phloem?",subject:"college_biology",choices:["Fibers, phloem parenchyma, companion cell, sieve tube","Phloem parenchyma, fibers, bundle sheath, tracheids","Companion cells, phloem parenchyma, fibers, sieve tube","Bundle sheath, phloem parenchyma, companion cell, sieve tube"],answer:3},{question:"A 45-year-old man comes to the physician because of right shoulder pain that began after he chopped wood 2 days ago. Examination of the right upper extremity shows no obvious bone deformities or point tenderness. The pain is reproduced when the patient is asked to externally rotate the shoulder against resistance; there is no weakness. In addition to the teres minor, inflammation of which of the following tendons is most likely in this patient?",subject:"professional_medicine",choices:["Infraspinatus","Pectoralis","Subscapularis","Supraspinatus"],answer:0},{question:`Use the following key to translate the given formula of PL to natural, English sentences.
22
+ A: Marina reads a Percy Jackson book.
23
+ B: Izzy plays Minecraft.
24
+ C: Emily stops working.
25
+ D: Russell makes dinner.
26
+ E: Ashleigh stops by.
27
+ ~C \u2228 D`,subject:"formal_logic",choices:["If Emily doesn't stop working then Russell makes dinner.","Emily stops working unless Russell makes dinner.","Emily stops working unless Russell doesn't make dinner.","Emily doesn't stop working unless Russell makes dinner."],answer:3},{question:"The weight percent of sodium hydroxide dissolved in water is 50%. What is the mole fraction of sodium hydroxide?",subject:"high_school_chemistry",choices:["31.00%","0.164","0.311","0.5"],answer:2},{question:"In a certain region, the electric field varies with the radius away from origin by the equation Er = \u20136r^2 + 4r + 3, where r is given in meters and E in N/C. The potential difference between the origin and the point (3, 4) is",subject:"high_school_physics",choices:["\u2013165 V","\u2013120 V","64 V","185 V"],answer:3}];var Y=[{s1:"A girl is styling her hair.",s2:"A girl is brushing her hair.",score:2.5},{s1:"A group of men play soccer on the beach.",s2:"A group of boys are playing soccer on the beach.",score:3.6},{s1:"One woman is measuring another woman's ankle.",s2:"A woman measures another woman's ankle.",score:5},{s1:"A man is cutting up a cucumber.",s2:"A man is slicing a cucumber.",score:4.2},{s1:"A man is playing a harp.",s2:"A man is playing a keyboard.",score:1.5},{s1:"A woman is cutting onions.",s2:"A woman is cutting tofu.",score:1.8},{s1:"A man is riding an electric bicycle.",s2:"A man is riding a bicycle.",score:3.5},{s1:"A man is playing the drums.",s2:"A man is playing the guitar.",score:2.2},{s1:"A man is playing guitar.",s2:"A lady is playing the guitar.",score:2.2},{s1:"A man is playing a guitar.",s2:"A man is playing a trumpet.",score:1.714},{s1:"A man is playing a guitar.",s2:"A man is playing a trumpet.",score:1.714},{s1:"A man is cutting an onion.",s2:"A man cuts an onion.",score:5},{s1:"A man is cycling.",s2:"A man is talking.",score:.6},{s1:"A man is slicing open a fish.",s2:"A man is cutting up a fish.",score:4.4},{s1:"A man is slicing a tomato.",s2:"A man is slicing a bun.",score:2},{s1:"A man is playing a guitar.",s2:"A man is playing a keyboard.",score:1.8},{s1:"A baby panda goes down a slide.",s2:"A panda slides down a slide.",score:4.4},{s1:"A man is singing and playing a guitar.",s2:"A man is playing a guitar.",score:3.6},{s1:"A man attacks a woman.",s2:"A man slaps a woman.",score:3.6},{s1:"A man is driving a car.",s2:"A man is riding a horse.",score:1.2},{s1:"A woman is cutting tofu.",s2:"A woman is cutting an onion.",score:2.4},{s1:"The woman is styling her hair.",s2:"The woman is slicing herbs.",score:.2},{s1:"Two zebras play in an open field.",s2:"Two zebras are playing in a field.",score:4.2},{s1:"A man is cutting a potato.",s2:"A man is slicing some potato.",score:4.4},{s1:"A man is slicing an onion.",s2:"A woman is slicing a pumpkin.",score:2.25},{s1:"A man is dancing.",s2:"A man and woman is dancing.",score:2},{s1:"A man is riding a motorcycle.",s2:"A woman is riding a horse.",score:.75},{s1:"A woman is slicing garlics.",s2:"A woman is slicing an onion.",score:2.2},{s1:"A man is speaking.",s2:"A man is cooking.",score:.8},{s1:"A little boy is singing and playing a guitar.",s2:"A man is singing and playing the guitar.",score:2.2},{s1:"A turtle is swimming in water.",s2:"A turtle is walking underwater.",score:3.2},{s1:"A young woman is putting stickers all over her face.",s2:"A woman is applying stickers to her face.",score:4.8},{s1:"A woman is wrapping tofu.",s2:"A woman is balling dough.",score:1.4},{s1:"A cat is eating some corn.",s2:"A cat is eating corn on the cob.",score:4.25},{s1:"A man is eating a food.",s2:"A man is eating a piece of bread.",score:3.4},{s1:"A man is playing a guitar.",s2:"A man is eating pasta.",score:.533},{s1:"A man is kicking pots of water.",s2:"A man is picking flowers.",score:.4},{s1:"A man is cutting a pipe with scissors.",s2:"A man is cutting carpet with a knife.",score:1.2},{s1:"A woman is dancing in the rain.",s2:"A woman dances in the rain out side.",score:5},{s1:"A woman is taking a bath.",s2:"A woman is riding a horse.",score:.538},{s1:"A man mixes vegetables in a pot.",s2:"A person is stirring vegetables in a pot.",score:3.75},{s1:"A woman is talking on a cell phone.",s2:"A man and woman are talking on the phone.",score:3},{s1:"A man is playing a guitar.",s2:"A man is singing while playing the guitar.",score:3.6},{s1:"A man is playing a guitar.",s2:"A man is driving a car.",score:.5},{s1:"A man is cutting apple by his hand.",s2:"A man is cutting carpet with a knife.",score:1.5},{s1:"A man is opening a door.",s2:"A man is cutting an onion.",score:.8},{s1:"A man is slicing a tomato.",s2:"A man is riding a horse.",score:.8},{s1:"A man is cutting paper with a sword.",s2:"A woman is cutting a tomato.",score:.6},{s1:"A boy studies a calendar.",s2:"A boy is looking at a calendar.",score:4.4},{s1:"The ballerina is dancing.",s2:"A man is dancing.",score:1.75},{s1:"A woman is dancing.",s2:"A woman is playing violin.",score:.4},{s1:"A woman is slicing some tomatoes.",s2:"A woman is chopping a potato.",score:1.4},{s1:"A woman is water skiing.",s2:"A woman is slicing fish.",score:.4},{s1:"A man is playing a flute.",s2:"A man is riding a scooter.",score:.8},{s1:"A man is playing the piano.",s2:"A man played the guitar.",score:2},{s1:"A woman is picking a can.",s2:"A man is playing a guitar.",score:.133},{s1:"A man puts three pieces of meat into a pan.",s2:"A man is putting meat in a pan.",score:4},{s1:"A woman is cutting an onion.",s2:"A woman is cleaning a garden.",score:.267},{s1:"Some men are sawing.",s2:"Men are sawing logs.",score:3.4},{s1:"A car is driven down the road.",s2:"A girl is walking down a road.",score:1.2},{s1:"The man is kissing and hugging the woman.",s2:"A man is hugging and kissing a woman.",score:5},{s1:"A train is moving.",s2:"A man is doing yoga.",score:0},{s1:"Someone is slicing an onion.",s2:"A woman is cutting onion.",score:3.8},{s1:"A woman is playing in the ocean.",s2:"A woman is preparing shrimp to cook.",score:.75},{s1:"A person is playing an electronic keyboard.",s2:"A kid is playing keyboard.",score:3.4},{s1:"A man is holding a leaf.",s2:"A monkey is fighting a man.",score:0},{s1:"A woman is peeling shrimp.",s2:"A man is squeezing water.",score:.2},{s1:"A man is sitting and smoking.",s2:"A man is smoking a cigarette.",score:4},{s1:"A man is playing a guitar.",s2:"A woman is riding a horse.",score:.5},{s1:"A man is standing in front of the window and looking outside.",s2:"A man is staring out the window.",score:3.8},{s1:"A skunk is looking here and there.",s2:"A skunk looks at the camera.",score:2.4},{s1:"A man is playing the guitar and singing.",s2:"A man sings with a guitar.",score:4.75},{s1:"A woman opens a window.",s2:"A man is crawling.",score:0},{s1:"People are dancing outside.",s2:"A group of people are dancing.",score:3.75},{s1:"The man is using a camera to hammer a nail.",s2:"Someone is banging a camera lense against a nail.",score:2.6},{s1:"A woman is filing her nails.",s2:"A man is peeling a carrot.",score:0},{s1:"A boy is crawling into a dog house.",s2:"A boy is playing a wooden flute.",score:.75},{s1:"A woman is swimming underwater.",s2:"A man is slicing some carrots.",score:0},{s1:"A machine is sharpening a pencil.",s2:"The machine shaved the end of the pencil.",score:3.8},{s1:"A monkey is playing drums.",s2:"A gorilla plays the drums.",score:2.8},{s1:"A man is opening a box and taking out paper.",s2:"A woman is peeling a potato.",score:0},{s1:"A woman is dancing.",s2:"A woman plays the clarinet.",score:.8},{s1:"A person is drawing on a large touchscreen.",s2:"A man is drawing on a digital dry erase board.",score:3},{s1:"The men played follow the leader on the grass.",s2:"The rhino grazed on the grass.",score:1},{s1:"A woman is cracking eggs.",s2:"A man is talking to a woman.",score:0},{s1:"A woman peels garlic with her hands.",s2:"The woman is slicing herbs.",score:1},{s1:"The polar bears fought over the kill.",s2:"Polar bears are fighting each other.",score:3.4},{s1:"A man is doing trick with play cards.",s2:"A man is performing a card trick.",score:5},{s1:"The cat is licking a bottle.",s2:"A cat plays with a small bottle.",score:2.333},{s1:"A person is slicing an onion.",s2:"A person cuts ginger.",score:1.4},{s1:"A person is peeling a potato with a potato peeler.",s2:"A man is cutting tomatoes with a cleaver.",score:.75},{s1:"Two women are dancing and singing in front of a crowd.",s2:"The women are singing and dancing.",score:3.538},{s1:"A man is seasoning some carrots.",s2:"A woman is slicing garlic.",score:.8},{s1:"Two men pushed carts through the woods.",s2:"Two men are pushing carts.",score:3.5},{s1:"A man is playing a football.",s2:"A man is maneuvering a soccer ball with his feet.",score:2},{s1:"The lady peeled the potatoe.",s2:"A woman is peeling a potato.",score:4.75},{s1:"A woman is slicing some tofu.",s2:"A woman is cutting a block of tofu into small cubes.",score:4},{s1:"Someone typed on a keyboard.",s2:"Someone is typing.",score:4.5},{s1:"Three young men run, jump, and kick off of a Coke machine.",s2:"Three men are jumping off a wall.",score:1.5},{s1:"A young Asian girl is applying eyeliner.",s2:"A girl is putting on eye makeup.",score:2.4}];var he=["A","B","C","D"];function me(e){let t=e.choices.map((o,n)=>`${he[n]}. ${o}`).join(`
28
+ `);return `The following is a multiple choice question about ${e.subject.replace(/_/g," ")}.
29
+
30
+ ${e.question}
31
+ ${t}
32
+
33
+ Answer with only the letter (A, B, C, or D) of the correct choice.
34
+ Answer:`}function pe(e,t){let o=e.trim(),n=o.match(/(?:^|answer\s*(?:is)?\s*[:-]?\s*)\(?([ABCD])\)?(?=[\s.,)!]|$)/i);if(n)return he.indexOf(n[1].toUpperCase());let s=o.toLowerCase();for(let r=0;r<t.length;r++)if(s.startsWith(t[r].toLowerCase().slice(0,Math.max(8,t[r].length))))return r;return null}async function Q(e,t,o){let n=K.slice(0,t),s=[],r=0;for(let a=0;a<n.length;a++){if(o?.abortSignal?.aborted)throw A();let i=n[a],c=await e.doGenerate({prompt:me(i),maxTokens:8,temperature:0,abortSignal:o?.abortSignal}),d=pe(c.text,i.choices)===i.answer?1:0;r+=d,s.push(d),o?.onProgress?.(a+1,n.length);}return {taskId:`tinymmlu-${t}`,score:n.length===0?0:r/n.length,n:n.length,details:s}}function Ve(e,t){let o=0,n=0,s=0;for(let a=0;a<e.length;a++)o+=e[a]*t[a],n+=e[a]*e[a],s+=t[a]*t[a];let r=Math.sqrt(n)*Math.sqrt(s);return r===0?0:o/r}async function J(e,t,o){let n=Y.slice(0,t),s=[],r=[];for(let a=0;a<n.length;a++){if(o?.abortSignal?.aborted)throw A();let i=n[a],{embeddings:c}=await e.doEmbed({values:[i.s1,i.s2],abortSignal:o?.abortSignal});s.push(Ve(c[0],c[1])),r.push(i.score),o?.onProgress?.(a+1,n.length);}return {taskId:`stsb-${t}`,score:s.length>=2?G(s,r):0,n:n.length,details:s.map(a=>Math.round(a*1e4)/1e4)}}async function He(e){let{policy:t,hooks:o,abortSignal:n}=e,s=new _;await s.attach(),s.record("suite-start",e.suite);let r=q(),a=[];try{o?.onPhase?.("environment");let i=await V({userReportedDevice:e.userReportedDevice});o?.onPhase?.("fingerprint"),k(n);let c=e.skipFingerprint?null:await H(),l=r!=="none"?await E():null,d=Ge(e.cells),m=e.cells.length,g=0;for(let u of d){k(n);let y=await Ke(u,{...e,trace:s,memApi:r,baselineMemory:l,cellIndexRef:()=>g++,totalCells:m});a.push(...y),s.record("cooldown-start"),await C(t.cooldownMs,n).catch(p=>{if(p.name==="AbortError")throw p}),t.pressureGate&&await Je(s,t.pressureGateTimeoutMs,n),s.record("cooldown-end");}s.record("suite-end");let h={protocol:x,schemaVersion:1,runId:Ze(),createdAt:new Date().toISOString(),harness:e.harness,suite:e.suite,environment:i,fingerprint:c,cells:a,events:[...s.all]};return h.clientSummaries=M(h,t.highVarianceCv),h}finally{await s.dispose();}}function Ge(e){let t=new Map;for(let o of e){let n=`${o.model.runtimeId}/${o.model.benchModelId}/${o.model.providerModelId}`,s=t.get(n);s||(s={key:n,model:o.model,workloads:[]},t.set(n,s)),s.workloads.push(o.workload);}return [...t.values()]}async function Ke(e,t){let{model:o}=e,n=o.task==="embedding",s=n?t.embedAdapters.get(o.runtimeId):t.llmAdapters.get(o.runtimeId),r=[],a=h=>({cellId:`${o.runtimeId}/${o.benchModelId}/${h.id}`,runtimeId:o.runtimeId,runtimeVersion:s?.runtimeVersion,model:o,workloadId:h.id,workloadKind:h.kind,resolvedBackend:"unknown",load:null,iterations:[],status:"skipped"});if(!s){for(let h of e.workloads){let u=a(h);u.invalidReasons=[`no adapter registered for ${o.runtimeId}`],r.push(P(u,t));}return r}let i=await s.isAvailable();if(!i.ok){for(let h of e.workloads){let u=a(h);u.invalidReasons=[`runtime unavailable: ${i.reason??"unknown"}`],r.push(P(u,t));}return r}let c=null,l=null,d,m=null;try{k(t.abortSignal);let h=await s.isModelCached(o),u=[],y=f(),p=`${o.runtimeId}/${o.benchModelId}/${e.workloads[0].id}`;c=await s.load(o,{abortSignal:t.abortSignal,onProgress:w=>{typeof w.pct=="number"&&(u.length===0||w.pct-u[u.length-1].pct>=2)&&u.push({t:f(),pct:Math.round(w.pct*100)/100}),t.hooks?.onLoadProgress?.(p,w.pct);}});let b=f();if(l={cached:h,startT:y,endT:b,progress:u.length>0?Xe(u,50):void 0,declaredBytes:o.sizeBytes},t.memApi!=="none"&&(m=await E()),t.policy.warmupRuns>0){let w=f();for(let I=0;I<t.policy.warmupRuns;I++)k(t.abortSignal),n?await c.model.doEmbed({values:["warmup probe"],abortSignal:t.abortSignal}):await ge(c.model,{prompt:"Reply with the single word: ready",maxTokens:4,temperature:0},t.abortSignal);d=f()-w;}}catch(h){if(h.name==="AbortError")throw c&&await B(c),h;for(let u of e.workloads){let y=a(u);y.status="error",y.load=l,y.error={name:h.name??"Error",message:h.message??String(h)},r.push(P(y,t));}return c&&await B(c),r}let g=false;for(let h of e.workloads){k(t.abortSignal);let u=a(h);u.resolvedBackend=c.resolvedBackend,g||(u.load=l,u.warmupMs=d,g=true);let y=t.cellIndexRef();t.hooks?.onCellStart?.(u.cellId,y,t.totalCells);try{switch(h.kind){case "llm-generate":await Ye(u,c,h,t);break;case "embed-single":case "embed-batch":await Qe(u,c,h,t);break;case "quality-mmlu":{let p=h.items;u.quality=await Q(c.model,p,{abortSignal:t.abortSignal,onProgress:b=>t.hooks?.onIteration?.(u.cellId,b,p)}),u.status="ok";break}case "quality-sts":{let p=h.items;u.quality=await J(c.model,p,{abortSignal:t.abortSignal,onProgress:b=>t.hooks?.onIteration?.(u.cellId,b,p)}),u.status="ok";break}}}catch(p){if(p.name==="AbortError")throw await B(c),p;u.status="error",u.error={name:p.name??"Error",message:p.message??String(p)};}if(t.memApi!=="none"&&u.status==="ok"){let p=await E(5e3);u.memory={api:t.memApi,baseline:t.baselineMemory??void 0,postLoad:m??void 0,postRun:p??void 0};}r.push(P(u,t));}if(await B(c),t.policy.measureWarmReload&&l?.cached===false)try{k(t.abortSignal);let h=f(),u=await s.load(o,{abortSignal:t.abortSignal}),y=f();await B(u);let p={cellId:`${o.runtimeId}/${o.benchModelId}/warm-reload`,runtimeId:o.runtimeId,runtimeVersion:s.runtimeVersion,model:o,workloadId:"warm-reload",workloadKind:"llm-generate",resolvedBackend:u.resolvedBackend,load:{cached:!0,startT:h,endT:y,declaredBytes:o.sizeBytes},iterations:[],status:"ok"};r.push(P(p,t));}catch(h){if(h.name==="AbortError")throw h}return r}async function Ye(e,t,o,n){let s=[];for(let a=0;a<n.policy.timedRuns;a++){k(n.abortSignal),n.hooks?.onIteration?.(e.cellId,a+1,n.policy.timedRuns);let i=[];n.trace.isHidden&&i.push("started-hidden");let c=U(n.trace),l=f(),{chunks:d,text:m,providerUsage:g,finishReason:h}=await ge(t.model,{prompt:o.prompt,systemPrompt:o.systemPrompt,maxTokens:o.maxTokens,temperature:o.temperature},n.abortSignal),u=f();U(n.trace)>c&&i.push("hidden-during-run"),s.push({startT:l,chunks:d,endT:u,text:m,providerUsage:g?{...g,fidelity:F[e.runtimeId]}:void 0,finishReason:h,gates:i});}e.iterations=s;let r=s.some(a=>a.gates.length>0);e.status=r?"invalid":"ok",r&&(e.invalidReasons=["validity gate fired during a timed region"]);}async function Qe(e,t,o,n){let s=[];for(let a=0;a<n.policy.timedRuns;a++){k(n.abortSignal),n.hooks?.onIteration?.(e.cellId,a+1,n.policy.timedRuns);let i=[];n.trace.isHidden&&i.push("started-hidden");let c=U(n.trace),l=f(),{embeddings:d}=await t.model.doEmbed({values:o.texts,abortSignal:n.abortSignal}),m=f();U(n.trace)>c&&i.push("hidden-during-run"),s.push({startT:l,endT:m,count:o.texts.length,dimensions:d[0]?.length??t.model.dimensions,gates:i});}e.iterations=s;let r=s.some(a=>a.gates.length>0);e.status=r?"invalid":"ok",r&&(e.invalidReasons=["validity gate fired during a timed region"]);}async function ge(e,t,o){let n=[],s="",r,a;if(e.doStream)for await(let i of e.doStream({...t,abortSignal:o})){let c=f();i.text.length>0&&(n.push({t:c,c:i.text.length}),s+=i.text),i.done&&(r=i.usage,a=i.finishReason);}else {let i=await e.doGenerate({...t,abortSignal:o}),c=f();s=i.text,n.push({t:c,c:i.text.length}),r=i.usage,a=i.finishReason;}return {chunks:n,text:s,providerUsage:r,finishReason:a}}function U(e){let t=0;for(let o of e.all)o.type==="visibility-hidden"&&t++;return t}async function Je(e,t,o){let n=f()+t;for(;f()<n;){let s=e.pressureState;if(s===void 0||s==="nominal"||s==="fair")return;await C(1e3,o);}}function Xe(e,t){if(e.length<=t)return e;let o=[],n=(e.length-1)/(t-1);for(let s=0;s<t;s++)o.push(e[Math.round(s*n)]);return o}function P(e,t){return t.hooks?.onCellFinish?.(e),e}async function B(e){try{await e.dispose();}catch{}}function k(e){if(e?.aborted)throw A()}function Ze(){let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID();let t=new Uint8Array(16);if(e?.getRandomValues)e.getRandomValues(t);else for(let n=0;n<16;n++)t[n]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let o=[...t].map(n=>n.toString(16).padStart(2,"0")).join("");return `${o.slice(0,8)}-${o.slice(8,12)}-${o.slice(12,16)}-${o.slice(16,20)}-${o.slice(20)}`}function fe(e){return X(e)}function X(e){if(e===null||typeof e=="number"||typeof e=="boolean"||typeof e=="string")return JSON.stringify(e);if(typeof e>"u")return "null";if(Array.isArray(e))return `[${e.map(t=>X(t)).join(",")}]`;if(typeof e=="object")return `{${Object.entries(e).filter(([,o])=>o!==void 0).sort(([o],[n])=>o<n?-1:o>n?1:0).map(([o,n])=>`${JSON.stringify(o)}:${X(n)}`).join(",")}}`;throw new TypeError(`canonicalJson: unsupported value type ${typeof e}`)}async function ye(e){let t=globalThis.crypto?.subtle;if(!t)throw new Error("Web Crypto (crypto.subtle) is not available in this environment");let o=new TextEncoder().encode(e),n=await t.digest("SHA-256",o);return [...new Uint8Array(n)].map(s=>s.toString(16).padStart(2,"0")).join("")}async function be(e){let{digest:t,...o}=e;return ye(fe(o))}async function et(e){return e.digest?await be(e)===e.digest:false}function ee(e){let t=e.environment,o=t.gpu.available?[t.gpu.vendor??"gpu",t.gpu.architecture].filter(Boolean).join("-"):"no-webgpu";return [t.os.platform.toLowerCase().replace(/\s+/g,"-"),o].join("/")}var ve=3;function tt(e,t=ve){let o=new Map;for(let s of e){let r=ee(s),a=s.clientSummaries??M(s),i=new Map(a.map(c=>[c.cellId,c]));for(let c of s.cells){if(c.status!=="ok")continue;let l=i.get(c.cellId);if(!l)continue;let d=[r,c.runtimeId,c.model.benchModelId,c.workloadId].join("|"),m=o.get(d);m||(m={row:{deviceClass:r,runtimeId:c.runtimeId,benchModelId:c.model.benchModelId,modelName:c.model.displayName,workloadId:c.workloadId,resolvedBackends:[],browsers:[],highVariance:false},ttft:[],decode:[],single:[],batch:[],loadCold:[],loadWarm:[],quality:[],runIds:new Set},o.set(d,m)),m.runIds.add(s.runId),we(m.row.resolvedBackends,c.resolvedBackend),we(m.row.browsers,s.environment.browser.name),m.row.highVariance||=l.highVariance,l.ttftMs&&m.ttft.push(l.ttftMs.median),l.decodeCharsPerSec&&m.decode.push(l.decodeCharsPerSec.median),l.singleLatencyMs&&m.single.push(l.singleLatencyMs.median),l.batchTextsPerSec&&m.batch.push(l.batchTextsPerSec.median),l.loadMs!==void 0&&(l.loadCached?m.loadWarm:m.loadCold).push(l.loadMs),l.qualityScore!==void 0&&m.quality.push(l.qualityScore);}}let n=[];for(let s of o.values())n.push({...s.row,submissions:s.runIds.size,ttftMs:S(s.ttft),decodeCharsPerSec:S(s.decode),singleLatencyMs:S(s.single),batchTextsPerSec:S(s.batch),loadColdMs:S(s.loadCold),loadWarmMs:S(s.loadWarm),qualityScore:S(s.quality),provisional:s.runIds.size<t});return n.sort((s,r)=>s.deviceClass.localeCompare(r.deviceClass)||s.benchModelId.localeCompare(r.benchModelId)||s.runtimeId.localeCompare(r.runtimeId)||s.workloadId.localeCompare(r.workloadId)),n}function we(e,t){t&&!e.includes(t)&&e.push(t);}function S(e){return e.length>0?T(O(e)):void 0}function T(e){return Math.round(e*100)/100}function Z(e){let t=e==null?"":String(e);return /[",\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}function nt(e){let o=[["deviceClass","runtimeId","benchModelId","modelName","workloadId","submissions","ttftMs","decodeCharsPerSec","singleLatencyMs","batchTextsPerSec","loadColdMs","loadWarmMs","qualityScore","resolvedBackends","browsers","highVariance","provisional"].join(",")];for(let n of e)o.push([n.deviceClass,n.runtimeId,n.benchModelId,n.modelName,n.workloadId,n.submissions,n.ttftMs,n.decodeCharsPerSec,n.singleLatencyMs,n.batchTextsPerSec,n.loadColdMs,n.loadWarmMs,n.qualityScore,n.resolvedBackends.join(";"),n.browsers.join(";"),n.highVariance,n.provisional].map(Z).join(","));return o.join(`
35
+ `)+`
36
+ `}function ot(e){let o=[["runId","createdAt","suite","deviceClass","browser","browserVersion","os","gpuVendor","gpuArchitecture","cores","deviceMemoryGB","crossOriginIsolated","fingerprintMflops","runtimeId","runtimeVersion","benchModelId","providerModelId","quantization","sizeBytes","workloadId","resolvedBackend","iteration","ttftMs","decodeCharsPerSec","generatedChars","durationMs","loadMs","loadCached","status"].join(",")];for(let n of e){let s=n.environment,r=[n.runId,n.createdAt,n.suite,ee(n),s.browser.name,s.browser.version,s.os.platform,s.gpu.vendor??"",s.gpu.architecture??"",s.hardware.cores??"",s.hardware.deviceMemoryGB??"",s.flags.crossOriginIsolated,n.fingerprint?T(n.fingerprint.mflops):""];for(let a of n.cells){let i=a.load?T(a.load.endT-a.load.startT):"",c=a.load?String(a.load.cached):"",l=[a.runtimeId,a.runtimeVersion??"",a.model.benchModelId,a.model.providerModelId,a.model.quantization??"",a.model.sizeBytes??"",a.workloadId,a.resolvedBackend];if(a.iterations.length===0){o.push([...r,...l,"","","","","",i,c,a.status].map(Z).join(","));continue}a.iterations.forEach((d,m)=>{let g="",h="",u="";if("chunks"in d){let y=d.chunks.find(p=>p.c>0);if(y){g=String(T(y.t-d.startT));let p=d.chunks[d.chunks.length-1],b=d.chunks.reduce((I,D)=>I+D.c,0)-y.c,w=p.t-y.t;w>0&&(h=String(T(b/w*1e3))),u=String(d.chunks.reduce((I,D)=>I+D.c,0));}}o.push([...r,...l,m+1,g,h,u,T(d.endT-d.startT),i,c,a.status].map(Z).join(","));});}}return o.join(`
37
+ `)+`
38
+ `}export{x as BENCH_PROTOCOL_VERSION,R as BENCH_SCHEMA_VERSION,oe as EMBED_WORKLOADS,$ as GENERATION_BUDGET,ve as HEADLINE_MIN_SUBMISSIONS,ne as LLM_WORKLOADS,Ne as PLAUSIBILITY_RULES_VERSION,se as QUALITY_WORKLOADS,xe as RUN_POLICIES,Y as STSB_SUBSET,K as TINY_MMLU,_ as TraceRecorder,F as USAGE_FIDELITY,Ie as WORKLOADS_BY_ID,tt as aggregateRuns,fe as canonicalJson,V as captureEnvironment,ue as checkPlausibility,be as computeRunDigest,ee as deviceClassOf,me as formatMMLUPrompt,We as geomean,f as hrNow,z as inferTimerResolutionUs,L as mean,O as median,q as memoryApiAvailable,pe as parseMMLUAnswer,W as quantile,nt as rowsToCSV,He as runBenchmarkSuite,H as runFingerprint,Q as runMMLUFidelity,J as runSTSQuality,ot as runsToLongCSV,E as sampleMemoryBytes,ye as sha256Hex,C as sleep,G as spearman,ce as stddev,v as summarize,N as summarizeCell,M as summarizeRun,le as validateRunShape,ze as validateSubmission,et as verifyRunDigest};//# sourceMappingURL=index.js.map
39
+ //# sourceMappingURL=index.js.map