# Amberi neural network

Hotel of Secrets uses Amberi, who uses her voice to control various game mechanics. The first part uses the transformer library to implement natural language processing tasks. It uses two different pre-trained models, ChatGPT, GPT-4 and BERT.

GPT-4 is a multi-modal language model, and the script uses it to generate text as a continuation of the input text "Hello, I'm a language model". The predicted next word is obtained from the original model data.

BERT is a sentiment analysis model and the script uses it to classify the sentiments of the input text "Hello, I'm a language model". The predicted sentiment class is obtained from the model's input data.

The script also contains some data pre-processing steps for the dialog box set, including removing lowercase letters, punctuation marks, and stop words, marking, and converting words to numeric representations.

The code initializes a GPT-4 model from prefetched data, creates a tokenizer for the model, and uses the model to answer a question using a query variable. The code then fine-tunes the model in the dialog dataset. Finally, the code defines a tokenize\_and\_encode function that takes input text and returns the corresponding token IDs, and then applies the function to the text input sample. Token IDs are printed to the console.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hotel-of-secrets.gitbook.io/white-paper1/technical-documentation/amberi-neural-network.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
