🧠 indAI

A custom-trained causal language model for text generation and conversational AI.

indAI is a custom-trained language model developed by Pratik Shourabh using the PyTorch and Hugging Face Transformers ecosystem.

The project explores custom dataset processing, language-model training, text generation, conversational AI, evaluation, and GPU-based inference.

Model ID: pratikshourabh/indAI

Status: Experimental / Active Development


✨ Features

  • πŸ€– Causal language generation
  • πŸ’¬ Conversational prompting
  • ⚑ GPU-accelerated inference
  • 🧠 Custom training pipeline
  • πŸ“¦ SafeTensors model weights
  • πŸ€— Hugging Face Transformers compatibility
  • 🐍 Python support
  • ☁️ Kaggle GPU support
  • 🌐 REST API integration
  • 🟨 JavaScript / Node.js integration
  • 🐘 PHP integration
  • πŸ“± Mobile-app integration through an API
  • πŸ”§ Configurable generation parameters

πŸ“¦ Model Information

Property Details
Model pratikshourabh/indAI
Task Text Generation
Architecture Causal Language Model
Framework PyTorch
Library Hugging Face Transformers
Weights SafeTensors
Author Pratik Shourabh
Status Experimental

Replace/add the exact base model, parameter count, context length, license, dataset size, and training configuration when those values are confirmed.


🧠 How indAI Works

At a high level:

                 User Prompt
                      β”‚
                      β–Ό
                  Tokenizer
                      β”‚
                      β–Ό
                  Token IDs
                      β”‚
                      β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚  indAI  β”‚
                 β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
              Next-token prediction
                      β”‚
                      β–Ό
                Generated tokens
                      β”‚
                      β–Ό
                  Tokenizer
                      β”‚
                      β–Ό
                 Text Response

πŸ“ Repository Structure

The Hugging Face repository contains the model configuration, weights, tokenizer, and generation configuration.

Typical structure:

indAI/
β”‚
β”œβ”€β”€ config.json
β”œβ”€β”€ generation_config.json
β”œβ”€β”€ model.safetensors
β”œβ”€β”€ tokenizer.json
β”œβ”€β”€ tokenizer_config.json
└── training_state.pt

config.json

Defines the model architecture and configuration.

model.safetensors

Contains the trained model weights.

tokenizer.json

Contains tokenizer vocabulary and tokenization configuration.

tokenizer_config.json

Contains tokenizer-specific settings.

generation_config.json

Contains generation-related defaults.

training_state.pt

Contains training-related state information.


πŸ’» Requirements

Recommended:

Python 3.10+
PyTorch
Transformers
Accelerate
SentencePiece
Hugging Face Hub

For GPU inference:

NVIDIA GPU
CUDA-compatible PyTorch

πŸ“₯ Installation

Install the required packages:

pip install -U torch transformers accelerate sentencepiece huggingface_hub

Verify PyTorch:

python -c "import torch; print(torch.__version__)"

Check CUDA:

python -c "import torch; print(torch.cuda.is_available())"

πŸš€ Quick Start

The simplest way to load indAI:

import torch

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM
)

MODEL_ID = "pratikshourabh/indAI"

tokenizer = AutoTokenizer.from_pretrained(
    MODEL_ID
)

model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    torch_dtype="auto",
    device_map="auto"
)

model.eval()

print("indAI loaded successfully!")

πŸ“ Generate Text

import torch

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM
)

MODEL_ID = "pratikshourabh/indAI"

tokenizer = AutoTokenizer.from_pretrained(
    MODEL_ID
)

model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    torch_dtype="auto",
    device_map="auto"
)

model.eval()

prompt = "Hello, how are you?"

inputs = tokenizer(
    prompt,
    return_tensors="pt"
).to(model.device)

with torch.no_grad():

    outputs = model.generate(
        **inputs,
        max_new_tokens=150,
        temperature=0.7,
        top_p=0.9,
        do_sample=True,
        repetition_penalty=1.1
    )

generated_tokens = outputs[
    0
][
    inputs["input_ids"].shape[-1]:
]

