Text Generation
Transformers
PyTorch
Hindi
English
parambharatgen
bharatgen
bilingual
hindi
english
causal-lm
conversational
custom_code
Instructions to use bharatgenai/Param-1-5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bharatgenai/Param-1-5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bharatgenai/Param-1-5B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("bharatgenai/Param-1-5B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bharatgenai/Param-1-5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bharatgenai/Param-1-5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bharatgenai/Param-1-5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bharatgenai/Param-1-5B
- SGLang
How to use bharatgenai/Param-1-5B 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 "bharatgenai/Param-1-5B" \ --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": "bharatgenai/Param-1-5B", "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 "bharatgenai/Param-1-5B" \ --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": "bharatgenai/Param-1-5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use bharatgenai/Param-1-5B with Docker Model Runner:
docker model run hf.co/bharatgenai/Param-1-5B
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,18 +3,28 @@ language:
|
|
| 3 |
- hi
|
| 4 |
- en
|
| 5 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
|
| 9 |
<div align="center">
|
| 10 |
-
<
|
|
|
|
|
|
|
| 11 |
</div>
|
| 12 |
<hr>
|
| 13 |
<div align="center">
|
| 14 |
-
<
|
| 15 |
-
<img alt="
|
| 16 |
-
</a>
|
| 17 |
-
<a href="
|
| 18 |
<img alt="License" src="https://img.shields.io/badge/License-yellow.svg" />
|
| 19 |
</a>
|
| 20 |
</div>
|
|
@@ -27,7 +37,7 @@ The model is pretrained from scratch and designed to serve as a strong foundatio
|
|
| 27 |
|
| 28 |
---
|
| 29 |
|
| 30 |
-
##
|
| 31 |
|
| 32 |
* **5B parameter** dense Transformer model
|
| 33 |
* **Bilingual**: English and Hindi
|
|
@@ -37,7 +47,7 @@ The model is pretrained from scratch and designed to serve as a strong foundatio
|
|
| 37 |
|
| 38 |
---
|
| 39 |
|
| 40 |
-
##
|
| 41 |
|
| 42 |
```python
|
| 43 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
@@ -73,7 +83,7 @@ print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
| 73 |
|
| 74 |
---
|
| 75 |
|
| 76 |
-
##
|
| 77 |
|
| 78 |
| Task | **Param-1-5B (PT)** |
|
| 79 |
| ----------------- | ------------------- |
|
|
@@ -95,7 +105,7 @@ print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
| 95 |
|
| 96 |
---
|
| 97 |
|
| 98 |
-
##
|
| 99 |
|
| 100 |
* Architecture: Transformer (Decoder-only)
|
| 101 |
* Number of parameters: **~5B**
|
|
@@ -112,7 +122,7 @@ print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
| 112 |
|
| 113 |
---
|
| 114 |
|
| 115 |
-
##
|
| 116 |
|
| 117 |
The model is pretrained on a large-scale bilingual corpus with a strong focus on **English and Hindi**, along with **dedicated Math and Code data**.
|
| 118 |
|
|
@@ -120,8 +130,8 @@ The model is pretrained on a large-scale bilingual corpus with a strong focus on
|
|
| 120 |
|
| 121 |
- **English Natural Language:** `3.6T`
|
| 122 |
- **Hindi Natural Language:** `2.77T`
|
| 123 |
-
- **Math & Code:** `238.4B`
|
| 124 |
-
- Math: **40%**
|
| 125 |
- Code: **60%**
|
| 126 |
|
| 127 |
Compared to **Param-1-2.9B**, **Param-1-5B** includes:
|
|
@@ -132,7 +142,7 @@ Compared to **Param-1-2.9B**, **Param-1-5B** includes:
|
|
| 132 |
|
| 133 |
---
|
| 134 |
|
| 135 |
-
##
|
| 136 |
|
| 137 |
* Training framework: `NVIDIA NeMo`
|
| 138 |
* Training infrastructure: `Yotta's Shakti Cloud`
|
|
@@ -141,7 +151,7 @@ Compared to **Param-1-2.9B**, **Param-1-5B** includes:
|
|
| 141 |
|
| 142 |
---
|
| 143 |
|
| 144 |
-
##
|
| 145 |
|
| 146 |
* This is a **pretrained base model** and may require fine-tuning for instruction-following or chat use cases.
|
| 147 |
* The model may reflect biases present in large-scale web and code data.
|
|
@@ -149,7 +159,7 @@ Compared to **Param-1-2.9B**, **Param-1-5B** includes:
|
|
| 149 |
|
| 150 |
---
|
| 151 |
|
| 152 |
-
##
|
| 153 |
|
| 154 |
This model is released under the **BharatGen non-commercial license**.
|
| 155 |
|
|
|
|
| 3 |
- hi
|
| 4 |
- en
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- bharatgen
|
| 8 |
+
- bilingual
|
| 9 |
+
- hindi
|
| 10 |
+
- english
|
| 11 |
+
- causal-lm
|
| 12 |
+
- transformers
|
| 13 |
+
license: other
|
| 14 |
---
|
| 15 |
|
| 16 |
|
| 17 |
<div align="center">
|
| 18 |
+
<a href="https://bharatgen.com" target="_blank">
|
| 19 |
+
<img src="https://huggingface.co/bharatgenai/Param-1-2.9B-Instruct/resolve/main/BharatGen%20Logo%20(1).png" width="60%" alt="BharatGen" />
|
| 20 |
+
</a>
|
| 21 |
</div>
|
| 22 |
<hr>
|
| 23 |
<div align="center">
|
| 24 |
+
<a href="https://bharatgen.com" target="_blank" style="margin: 4px;">
|
| 25 |
+
<img alt="Homepage" src="https://img.shields.io/badge/Homepage-Visit-blue.svg" />
|
| 26 |
+
</a>
|
| 27 |
+
<a href="./LICENSE" target="_blank" style="margin: 4px;">
|
| 28 |
<img alt="License" src="https://img.shields.io/badge/License-yellow.svg" />
|
| 29 |
</a>
|
| 30 |
</div>
|
|
|
|
| 37 |
|
| 38 |
---
|
| 39 |
|
| 40 |
+
## Key Highlights
|
| 41 |
|
| 42 |
* **5B parameter** dense Transformer model
|
| 43 |
* **Bilingual**: English and Hindi
|
|
|
|
| 47 |
|
| 48 |
---
|
| 49 |
|
| 50 |
+
## Model Inference
|
| 51 |
|
| 52 |
```python
|
| 53 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 83 |
|
| 84 |
---
|
| 85 |
|
| 86 |
+
## Benchmarks
|
| 87 |
|
| 88 |
| Task | **Param-1-5B (PT)** |
|
| 89 |
| ----------------- | ------------------- |
|
|
|
|
| 105 |
|
| 106 |
---
|
| 107 |
|
| 108 |
+
## Model Architecture
|
| 109 |
|
| 110 |
* Architecture: Transformer (Decoder-only)
|
| 111 |
* Number of parameters: **~5B**
|
|
|
|
| 122 |
|
| 123 |
---
|
| 124 |
|
| 125 |
+
## Training Data
|
| 126 |
|
| 127 |
The model is pretrained on a large-scale bilingual corpus with a strong focus on **English and Hindi**, along with **dedicated Math and Code data**.
|
| 128 |
|
|
|
|
| 130 |
|
| 131 |
- **English Natural Language:** `3.6T`
|
| 132 |
- **Hindi Natural Language:** `2.77T`
|
| 133 |
+
- **Math & Code:** `238.4B`
|
| 134 |
+
- Math: **40%**
|
| 135 |
- Code: **60%**
|
| 136 |
|
| 137 |
Compared to **Param-1-2.9B**, **Param-1-5B** includes:
|
|
|
|
| 142 |
|
| 143 |
---
|
| 144 |
|
| 145 |
+
## Training Details
|
| 146 |
|
| 147 |
* Training framework: `NVIDIA NeMo`
|
| 148 |
* Training infrastructure: `Yotta's Shakti Cloud`
|
|
|
|
| 151 |
|
| 152 |
---
|
| 153 |
|
| 154 |
+
## Limitations
|
| 155 |
|
| 156 |
* This is a **pretrained base model** and may require fine-tuning for instruction-following or chat use cases.
|
| 157 |
* The model may reflect biases present in large-scale web and code data.
|
|
|
|
| 159 |
|
| 160 |
---
|
| 161 |
|
| 162 |
+
## License
|
| 163 |
|
| 164 |
This model is released under the **BharatGen non-commercial license**.
|
| 165 |
|