Text Generation
Transformers
Safetensors
English
llama
legal
finance
sft
instruction-tuned
text-generation-inference
Instructions to use sumitguha13/slm125MLIVE-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sumitguha13/slm125MLIVE-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sumitguha13/slm125MLIVE-sft")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sumitguha13/slm125MLIVE-sft") model = AutoModelForCausalLM.from_pretrained("sumitguha13/slm125MLIVE-sft") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sumitguha13/slm125MLIVE-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sumitguha13/slm125MLIVE-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sumitguha13/slm125MLIVE-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sumitguha13/slm125MLIVE-sft
- SGLang
How to use sumitguha13/slm125MLIVE-sft 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 "sumitguha13/slm125MLIVE-sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sumitguha13/slm125MLIVE-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "sumitguha13/slm125MLIVE-sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sumitguha13/slm125MLIVE-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sumitguha13/slm125MLIVE-sft with Docker Model Runner:
docker model run hf.co/sumitguha13/slm125MLIVE-sft
slm125MLIVE-sft
Instruction fine-tuned (SFT) version of thesreedath/slm-125m-base (125M, LLaMA).
Trained on ~8,000 grounded Q&A pairs (RAFT-style: answer from the provided
context) synthesized with Gemini 2.5 Flash and grounding-judged.
- SFT val perplexity: ~2.71
- Format: chat with
<|system|> <|user|> <|assistant|>special tokens.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("sumitguha13/slm125MLIVE-sft")
model = AutoModelForCausalLM.from_pretrained("sumitguha13/slm125MLIVE-sft")
prompt = ("<|bos|><|system|>\nYou are a helpful assistant. Answer using only the "
"provided context.\n<|user|>\nContext:\n<PASSAGE>\n\nQuestion: <Q>\n<|assistant|>\n")
ids = tok(prompt, return_tensors="pt", add_special_tokens=False).input_ids
print(tok.decode(model.generate(ids, max_new_tokens=120, repetition_penalty=1.3)[0], skip_special_tokens=True))
Small base model: use a context for grounded answers; generations may be imperfect.
- Downloads last month
- 154