response = tokenizer.decode(
    generated_tokens,
    skip_special_tokens=True
)

print(response)

πŸ’¬ Interactive Python Chat

Create chat.py:

import torch

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM
)

MODEL_ID = "pratikshourabh/indAI"

print("Loading indAI...")

tokenizer = AutoTokenizer.from_pretrained(
    MODEL_ID
)

if tokenizer.pad_token is None:
    tokenizer.pad_token = tokenizer.eos_token

model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    torch_dtype="auto",
    device_map="auto"
)

model.eval()

print()
print("======================================")
print("              indAI Chat")
print("======================================")
print("Type 'exit' to quit.")
print()

while True:

    question = input("You: ")

    if question.strip().lower() in {
        "exit",
        "quit",
        "bye"
    }:
        print("Goodbye!")
        break

    if not question.strip():
        continue

    inputs = tokenizer(
        question,
        return_tensors="pt"
    ).to(model.device)

    with torch.no_grad():

        outputs = model.generate(
            **inputs,
            max_new_tokens=200,
            temperature=0.7,
            top_p=0.9,
            do_sample=True,
            repetition_penalty=1.1,
            pad_token_id=tokenizer.eos_token_id
        )

    generated_tokens = outputs[
        0
    ][
        inputs["input_ids"].shape[-1]:
    ]

    response = tokenizer.decode(
        generated_tokens,
        skip_special_tokens=True
    )

    print()
    print("indAI:", response.strip())
    print()

Run:

python chat.py

☁️ Kaggle

indAI can be run in a Kaggle GPU notebook.

Enable GPU

Kaggle
  ↓
Notebook
  ↓
Settings
  ↓
Accelerator
  ↓
GPU

Check the GPU:

import torch

print("CUDA:", torch.cuda.is_available())

if torch.cuda.is_available():
    print("GPU:", torch.cuda.get_device_name(0))

Install dependencies:

!pip install -q -U transformers accelerate huggingface_hub sentencepiece

Load the model:

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM
)

MODEL_ID = "pratikshourabh/indAI"

tokenizer = AutoTokenizer.from_pretrained(
    MODEL_ID
)

model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    torch_dtype="auto",
    device_map="auto"
)

model.eval()

πŸ” Private Hugging Face Repository

If the repository is private, authenticate using a Hugging Face access token with appropriate read permissions.

Environment variable

export HF_TOKEN="YOUR_HUGGING_FACE_TOKEN"

Python:

import os

HF_TOKEN = os.environ["HF_TOKEN"]

Load:

tokenizer = AutoTokenizer.from_pretrained(
    "pratikshourabh/indAI",
    token=HF_TOKEN
)

model = AutoModelForCausalLM.from_pretrained(
    "pratikshourabh/indAI",
    token=HF_TOKEN,
    torch_dtype="auto",
    device_map="auto"
)

Kaggle Secrets

For Kaggle, store the token using:

Kaggle
  ↓
Add-ons
  ↓
Secrets
  ↓
HF_TOKEN

Then:

import os

HF_TOKEN = os.environ["HF_TOKEN"]

Never commit a Hugging Face token to source control.


πŸ§ͺ Kaggle One-Cell Chat

!pip install -q -U transformers accelerate huggingface_hub sentencepiece

import os
import torch

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM
)

MODEL_ID = "pratikshourabh/indAI"

HF_TOKEN = os.environ.get("HF_TOKEN")

if not HF_TOKEN:
    raise RuntimeError(
        "HF_TOKEN is missing. Add it to Kaggle Secrets."
    )

print("Loading tokenizer...")

tokenizer = AutoTokenizer.from_pretrained(
    MODEL_ID,
    token=HF_TOKEN
)

if tokenizer.pad_token is None:
    tokenizer.pad_token = tokenizer.eos_token

print("Loading model...")

model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    token=HF_TOKEN,
    torch_dtype="auto",
    device_map="auto"
)

model.eval()

print()
print("====================================")
print("          indAI is ready")
print("====================================")
print("Type 'exit' to stop.")
print()

