Instructions to use ArushBuilds/Pragya-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ArushBuilds/Pragya-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ArushBuilds/Pragya-Preview")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ArushBuilds/Pragya-Preview", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ArushBuilds/Pragya-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ArushBuilds/Pragya-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ArushBuilds/Pragya-Preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ArushBuilds/Pragya-Preview
- SGLang
How to use ArushBuilds/Pragya-Preview 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 "ArushBuilds/Pragya-Preview" \ --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": "ArushBuilds/Pragya-Preview", "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 "ArushBuilds/Pragya-Preview" \ --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": "ArushBuilds/Pragya-Preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ArushBuilds/Pragya-Preview with Docker Model Runner:
docker model run hf.co/ArushBuilds/Pragya-Preview
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,7 +30,8 @@ pipeline_tag: text-generation
|
|
| 30 |
- **Primary Task:** Text Generation / Short Story Completion
|
| 31 |
- **Note**: Model is not Instruct tuned and is not trained completely
|
| 32 |
---
|
| 33 |
-
|
|
|
|
| 34 |
## Intended Uses & Scope
|
| 35 |
|
| 36 |
### Recommended Use
|
|
@@ -67,7 +68,7 @@ model_id = "ArushBuilds/Pragya-Preview"
|
|
| 67 |
# Load tokenizer and model
|
| 68 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 69 |
model = AutoModelForCausalLM.from_pretrained(
|
| 70 |
-
model_id,
|
| 71 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
| 72 |
device_map="auto"
|
| 73 |
)
|
|
|
|
| 30 |
- **Primary Task:** Text Generation / Short Story Completion
|
| 31 |
- **Note**: Model is not Instruct tuned and is not trained completely
|
| 32 |
---
|
| 33 |
+
## Model is open weight
|
| 34 |
+
- weights are available in .pt and .onnx
|
| 35 |
## Intended Uses & Scope
|
| 36 |
|
| 37 |
### Recommended Use
|
|
|
|
| 68 |
# Load tokenizer and model
|
| 69 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 70 |
model = AutoModelForCausalLM.from_pretrained(
|
| 71 |
+
model_id='ArushBuilds/Pragya-Preview',
|
| 72 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
| 73 |
device_map="auto"
|
| 74 |
)
|