File size: 3,397 Bytes
21f05e9 54857a3 28b75e0 35a8acd 2de74af 35a8acd 54857a3 6adf0b7 7aa8292 54857a3 8d6c06a b6a70f0 80d3a76 7aa8292 80d3a76 54857a3 fbd42dc 54857a3 8654abc 21f05e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
---
{}
---
# Shakha Khel Assistant
## Overview
Welcome to the Shakha Khel Assistant, your digital helper for planning various games (Khel) for your Shakha activities. This tool leverages the LLAMA 2 7B model to provide you with a wide range of game suggestions, tailored for the unique needs of HSS Shakha gatherings.
## Features
- **Diverse Game Recommendations**: From individual pursuits to team challenges and games that require specific equipment or strategic thinking.
- **Culturally Relevant**: Suggestions are based on a dataset specific to HSS Shakha activities, ensuring appropriate and engaging selections.
- **Easy to Use**: Simply ask for the type of game you need, and receive a list of suggestions instantly.
## Powered by Technology
The Shakha Khel Assistant uses the LLAMA 2 7B model, which has been trained on a dataset specifically curated from `Suru/HSS-shakha-khel`. This training ensures that the game recommendations are varied, engaging, and suitable for Shakha members of all ages.
## How to Use
-> We will make the model load in smaller bit precision (4 bit quantization) which allow us to use free colab gpu. Make sure that GPU is enabled under runtime settings.
Downlaod the required libraries
```python
!pip install transformers accelerate bitsandbytes
```
Use the below code to download the model, and try it out using the prompt.
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Suru/HSS-shakha-khel-assistant" # model from hugging face
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", load_in_4bit=True)
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
prompt = "Design a 'Surya Namaskar' theme khel using khel like 'mandal kho kho'."
prompt_format = f"<s>[INST] {prompt} [/INST]"
model_inputs = tokenizer(prompt_format, return_tensors="pt").to("cuda:0")
output = model.generate(**model_inputs, max_new_tokens = 1000)
print(tokenizer.decode(output[0], skip_special_tokens=True))
```
To get game recommendations, you can use the following types of queries:
- "Recommend me three different types of individual pursuit games."
- "Suggest some team games that require minimal equipment."
- "List some thinking games for small mandal (groups)."
- "Design a 'Surya Namaskar' theme khel using 'Pakado' khel."
## You can get started using this model by using free Google Colab GPU! Check out the article below for more information.
[Run HSS Shakha Khel Assistant on Your Computer](https://medium.com/@suru10/run-hss-shakha-khel-assistant-on-your-computer-0a1c40a41d9a)
## Example Usage
Below is an example command to the Shakha Khel Assistant and its output:
![Shakha Khel Assistant Example](./khel_example.jpg)
*In this example, the user has asked for three different team games and three different individual pursuit games, and the assistant has provided recommendations for each.*
NOTE: The instruction must be in alpaca format.Therefore we need to format the prompt accordingly. For more information, check out the article below!
## Contributing
We appreciate contributions from the community! If you have game suggestions or improvements to the assistant, please feel free to contribute.
## Contact
For any questions or feedback, please reach out to me.
Enjoy planning your Shakha games with ease and creativity with Shakha Khel Assistant!
---
license: apache-2.0
--- |