while True:

    question = input("You: ")

    if question.strip().lower() in {
        "exit",
        "quit",
        "bye"
    }:
        print("Goodbye!")
        break

    if not question.strip():
        continue

    inputs = tokenizer(
        question,
        return_tensors="pt"
    ).to(model.device)

    with torch.no_grad():

        outputs = model.generate(
            **inputs,
            max_new_tokens=200,
            temperature=0.7,
            top_p=0.9,
            do_sample=True,
            repetition_penalty=1.1,
            pad_token_id=tokenizer.eos_token_id
        )

    generated_tokens = outputs[
        0
    ][
        inputs["input_ids"].shape[-1]:
    ]

    answer = tokenizer.decode(
        generated_tokens,
        skip_special_tokens=True
    )

    print()
    print("indAI:", answer.strip())
    print()

⚑ GPU Inference

Check GPU availability:

import torch

print("CUDA available:", torch.cuda.is_available())

if torch.cuda.is_available():

    print("GPU:", torch.cuda.get_device_name(0))

    print("CUDA:", torch.version.cuda)

Recommended loading:

model = AutoModelForCausalLM.from_pretrained(
    "pratikshourabh/indAI",
    torch_dtype="auto",
    device_map="auto"
)

device_map="auto" allows the Transformers/Accelerate stack to place model components automatically on available hardware.


πŸ–₯️ CPU Inference

The model can also be loaded on CPU:

model = AutoModelForCausalLM.from_pretrained(
    "pratikshourabh/indAI",
    torch_dtype="auto"
)

model.to("cpu")

CPU inference may be considerably slower than GPU inference.


πŸŽ›οΈ Generation Parameters

max_new_tokens

Controls the maximum number of newly generated tokens.

Short:

max_new_tokens=50

Normal:

max_new_tokens=200

Long:

max_new_tokens=500

temperature

Controls sampling randomness.

More deterministic:

temperature=0.2

Balanced:

temperature=0.7

More diverse:

temperature=0.9

top_p

Controls nucleus sampling:

top_p=0.9

top_k

Optional vocabulary filtering:

top_k=50

repetition_penalty

Can help reduce repeated output:

repetition_penalty=1.1

Recommended Starting Configuration

generation_config = {
    "max_new_tokens": 200,
    "temperature": 0.7,
    "top_p": 0.9,
    "do_sample": True,
    "repetition_penalty": 1.1
}

These are starting points and should be evaluated for the specific model.


🐍 Python Application Integration

import torch

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM
)


class IndAI:

    def __init__(
        self,
        model_id="pratikshourabh/indAI"
    ):

        self.model_id = model_id

        self.tokenizer = (
            AutoTokenizer.from_pretrained(
                model_id
            )
        )

        self.model = (
            AutoModelForCausalLM.from_pretrained(
                model_id,
                torch_dtype="auto",
                device_map="auto"
            )
        )

        self.model.eval()

    def generate(
        self,
        prompt,
        max_new_tokens=200,
        temperature=0.7,
        top_p=0.9
    ):

        inputs = self.tokenizer(
            prompt,
            return_tensors="pt"
        ).to(self.model.device)

        with torch.no_grad():

            outputs = self.model.generate(
                **inputs,
                max_new_tokens=max_new_tokens,
                temperature=temperature,
                top_p=top_p,
                do_sample=True,
                repetition_penalty=1.1
            )

        generated_tokens = outputs[
            0
        ][
            inputs["input_ids"].shape[-1]:
        ]

        return self.tokenizer.decode(
            generated_tokens,
            skip_special_tokens=True
        )


ai = IndAI()

response = ai.generate(
    "Hello, how are you?"
)

print(response)

🌐 FastAPI REST API

For web and mobile applications, run indAI behind an API.

Install:

pip install fastapi uvicorn

Create app.py:

import torch

from fastapi import FastAPI
from pydantic import BaseModel

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM
)


MODEL_ID = "pratikshourabh/indAI"


