Instructions to use Suru/HSS-shakha-khel-assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Suru/HSS-shakha-khel-assistant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Suru/HSS-shakha-khel-assistant")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Suru/HSS-shakha-khel-assistant") model = AutoModelForCausalLM.from_pretrained("Suru/HSS-shakha-khel-assistant") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Suru/HSS-shakha-khel-assistant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Suru/HSS-shakha-khel-assistant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Suru/HSS-shakha-khel-assistant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Suru/HSS-shakha-khel-assistant
- SGLang
How to use Suru/HSS-shakha-khel-assistant with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Suru/HSS-shakha-khel-assistant" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Suru/HSS-shakha-khel-assistant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Suru/HSS-shakha-khel-assistant" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Suru/HSS-shakha-khel-assistant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Suru/HSS-shakha-khel-assistant with Docker Model Runner:
docker model run hf.co/Suru/HSS-shakha-khel-assistant
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
!pip install transformers accelerate bitsandbytes
Use the below code to download the model, and try it out using the prompt.
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
Example Usage
Below is an example command to the Shakha Khel Assistant and its output:
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
- Downloads last month
- 3
