[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71369":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":16,"starSnapshotCount":16,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},71369,"openplayground","nat\u002Fopenplayground","nat","An LLM playground you can run on your laptop","",null,"TypeScript",6354,485,58,66,0,39.06,"MIT License",false,"main",true,[],"2026-06-12 02:02:51","# openplayground\n\nAn LLM playground you can run on your laptop.\n\nhttps:\u002F\u002Fuser-images.githubusercontent.com\u002F111631\u002F227399583-39b23f48-9823-4571-a906-985dbe282b20.mp4\n\n#### Features\n\n- Use any model from [OpenAI](https:\u002F\u002Fopenai.com), [Anthropic](https:\u002F\u002Fanthropic.com), [Cohere](https:\u002F\u002Fcohere.com), [Forefront](https:\u002F\u002Fforefront.ai), [HuggingFace](https:\u002F\u002Fhuggingface.co), [Aleph Alpha](https:\u002F\u002Faleph-alpha.com), [Replicate](https:\u002F\u002Freplicate.com), [Banana](https:\u002F\u002Fbanana.dev) and [llama.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp).\n- Full playground UI, including history, parameter tuning, keyboard shortcuts, and logprops.\n- Compare models side-by-side with the same prompt, individually tune model parameters, and retry with different parameters.\n- Automatically detects local models in your HuggingFace cache, and lets you install new ones.\n- Works OK on your phone.\n- Probably won't kill everyone.\n\n## Try on nat.dev\n\nTry the hosted version: [nat.dev](https:\u002F\u002Fnat.dev).\n\n## How to install and run\n\n```sh\npip install openplayground\nopenplayground run\n```\n\nAlternatively, run it as a docker container:\n```sh\ndocker run --name openplayground -p 5432:5432 -d --volume openplayground:\u002Fweb\u002Fconfig natorg\u002Fopenplayground\n```\n\nThis runs a Flask process, so you can add the typical flags such as setting a different port `openplayground run -p 1235` and others.\n\n## How to run for development\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fnat\u002Fopenplayground\ncd app && npm install && npx parcel watch src\u002Findex.html --no-cache\ncd server && pip3 install -r requirements.txt && cd .. && python3 -m server.app\n```\n\n## Docker\n\n```sh\ndocker build . --tag \"openplayground\"\ndocker run --name openplayground -p 5432:5432 -d --volume openplayground:\u002Fweb\u002Fconfig openplayground\n```\n\nFirst volume is optional. It's used to store API keys, models settings.\n\n## Ideas for contributions\n\n- Add a token counter to the playground\n- Add a cost counter to the playground and the compare page\n- Measure and display time to first token\n- Setup automatic builds with GitHub Actions\n- The default parameters for each model are configured in the `server\u002Fmodels.json` file. If you find better default parameters for a model, please submit a pull request!\n- Someone can help us make a homebrew package, and a dockerfile\n- Easier way to install open source models directly from openplayground, with `openplayground install \u003Cmodel>` or in the UI.\n- Find and fix bugs\n- ChatGPT UI, with turn-by-turn, markdown rendering, chatgpt plugin support, etc.\n- We will probably need multimodal inputs and outputs at some point in 2023\n\n### llama.cpp\n\n## Adding models to openplayground\n\nModels and providers have three types in openplayground:\n\n- Searchable\n- Local inference\n- API\n\nYou can add models in `server\u002Fmodels.json` with the following schema:\n\n#### Local inference\n\nFor models running locally on your device you can add them to openplayground like the following (a minimal example):\n\n```json\n\"llama\": {\n    \"api_key\" : false,\n    \"models\" : {\n        \"llama-70b\": {\n            \"parameters\": {\n                \"temperature\": {\n                    \"value\": 0.5,\n                    \"range\": [\n                        0.1,\n                        1.0\n                    ]\n                },\n            }\n        }\n    }\n}\n```\n\nKeep in mind you will need to add a generation method for your model in `server\u002Fapp.py`. Take a look at `local_text_generation()` as an example.\n\n#### API Provider Inference\n\nThis is for model providers like OpenAI, cohere, forefront, and more. You can connect them easily into openplayground (a minimal example):\n\n```json\n\"cohere\": {\n    \"api_key\" : true,\n    \"models\" : {\n        \"xlarge\": {\n            \"parameters\": {\n                \"temperature\": {\n                    \"value\": 0.5,\n                    \"range\": [\n                        0.1,\n                        1.0\n                    ]\n                },\n            }\n        }\n    }\n}\n```\n\nKeep in mind you will need to add a generation method for your model in `server\u002Fapp.py`. Take a look at `openai_text_generation()` or `cohere_text_generation()` as an example.\n\n#### Searchable models\n\nWe use this for Huggingface Remote Inference models, the search endpoint is useful for scaling to N models in the settings page.\n\n```json\n\"provider_name\": {\n    \"api_key\": true,\n    \"search\": {\n        \"endpoint\": \"ENDPOINT_URL\"\n    },\n    \"parameters\": {\n        \"parameter\": {\n            \"value\": 1.0,\n            \"range\": [\n                0.1,\n                1.0\n            ]\n        },\n    }\n}\n```\n\n#### Credits\n\nInstigated by Nat Friedman. Initial implementation by [Zain Huda](https:\u002F\u002Fgithub.com\u002Fzainhuda) as a repl.it bounty. Many features and extensive refactoring by [Alex Lourenco](https:\u002F\u002Fgithub.com\u002FAlexanderLourenco).\n","openplayground 是一个可以在个人电脑上运行的大规模语言模型（LLM）实验平台。它支持来自OpenAI、Anthropic、Cohere等多家知名机构的多种模型，并允许用户在统一界面上对比不同模型的表现，调整参数，以及重试请求。此外，该平台还能自动检测本地HuggingFace缓存中的模型并安装新模型。其主要特点包括全面的用户界面设计、历史记录功能、快捷键支持及日志属性显示。适用于需要测试和比较不同语言模型性能的研究人员或开发者，同时也适合对LLM感兴趣的技术爱好者进行学习与探索。",2,"2026-06-11 03:37:22","high_star"]