tokenizer = AutoTokenizer.from_pretrained(
    MODEL_ID
)

if tokenizer.pad_token is None:
    tokenizer.pad_token = tokenizer.eos_token


model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    torch_dtype="auto",
    device_map="auto"
)

model.eval()


app = FastAPI(
    title="indAI API",
    description="REST API powered by indAI",
    version="1.0.0"
)


class ChatRequest(BaseModel):

    message: str

    max_new_tokens: int = 200

    temperature: float = 0.7

    top_p: float = 0.9


class ChatResponse(BaseModel):

    model: str

    response: str


@app.get("/")
def root():

    return {
        "name": "indAI",
        "model": MODEL_ID,
        "status": "online"
    }


@app.get("/health")
def health():

    return {
        "status": "healthy"
    }


@app.post(
    "/chat",
    response_model=ChatResponse
)
def chat(request: ChatRequest):

    inputs = tokenizer(
        request.message,
        return_tensors="pt"
    ).to(model.device)

    with torch.no_grad():

        outputs = model.generate(
            **inputs,
            max_new_tokens=request.max_new_tokens,
            temperature=request.temperature,
            top_p=request.top_p,
            do_sample=True,
            repetition_penalty=1.1,
            pad_token_id=tokenizer.eos_token_id
        )

    generated_tokens = outputs[
        0
    ][
        inputs["input_ids"].shape[-1]:
    ]

    response = tokenizer.decode(
        generated_tokens,
        skip_special_tokens=True
    )

    return {
        "model": MODEL_ID,
        "response": response.strip()
    }

Run:

uvicorn app:app --host 0.0.0.0 --port 8000

API:

http://localhost:8000

Swagger:

http://localhost:8000/docs

πŸ§ͺ cURL

Health

curl http://localhost:8000/health

Response:

{
  "status": "healthy"
}

Chat

curl -X POST \
  http://localhost:8000/chat \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hello, how are you?",
    "max_new_tokens": 200,
    "temperature": 0.7,
    "top_p": 0.9
  }'

Response:

{
  "model": "pratikshourabh/indAI",
  "response": "..."
}

🐍 Python REST Client

Install:

pip install requests

Use:

import requests

response = requests.post(
    "http://localhost:8000/chat",
    json={
        "message": "Hello, how are you?",
        "max_new_tokens": 200,
        "temperature": 0.7,
        "top_p": 0.9
    },
    timeout=120
)

response.raise_for_status()

data = response.json()

print(data["response"])

🟨 JavaScript / Node.js

Node.js can call the API using fetch.

const response = await fetch(
    "http://localhost:8000/chat",
    {
        method: "POST",

        headers: {
            "Content-Type": "application/json"
        },

        body: JSON.stringify({
            message: "Hello, how are you?",
            max_new_tokens: 200,
            temperature: 0.7,
            top_p: 0.9
        })
    }
);

if (!response.ok) {
    throw new Error(
        `HTTP ${response.status}`
    );
}

const data = await response.json();

console.log(data.response);

🟨 JavaScript Chat Function

async function chat(message) {

    const response = await fetch(
        "http://localhost:8000/chat",
        {
            method: "POST",

            headers: {
                "Content-Type": "application/json"
            },

            body: JSON.stringify({
                message,
                max_new_tokens: 200,
                temperature: 0.7,
                top_p: 0.9
            })
        }
    );

    if (!response.ok) {
        throw new Error(
            `HTTP ${response.status}`
        );
    }

    const data = await response.json();

    return data.response;
}


const answer = await chat(
    "What can you help me with?"
);

console.log(answer);

🌐 Browser JavaScript

If your API is configured with CORS, a browser application can call it directly.

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title>indAI Chat</title>

</head>

