Instructions to use souvik18/Roy-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use souvik18/Roy-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="souvik18/Roy-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("souvik18/Roy-v1") model = AutoModelForCausalLM.from_pretrained("souvik18/Roy-v1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use souvik18/Roy-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "souvik18/Roy-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "souvik18/Roy-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/souvik18/Roy-v1
- SGLang
How to use souvik18/Roy-v1 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 "souvik18/Roy-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "souvik18/Roy-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "souvik18/Roy-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "souvik18/Roy-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use souvik18/Roy-v1 with Docker Model Runner:
docker model run hf.co/souvik18/Roy-v1
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
# Roy-v1
|
| 5 |
+
|
| 6 |
+
**Roy** is a personal AI assistant model created and fine-tuned by **Souvik Pramanick**.
|
| 7 |
+
Designed to be helpful, conversational, and practical for everyday tasks such as learning, coding, problem solving, and general assistance.
|
| 8 |
+
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
## Creator
|
| 12 |
+
|
| 13 |
+
**Founder & Trainer:**
|
| 14 |
+
**Souvik Pramanick**
|
| 15 |
+
GitHub: https://github.com/Souvik18p
|
| 16 |
+
HuggingFace: https://huggingface.co/souvik18
|
| 17 |
+
|
| 18 |
+
Roy is an independent project built with the vision of creating a smart, friendly, and customizable AI assistant.
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## What Roy Can Do
|
| 23 |
+
|
| 24 |
+
Roy is capable of:
|
| 25 |
+
|
| 26 |
+
- Natural conversation and assistance
|
| 27 |
+
- Answering general knowledge questions
|
| 28 |
+
- Solving math and logical problems
|
| 29 |
+
- Helping with coding and debugging
|
| 30 |
+
- Writing emails, stories, and content
|
| 31 |
+
- Explaining concepts in simple language
|
| 32 |
+
- Brainstorming ideas and learning support
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## Model Details
|
| 37 |
+
|
| 38 |
+
- **Model Name:** Roy-v1
|
| 39 |
+
- **Parameters:** 7B
|
| 40 |
+
- **Architecture:** LLaMA-based
|
| 41 |
+
- **Tensor Type:** F16
|
| 42 |
+
- **Format:** Safetensors
|
| 43 |
+
- **License:** Open for community usage
|
| 44 |
+
|
| 45 |
+
Base Model: **souvik18/Roy-v1**
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## Quick Usage
|
| 50 |
+
|
| 51 |
+
### Using HuggingFace Transformers
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 55 |
+
import torch
|
| 56 |
+
|
| 57 |
+
MODEL_ID = "souvik18/Roy-v1"
|
| 58 |
+
|
| 59 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
| 60 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 61 |
+
MODEL_ID,
|
| 62 |
+
torch_dtype=torch.float16,
|
| 63 |
+
device_map="auto"
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
prompt = "[INST] Hello Roy! [/INST]"
|
| 67 |
+
|
| 68 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 69 |
+
|
| 70 |
+
output = model.generate(**inputs, max_new_tokens=200)
|
| 71 |
+
|
| 72 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|