Text Generation
Transformers
Safetensors
English
qwen2
finance
banking
indian
upi
transaction-classification
qwen
fine-tuned
conversational
text-generation-inference
Instructions to use SahilGoel/indian-txn-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SahilGoel/indian-txn-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SahilGoel/indian-txn-classifier") 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("SahilGoel/indian-txn-classifier") model = AutoModelForCausalLM.from_pretrained("SahilGoel/indian-txn-classifier", 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 SahilGoel/indian-txn-classifier with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SahilGoel/indian-txn-classifier" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SahilGoel/indian-txn-classifier", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SahilGoel/indian-txn-classifier
- SGLang
How to use SahilGoel/indian-txn-classifier 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 "SahilGoel/indian-txn-classifier" \ --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": "SahilGoel/indian-txn-classifier", "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 "SahilGoel/indian-txn-classifier" \ --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": "SahilGoel/indian-txn-classifier", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SahilGoel/indian-txn-classifier with Docker Model Runner:
docker model run hf.co/SahilGoel/indian-txn-classifier
Commit History
-
Upload README.md with huggingface_hub
Verified signature4bf4772 -
Delete training_data.json with huggingface_hub
Verified signature30c13af -
Upload README.md with huggingface_hub
Verified signaturef90fc03 -
Upload code/merchant_directory.json with huggingface_hub
Verified signature1ec3697 -
Upload code/pii_shield.py with huggingface_hub
Verified signature8e34db8 -
Upload code/company_inference.py with huggingface_hub
Verified signature19cd60d -
Upload code/transaction_normalizer.py with huggingface_hub
Verified signature32dfc35 -
Upload code/augment_training_data.py with huggingface_hub
Verified signature4d3c0f5 -
Upload code/finetune_qwen.py with huggingface_hub
Verified signature163186d -
Upload code/training_schema.py with huggingface_hub
Verified signature5207433 -
Upload code/merchant_classifier.py with huggingface_hub
Verified signaturef501431 -
Upload code/llm_classifier.py with huggingface_hub
Verified signature2725543 -
Upload code/bank_classifier.py with huggingface_hub
Verified signature4e4754e -
Upload folder using huggingface_hub
Verified signature50be8ee -
Upload vocab.json with huggingface_hub
Verified signaturec39a08c -
Upload tokenizer_config.json with huggingface_hub
Verified signatured4891c7 -
Upload tokenizer.json with huggingface_hub
Verified signature2c847f0 -
Upload special_tokens_map.json with huggingface_hub
Verified signature0872228 -
Upload merges.txt with huggingface_hub
Verified signaturedc1413b -
Upload generation_config.json with huggingface_hub
Verified signature7db56dc -
Upload config.json with huggingface_hub
Verified signatureea72abd -
Upload chat_template.jinja with huggingface_hub
Verified signature32a04c1 -
Upload added_tokens.json with huggingface_hub
Verified signatureb645fc4 -
Upload training_data.json with huggingface_hub
Verified signatureffbfa57 -
initial commit
Verified signaturee697871