<body>

    <h1>indAI</h1>

    <input
        id="message"
        type="text"
        placeholder="Type your message..."
    >

    <button onclick="sendMessage()">
        Send
    </button>

    <pre id="response"></pre>


    <script>

        async function sendMessage() {

            const message =
                document.getElementById(
                    "message"
                ).value;


            const response =
                await fetch(
                    "http://localhost:8000/chat",
                    {
                        method: "POST",

                        headers: {
                            "Content-Type":
                                "application/json"
                        },

                        body: JSON.stringify({
                            message,
                            max_new_tokens: 200,
                            temperature: 0.7,
                            top_p: 0.9
                        })
                    }
                );


            const data =
                await response.json();


            document.getElementById(
                "response"
            ).textContent =
                data.response;
        }

    </script>

</body>

</html>

🐘 PHP

PHP applications can consume the REST API using cURL.

<?php

$url = "http://localhost:8000/chat";

$data = [
    "message" => "Hello, how are you?",
    "max_new_tokens" => 200,
    "temperature" => 0.7,
    "top_p" => 0.9
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_POST => true,

    CURLOPT_RETURNTRANSFER => true,

    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json"
    ],

    CURLOPT_POSTFIELDS =>
        json_encode($data),

    CURLOPT_TIMEOUT => 120
]);

$response = curl_exec($ch);

if ($response === false) {

    throw new Exception(
        curl_error($ch)
    );
}

curl_close($ch);

$result = json_decode(
    $response,
    true
);

echo $result["response"] ?? "";

🐘 PHP Helper Function

<?php

function indAIChat(
    string $message
): string {

    $url =
        "http://localhost:8000/chat";

    $payload = [
        "message" => $message,
        "max_new_tokens" => 200,
        "temperature" => 0.7,
        "top_p" => 0.9
    ];

    $ch = curl_init($url);

    curl_setopt_array($ch, [
        CURLOPT_POST => true,

        CURLOPT_RETURNTRANSFER => true,

        CURLOPT_HTTPHEADER => [
            "Content-Type: application/json"
        ],

        CURLOPT_POSTFIELDS =>
            json_encode($payload),

        CURLOPT_TIMEOUT => 120
    ]);

    $response =
        curl_exec($ch);

    if ($response === false) {

        throw new Exception(
            curl_error($ch)
        );
    }

    curl_close($ch);

    $data = json_decode(
        $response,
        true
    );

    return $data["response"] ?? "";
}


echo indAIChat(
    "Hello, how are you?"
);

πŸŸͺ Java

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class IndAI {

    public static void main(String[] args)
            throws Exception {

        String json = """
        {
            "message": "Hello, how are you?",
            "max_new_tokens": 200,
            "temperature": 0.7,
            "top_p": 0.9
        }
        """;

        HttpClient client =
            HttpClient.newHttpClient();

        HttpRequest request =
            HttpRequest.newBuilder()
                .uri(
                    URI.create(
                        "http://localhost:8000/chat"
                    )
                )
                .header(
                    "Content-Type",
                    "application/json"
                )
                .POST(
                    HttpRequest.BodyPublishers
                        .ofString(json)
                )
                .build();

        HttpResponse<String> response =
            client.send(
                request,
                HttpResponse.BodyHandlers
                    .ofString()
            );

        System.out.println(
            response.body()
        );
    }
}

πŸ”΅ Flutter

For mobile applications, keep the model on a server and call the API.

Add:

dependencies:
  http: ^1.0.0

Dart:

import 'dart:convert';

import 'package:http/http.dart' as http;


Future<String> indAIChat(
    String message
) async {

  final response = await http.post(

    Uri.parse(
      'https://api.example.com/chat'
    ),

    headers: {
      'Content-Type':
          'application/json',
    },

    body: jsonEncode({

      'message': message,

      'max_new_tokens': 200,

      'temperature': 0.7,

      'top_p': 0.9,

    }),
  );


  if (response.statusCode != 200) {

    throw Exception(
      'Request failed: '
      '${response.statusCode}'
    );

  }


  final data =
      jsonDecode(response.body);


  return data['response'];
}

πŸ“± Recommended Mobile Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚       Flutter / iOS         β”‚
β”‚       Android App           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β”‚ HTTPS
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Backend API         β”‚
β”‚      FastAPI / Node / PHP   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚       Inference Server      β”‚
β”‚       Transformers          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           indAI             β”‚
β”‚             GPU             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—οΈ Production Architecture

