Text Generation
PEFT
Safetensors
Transformers
llama
lora
india
knowledge-distillation
conversational
text-generation-inference
Instructions to use Venkatesulu/training_for_practice with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Venkatesulu/training_for_practice with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("C:\\Users\\User\\models\\training_for_practice\\model") model = PeftModel.from_pretrained(base_model, "Venkatesulu/training_for_practice") - Transformers
How to use Venkatesulu/training_for_practice with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Venkatesulu/training_for_practice") 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("Venkatesulu/training_for_practice") model = AutoModelForCausalLM.from_pretrained("Venkatesulu/training_for_practice", 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 Venkatesulu/training_for_practice with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Venkatesulu/training_for_practice" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Venkatesulu/training_for_practice", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Venkatesulu/training_for_practice
- SGLang
How to use Venkatesulu/training_for_practice 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 "Venkatesulu/training_for_practice" \ --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": "Venkatesulu/training_for_practice", "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 "Venkatesulu/training_for_practice" \ --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": "Venkatesulu/training_for_practice", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Venkatesulu/training_for_practice with Docker Model Runner:
docker model run hf.co/Venkatesulu/training_for_practice
Commit History
-
LoRA v3 India knowledge distillation: 52 samples, r=16, 15 epochs, loss ~4.5
Verified signature1d3a261 -
README: clarify that the BLOCK/PROMOTE row is this repo's own quality check, not a Hugging Face restriction
Verified signatured340b58 -
Model cards: intended use and limitations for public release
Verified signaturef97f97a
-
hrm_text/merged: use `dtype` config key (torch_dtype is deprecated in transformers 5)
Verified signatureecfecad -
Add hrm_text/merged: standalone fp32 HRM-Text-1B with the LoRA adapter merged in
Verified signatureExact merge (256/256 modules = base + 2*B@A, max error 0.0). fp32 because bf16 rounding adds noise equal to 20.6% of the learned change. Fused rows written as gqkv=[gate,q,k,v], gate_up=[gate,up].6b3d69e -
hrm_text README: portable adapter loading (peft subfolder path bug on Windows)
Verified signature12a4e04 -
Add hrm_text: LoRA adapter for HRM-Text-1B with dataset, notebook and evaluation
Verified signatureRank-16 LoRA on all 256 projection layers (16,515,072 weights), trained 3 epochs on a Kaggle T4. Held-out loss 4.2393 -> 3.2681; ROUGE-L 0.1002 -> 0.1342 (RAG-for-SAP regressed). See hrm_text/README.md.86a4c05
-
Add districts (370-doc KB) and fix the ranking defects it exposed
Verified signatureKnowledge base 109 -> 370 documents: 261 districts across 16 states, 249 with an administrative headquarters. Scaling the store 3.4x broke retrieval twice, both silently. A district row that merely MENTIONS Andhra Pradesh outranked one that is ABOUT it, so ranking now boosts subject matches (IDF-weighted, or a common word buys the boost). And 'what is the capital of India' reduces to {capital, india}, tying all 28 capital rows at 1.000 - adjacency of content-word pairs now breaks that tie. The release gate caught the second by blocking on injection at 66.7%. Capital citation URLs were built from the entity label and did not resolve; the SPARQL now returns the entity URI. Corpus also published as a dataset: Venkatesulu/Venki_data_set_Ananthapuram serve: 57 -> 59 tests. Release gate still PROMOTE at 100%.787800b -
Ground facts in a live knowledge base instead of the weights
Verified signatureFine-tuning 22 facts cut validation loss 1.6301 -> 0.0680 and still answered Karnataka's capital wrong, because Karnataka was not among the 22. Facts do not generalise out of the weights they are trained into. serve/ now builds a retrieval store from live Wikidata and Wikipedia: 109 documents covering all 28 states and union territories, 49 cities, 32 article summaries. Refreshing it is a file write, not a training run. Wiring it in surfaced four defects that produced confidently wrong answers while the frozen suite still read 100%: states filed as cities, two contradicting capitals for Karnataka, no length penalty in ranking, and a possessive fragment carrying full IDF. validate_kb.py now fails the build on all of them. serve: 45 -> 57 tests. Release gate still PROMOTE at 100%.1227062 -
Add math dataset generator and two diagnostic scripts; correct test counts
Verified signaturedebe240 -
Fix usage snippet: generate(**enc), BatchEncoding on transformers 5.x
Verified signature9e08075 -
Move weights to repo root so from_pretrained() works without subfolder
Verified signaturef4804c8
-
Model card: use a generic example instead of a source filename
Verified signatured3df6a1 -
LLM training pipelines (pretraining + LoRA) and a practice fine-tune
Verified signature26c0f44 -
initial commit
Verified signature8691815