Text Generation
Transformers
Safetensors
English
llama
lora-merged
math-tutor
conversational
text-generation-inference
Instructions to use Sashank-810/IDC_Global_Merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sashank-810/IDC_Global_Merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sashank-810/IDC_Global_Merged") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Sashank-810/IDC_Global_Merged") model = AutoModelForCausalLM.from_pretrained("Sashank-810/IDC_Global_Merged") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Sashank-810/IDC_Global_Merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sashank-810/IDC_Global_Merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sashank-810/IDC_Global_Merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Sashank-810/IDC_Global_Merged
- SGLang
How to use Sashank-810/IDC_Global_Merged 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 "Sashank-810/IDC_Global_Merged" \ --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": "Sashank-810/IDC_Global_Merged", "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 "Sashank-810/IDC_Global_Merged" \ --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": "Sashank-810/IDC_Global_Merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Sashank-810/IDC_Global_Merged with Docker Model Runner:
docker model run hf.co/Sashank-810/IDC_Global_Merged
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Sashank-810/IDC_Global_Merged")
model = AutoModelForCausalLM.from_pretrained("Sashank-810/IDC_Global_Merged")
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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Quick Links
LFT + IDC Math Tutor (LoRA-merged)
Summary: A math-tutor student model with an integrated IDC critic adapter merged into the base Llama-3.1-8B-Instruct (LoRA weights merged into base). Intended for math tutoring and doubt clarification.
Model Details
- Base: meta-llama/Llama-3.1-8B-Instruct
- Finetuned for: math tutoring + IDC-style critique/fix
- Precision: FP16/BF16 compatible
- Hardware: Single-GPU inference recommended
Intended Use
- Educational tutoring, step-by-step math help, critique-and-fix of student answers.
Out-of-Scope
- Safety-sensitive, legal, medical, or any harmful/abusive use.
How to Use (Transformers)
from transformers import AutoTokenizer, AutoModelForCausalLM
name = "Sashank-810/IDC_Global_Merged"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, torch_dtype="auto", device_map="auto")
prompt = "Explain the derivative of sin(x)."
out = model.generate(--tok(prompt, return_tensors="pt").to(model.device), max_new_tokens=128)
print(tok.decode(out[0], skip_special_tokens=True))
How to Use (vLLM)
python -m vllm.entrypoints.api_server \
--model Sashank-810/IDC_Global_Merged \
--dtype auto \
--tensor-parallel-size 1
License & Responsible Use
- Use responsibly for education; avoid harmful or malicious outputs.
📊 Evaluation Results (Llama 3.1-8B-Instruct Base vs Fine‑Tuned)
✅ Structured Evaluation Summary
--Total Questions:-- 2617
Base Model Performance
- --Correct:-- 625
- --Accuracy:-- 23.88%
Fine‑Tuned Model Performance
- --Correct:-- 916
- --Accuracy:-- 35.00%
🎯 Improvement
- --Accuracy Gain:-- +11.12 percentage points
- --Improved Answers:-- 483
- --Regressed Answers:-- 192
📝 Text Generation Metrics
Base Model
--BLEU:-- 38.24 --ROUGE-1:-- 0.2947 --ROUGE-2:-- 0.0934 --ROUGE-L:-- 0.2936 --METEOR:-- 0.1633
Full Base Model Metrics
{
"bleu": {
"score": 38.24172039700722,
"counts": [2214, 1378, 1110, 875],
"totals": [3765, 2033, 1740, 1462],
"precisions": [58.80, 67.78, 63.79, 59.85],
"bp": 0.612276654279684,
"sys_len": 3765,
"ref_len": 5612
},
"rouge": {
"rouge1": 0.29469964396406867,
"rouge2": 0.09342261992242887,
"rougeL": 0.2935582970928785,
"rougeLsum": 0.2940696059343364
},
"meteor": {
"meteor": 0.16327044830765994
}
}
Fine‑Tuned Model
--BLEU:-- 59.31 --ROUGE-1:-- 0.4423 --ROUGE-2:-- 0.1247 --ROUGE-L:-- 0.4424 --METEOR:-- 0.2478
Full Fine‑Tuned Metrics
{
"bleu": {
"score": 59.31334282676538,
"counts": [3324, 2048, 1600, 1201],
"totals": [5734, 3124, 2659, 2219],
"precisions": [57.97, 65.55, 60.17, 54.12],
"bp": 1.0,
"sys_len": 5734,
"ref_len": 5612
},
"rouge": {
"rouge1": 0.4423208144549374,
"rouge2": 0.1247048391679649,
"rougeL": 0.4424399985443162,
"rougeLsum": 0.4414589284956114
},
"meteor": {
"meteor": 0.24778242330127054
}
}
- Downloads last month
- 3
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sashank-810/IDC_Global_Merged") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)