Skip to content

Commit

Permalink
feat: switch example models to 16f variants
Browse files Browse the repository at this point in the history
  • Loading branch information
gsuuon committed Mar 12, 2024
1 parent 39c3cb9 commit 132be17
Show file tree
Hide file tree
Showing 8 changed files with 461 additions and 442 deletions.
2 changes: 1 addition & 1 deletion example/vite-demo/colorgen/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const Load = () => {
when={model()}
fallback={
<Loading
llamaModel='Llama-2-7b-chat-hf-q4f32_1'
llamaModel='Llama-2-7b-chat-hf-q4f16_1'
onLoad={setModel}
/>
}>{
Expand Down
2 changes: 1 addition & 1 deletion example/vite-demo/hn/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const hnApiGetRandomWhosHiring = async (tries = 2): Promise<string> => {

const result = await renderTemplate(app, async () => {
const model = await loadModel(
'Llama-2-7b-chat-hf-q4f32_1',
'Llama-2-7b-chat-hf-q4f16_1',
report => app.innerHTML = `<pre id='progress'><code>${JSON.stringify(report, null, 2)}</code></pre>`,
new URLSearchParams(window.location.search).get('cpu') === null
? TargetDevice.GPU
Expand Down
2 changes: 1 addition & 1 deletion example/vite-demo/murder/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (import.meta.hot) { import.meta.hot.accept() }
const infer = document.getElementById('infer')!

const model = await loadModel(
'Llama-2-7b-chat-hf-q4f32_1',
'Llama-2-7b-chat-hf-q4f16_1',
report => infer.innerHTML = `<pre id='progress'><code>${JSON.stringify(report, null, 2)}</code></pre>`,
new URLSearchParams(window.location.search).get('cpu') === null
? TargetDevice.GPU
Expand Down
4 changes: 2 additions & 2 deletions example/vite-demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/vite-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
"preview": "npm run build && vite preview"
},
"devDependencies": {
"typescript": "^5.0.2",
Expand Down
2 changes: 1 addition & 1 deletion example/vite-demo/playground/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ onresize.observe(editorContainer)

const model =
await loadModel(
'Llama-2-7b-chat-hf-q4f32_1',
'Llama-2-7b-chat-hf-q4f16_1',
report => inference.innerHTML = `<pre id='progress'><code>${JSON.stringify(report, null, 2)}</code></pre>`,
new URLSearchParams(window.location.search).get('cpu') === null
? TargetDevice.GPU
Expand Down
Loading

0 comments on commit 132be17

Please sign in to comment.