AI prompts
base on <div align="center">
<img src="./doc_assets/App_Main.png" alt="App Main" width="250"/>
<br>
<h1>Ai2 OLMoE</h1>
</div>
<p align="center">
<a href="https://github.com/allenai/OLMo/blob/main/LICENSE">
<img alt="GitHub License" src="https://img.shields.io/github/license/allenai/OLMo">
</a>
<a href="https://playground.allenai.org">
<img alt="Playground" src="https://img.shields.io/badge/Ai2-Playground-F0529C">
</a>
<a href="https://discord.gg/sZq3jTNVNG">
<img alt="Discord" src="https://img.shields.io/badge/Discord%20-%20blue?style=flat&logo=discord&label=Ai2&color=%235B65E9">
</a>
</p>
## Getting started with OLMoE app
1. **Open the app** – Launch OLMoE app on your device.
2. **Download the model** – The app may prompt you to download the required model files. Just follow the instructions and wait for the download to complete.
3. **Ask questions** – Once the model is ready, type in your question, and the app will generate a response.
We **don't** store any of your queries or data—everything runs on your device. You can even use the app in **Flight Mode** with no internet connection.
Enjoy a fully open, private, and offline capable AI experience with OLMoE.
## OLMoE.swift
Clone the repository in your respective directory by
``` sh
git clone https://github.com/allenai/OLMoE.swift.git
```
### Building the iOS app to run on a simulator
1) Open the project in Xcode.
1) Ensure the target device is set to an appropriate device (ie iPhone 15 Pro or higher)

1) Run the project
For more information see [OLMoE.swift/README.md](OLMoE.swift/README.md) or to
- [run the iOS App with custom settings](./OLMoE.swift/README.md#building-the-ios-app-with-custom-settings)
- [run on MacOS](./OLMoE.swift/README.md#running-on-macos)
- [run on a physical device](OLMoE.swift/README.md#running-on-a-physical-device)
## Running OLMoE with Hugging Face
Install `transformers` (version 4.45.0 or greater) & `torch` and run:
```python
from transformers import OlmoeForCausalLM, AutoTokenizer
import torch
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
# Load different ckpts via passing e.g. `revision=step10000-tokens41B`
model = OlmoeForCausalLM.from_pretrained("allenai/OLMoE-1B-7B-0125").to(DEVICE)
tokenizer = AutoTokenizer.from_pretrained("allenai/OLMoE-1B-7B-0125")
inputs = tokenizer("Bitcoin is", return_tensors="pt")
inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
out = model.generate(**inputs, max_length=64)
print(tokenizer.decode(out[0]))
# > # Bitcoin is a digital currency that is created and held electronically. No one controls it. Bitcoins aren't printed, like dollars or euros – they're produced by people and businesses running computers all around the world, using software that solves mathematical
```
## aws-lambda
This is a lambda function used for the "sharing" feature of the OLMoE app. See [aws-lambda/README.md](aws-lambda/README.md) for more information.
## License
This project is open source. See [LICENSE](LICENSE) for more information.
## Open Source Dependencies
This project relies on the following open-source libraries, each licensed under the **MIT License**:
### [LlamaCPP](https://github.com/ggerganov/llama.cpp)
- **Author(s):** The ggml authors (2023-2024)
- **License:** MIT
- **Repository:** [LlamaCPP](https://github.com/ggerganov/llama.cpp)
### [ggml](https://github.com/ggerganov/ggml)
- **Author(s):** The ggml authors (2023-2024)
- **License:** MIT
- **Repository:** [ggml](https://github.com/ggerganov/ggml)
### [MarkdownUI](https://github.com/gonzalezreal/swift-markdown-ui)
- **Author(s):** Guillermo Gonzalez (2020)
- **License:** MIT
- **Repository:** [MarkdownUI](https://github.com/gonzalezreal/swift-markdown-ui)
### [HighlightSwift](https://github.com/appstefan/HighlightSwift)
- **Author(s):** Stefan Blos
- **License:** MIT
- **Repository:** [HighlightSwift](https://github.com/appstefan/HighlightSwift)
For more details on each license, visit the respective repositories linked above.
", Assign "at most 3 tags" to the expected json: {"id":"13057","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"