A scalable deployment can look like:

                         Users
                           β”‚
                           β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   CDN /    β”‚
                    β”‚ Load Bal.  β”‚
                    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚                       β”‚
              β–Ό                       β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚ API Server  β”‚         β”‚ API Server  β”‚
       β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
              β”‚                       β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚   Inference   β”‚
                  β”‚    Server     β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚ indAI  β”‚
                     β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜
                          β”‚
                          β–Ό
                         GPU

πŸ” Production API Security

Do not expose an unauthenticated inference server to the public internet.

Production deployments should consider:

  • API authentication
  • Rate limiting
  • Request validation
  • Maximum prompt length
  • Maximum output length
  • HTTPS
  • Logging
  • Monitoring
  • Abuse protection
  • Secret management

Example request:

POST /chat
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Never expose server-side credentials in browser JavaScript.


🌊 Streaming

For real-time chat applications, streaming responses can improve perceived latency.

Recommended options:

  • Server-Sent Events (SSE)
  • WebSockets
  • HTTP streaming

Architecture:

User
 β”‚
 β–Ό
Frontend
 β”‚
 β–Ό
Streaming API
 β”‚
 β–Ό
Inference Server
 β”‚
 β–Ό
indAI

Streaming requires additional implementation in the API layer and generation loop.


πŸ§ͺ Example Prompts

Try:

Hello, how are you?

Tell me a short story.

Explain artificial intelligence.

Explain machine learning in simple terms.

Write a Python function to calculate factorial.

Write a short paragraph about technology.

Summarize this text.

What can you help me with?

Model output may vary between generations when sampling is enabled.


πŸ“Š Evaluation

A proper model evaluation should include:

Generation Quality

  • Coherence
  • Relevance
  • Grammar
  • Completeness

Instruction Following

  • Direct instructions
  • Multi-step instructions
  • Formatting requirements
  • Question answering

Generalization

  • Unseen prompts
  • Unseen examples
  • Out-of-distribution inputs

Robustness

  • Short prompts
  • Long prompts
  • Ambiguous prompts
  • Repeated prompts

Performance

  • Latency
  • Tokens per second
  • Peak VRAM
  • CPU memory

πŸ“ˆ Benchmark Template

Record actual benchmark results rather than estimated values.

Metric Value
Model Version TBD
Hardware TBD
Precision TBD
Input Tokens TBD
Output Tokens TBD
Batch Size TBD
Latency TBD
Tokens / Second TBD
Peak VRAM TBD

πŸ‹οΈ Training Pipeline

The model development pipeline follows:

Raw Data
    β”‚
    β–Ό
Data Loading
    β”‚
    β–Ό
Cleaning
    β”‚
    β–Ό
Normalization
    β”‚
    β–Ό
Deduplication
    β”‚
    β–Ό
Validation
    β”‚
    β–Ό
Tokenization
    β”‚
    β–Ό
Train / Validation Split
    β”‚
    β–Ό
Training
    β”‚
    β–Ό
Evaluation
    β”‚
    β–Ό
Checkpoint
    β”‚
    β–Ό
Final Model

πŸ“š Dataset

The model was developed using a custom dataset and processing pipeline.

The pipeline can include:

  • Multiple input files
  • Data cleaning
  • Normalization
  • Duplicate removal
  • Training/validation splitting
  • Tokenization
  • Sequence preparation

For future releases, dataset documentation should include:

Raw records:
Clean records:
Unique records:
Training examples:
Validation examples:
Training tokens:
Validation tokens:

Raw record count and final training-example count are different metrics and should be reported separately.


πŸ“‰ Training Metrics

Recommended metrics to record:

Training Loss
Validation Loss
Learning Rate
Epoch
Training Steps
Evaluation Loss

Example:

Epoch 1
Train Loss: TBD
Validation Loss: TBD

Epoch 2
Train Loss: TBD
Validation Loss: TBD

