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
-
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