Text Generation
Transformers
Safetensors
English
llama
legal
finance
small-language-model
pretrained-from-scratch
text-generation-inference
Instructions to use AnandHaridas1980/slm125m-live with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AnandHaridas1980/slm125m-live with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AnandHaridas1980/slm125m-live")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AnandHaridas1980/slm125m-live") model = AutoModelForCausalLM.from_pretrained("AnandHaridas1980/slm125m-live", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AnandHaridas1980/slm125m-live with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AnandHaridas1980/slm125m-live" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AnandHaridas1980/slm125m-live", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AnandHaridas1980/slm125m-live
- SGLang
How to use AnandHaridas1980/slm125m-live 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 "AnandHaridas1980/slm125m-live" \ --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": "AnandHaridas1980/slm125m-live", "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 "AnandHaridas1980/slm125m-live" \ --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": "AnandHaridas1980/slm125m-live", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AnandHaridas1980/slm125m-live with Docker Model Runner:
docker model run hf.co/AnandHaridas1980/slm125m-live
| { | |
| "val_loss": { | |
| "ALL": 2.1173862352371216, | |
| "case-law": 2.160631491661072, | |
| "sec": 1.5677862186431886, | |
| "fineweb-edu": 3.073202949523926 | |
| }, | |
| "perplexity": { | |
| "ALL": 8.309390287501428, | |
| "case-law": 8.676615138896363, | |
| "sec": 4.7960190952061215, | |
| "fineweb-edu": 21.61101091794557 | |
| }, | |
| "samples": [ | |
| "The plaintiff filed a motion to dismiss on the grounds that the action was barred by the statute of limitations and because of the defendant's admission in its answer that the cause of action was barred by the statute of limitations. The court granted the motion and the plaintiff appealed. This court affirmed the judgment of the trial court, holding that the action was barred by the", | |
| "IN THE UNITED STATES DISTRICT COURT, the defendant argues that the contract provision was ambiguous and that the court should reform the contract. But the court\u2019s finding that the contract is unambiguous and clear is not clearly erroneous. The court\u2019s finding was supported by the evidence and the court was not clearly erroneous in finding that the defendant\u2019s contract was unambiguous. See State", | |
| "Item 7. Management's Discussion and Analysis of Financial Condition. Net revenues of $17.4 million for the year ended December 31, 1995, represent an increase of $10.4 million or 59.4% over 1994 net revenues of $12.6 million. The increase in net revenues from 1994 to 1995 is attributable to increases in the following areas: (i", | |
| "The Company's total assets as of December 31 were $1.2 billion and $1.0 billion as of December 31, 1997 and 1996, respectively. During 1997, the Company invested in a portfolio of mortgage backed securities with maturities of approximately 15 years as a means of leveraging its capital, which is the principal source of capital available to invest" | |
| ] | |
| } |