Instructions to use GenVRadmin/AryaBhatta-GemmaOrca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GenVRadmin/AryaBhatta-GemmaOrca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GenVRadmin/AryaBhatta-GemmaOrca")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GenVRadmin/AryaBhatta-GemmaOrca") model = AutoModelForCausalLM.from_pretrained("GenVRadmin/AryaBhatta-GemmaOrca") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use GenVRadmin/AryaBhatta-GemmaOrca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GenVRadmin/AryaBhatta-GemmaOrca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GenVRadmin/AryaBhatta-GemmaOrca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GenVRadmin/AryaBhatta-GemmaOrca
- SGLang
How to use GenVRadmin/AryaBhatta-GemmaOrca 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 "GenVRadmin/AryaBhatta-GemmaOrca" \ --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": "GenVRadmin/AryaBhatta-GemmaOrca", "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 "GenVRadmin/AryaBhatta-GemmaOrca" \ --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": "GenVRadmin/AryaBhatta-GemmaOrca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GenVRadmin/AryaBhatta-GemmaOrca with Docker Model Runner:
docker model run hf.co/GenVRadmin/AryaBhatta-GemmaOrca
Update README.md
Browse files
README.md
CHANGED
|
@@ -35,4 +35,39 @@ AryaBhatta-GemmaOrca 35.9 72.26 53.85 40.35 50.59 \
|
|
| 35 |
zephyr-7b-beta 37.52 71.77 55.26 39.77 51.08 \
|
| 36 |
zephyr-7b-gemma-v0.1 34.22 66.37 52.19 37.10 47.47 \
|
| 37 |
mlabonne/Gemmalpaca-7B 21.6 40.87 44.85 30.49 34.45 \
|
| 38 |
-
google/gemma-7b-it 21.33 40.84 41.70 30.25 33.53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
zephyr-7b-beta 37.52 71.77 55.26 39.77 51.08 \
|
| 36 |
zephyr-7b-gemma-v0.1 34.22 66.37 52.19 37.10 47.47 \
|
| 37 |
mlabonne/Gemmalpaca-7B 21.6 40.87 44.85 30.49 34.45 \
|
| 38 |
+
google/gemma-7b-it 21.33 40.84 41.70 30.25 33.53
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
How to use:-
|
| 43 |
+
|
| 44 |
+
from peft import AutoPeftModelForCausalLM
|
| 45 |
+
from transformers import AutoTokenizer
|
| 46 |
+
|
| 47 |
+
model = AutoPeftModelForCausalLM.from_pretrained(
|
| 48 |
+
"GenVRadmin/AryaBhatta-GemmaOrca",
|
| 49 |
+
load_in_4bit = False,
|
| 50 |
+
token = hf_token
|
| 51 |
+
)
|
| 52 |
+
tokenizer = AutoTokenizer.from_pretrained("GenVRadmin/AryaBhatta-GemmaOrca")
|
| 53 |
+
|
| 54 |
+
input_prompt = """
|
| 55 |
+
### Instruction:
|
| 56 |
+
{}
|
| 57 |
+
|
| 58 |
+
### Input:
|
| 59 |
+
{}
|
| 60 |
+
|
| 61 |
+
### Response:
|
| 62 |
+
{}"""
|
| 63 |
+
|
| 64 |
+
input_text = input_prompt.format(
|
| 65 |
+
"Answer this question about India.", # instruction
|
| 66 |
+
"Who is the Prime Minister of India", # input
|
| 67 |
+
"", # output - leave this blank for generation!
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
inputs = tokenizer([input_text], return_tensors = "pt").to("cuda")
|
| 71 |
+
|
| 72 |
+
outputs = model.generate(**inputs, max_new_tokens = 300, use_cache = True)
|
| 73 |
+
response = tokenizer.batch_decode(outputs)[0]
|