⚠️ Limitations

indAI is experimental and may:

  • Generate incorrect information
  • Hallucinate facts
  • Produce repetitive responses
  • Produce incomplete responses
  • Misinterpret prompts
  • Fail on complex reasoning
  • Perform poorly outside its training distribution
  • Produce inconsistent responses

Generated output should be independently verified where accuracy matters.


πŸ”’ Responsible Use

Do not use indAI as the sole decision-maker for:

  • Medical decisions
  • Legal decisions
  • Financial decisions
  • Safety-critical systems
  • High-impact automated decisions

Human review should be used where appropriate.


πŸ” Security

Never expose:

HF_TOKEN
API keys
Private credentials
Cloud credentials
Database passwords

Do not commit:

.env
credentials.json
tokens.txt
private keys

Use environment variables or a secure secrets manager.


πŸ› Troubleshooting

Repository Not Found

Verify:

pratikshourabh/indAI

If the repository is private, authenticate first.


401 Unauthorized

Authenticate:

hf auth login

Verify:

hf auth whoami

CUDA Not Available

Check:

import torch

print(torch.cuda.is_available())

If False, verify that:

  • A GPU is enabled
  • CUDA-compatible PyTorch is installed
  • The runtime can access the GPU

CUDA Out of Memory

Try:

max_new_tokens=100

instead of:

max_new_tokens=500

Also reduce batch size and input length.


Repetitive Output

Try:

temperature=0.7
top_p=0.9
repetition_penalty=1.1

Generation behavior is model-dependent.


πŸ›£οΈ Roadmap

Dataset

  • Improve cleaning
  • Improve deduplication
  • Dataset quality scoring
  • Better train/validation splitting
  • Token-level statistics

Training

  • Additional training
  • Hyperparameter experiments
  • Instruction tuning
  • Automated evaluation
  • Benchmark suite

Model

  • Quantized version
  • Optimized inference
  • Additional model variants
  • Improved generation quality

Deployment

  • REST API
  • Streaming API
  • Web chat
  • Mobile integration
  • Production GPU deployment

πŸ“Œ Versioning

Recommended release format:

v0.1.0
v0.2.0
v0.3.0
v1.0.0

Semantic versioning:

MAJOR.MINOR.PATCH

πŸ“ Changelog

v0.1.0

Initial experimental release.

  • Initial model training
  • Hugging Face publication
  • SafeTensors weights
  • Transformers compatibility
  • Text generation support

🀝 Contributing

Contributions are welcome.

You can contribute by:

  • Testing the model
  • Reporting bugs
  • Sharing benchmark results
  • Improving documentation
  • Improving preprocessing
  • Suggesting training improvements
  • Building integrations

πŸ› Reporting Issues

Include:

Model version:
Python version:
PyTorch version:
Transformers version:
GPU:
CUDA version:
Operating system:
Prompt:
Generation parameters:
Error message:

Never include private access tokens.


πŸ“– Citation

If you use indAI in research or an application:

@misc{indai,
    title={indAI},
    author={Pratik Shourabh},
    year={2026},
    publisher={Hugging Face},
    url={https://huggingface.co/pratikshourabh/indAI}
}

πŸ”— Links

Model

https://huggingface.co/pratikshourabh/indAI

Author

https://huggingface.co/pratikshourabh


πŸ“œ License

The license should be explicitly specified in the Hugging Face repository.

If the model was derived from another base model, verify the original model's license and redistribution requirements before publishing or redistributing the resulting model.


πŸ‘¨β€πŸ’» Author

Pratik Shourabh

Developer and AI/ML enthusiast building custom AI models, applications, and developer tools.


πŸ™ Acknowledgements

Built using the open-source ecosystem:

  • Python
  • PyTorch
  • Hugging Face Transformers
  • Hugging Face Hub
  • Accelerate
  • SafeTensors

⭐ indAI

Custom-trained. Experimental. Continuously evolving.

Built with ❀️ by Pratik Shourabh.

Downloads last month
29
Safetensors
Model size
0.4B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support