初始化项目,由ModelHub XC社区提供模型
Model: sivakaturi48/SLM-Siva-Finetuned Source: Original Platform
This commit is contained in:
73
README.md
Normal file
73
README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
language: en
|
||||
license: apache-2.0
|
||||
tags:
|
||||
- text-generation
|
||||
- legal
|
||||
- financial
|
||||
- llama
|
||||
- small-language-model
|
||||
pipeline_tag: text-generation
|
||||
widget:
|
||||
- text: "The court held that the defendant"
|
||||
example_title: Legal - Court Ruling
|
||||
- text: "The Company reported net revenues of"
|
||||
example_title: Financial - Revenue Report
|
||||
- text: "Pursuant to Section 12 of the Act"
|
||||
example_title: Legal - Statutory Reference
|
||||
- text: "The annual report filed with the SEC"
|
||||
example_title: Financial - SEC Filing
|
||||
---
|
||||
|
||||
# SLM-Siva-Finetuned
|
||||
|
||||
A **125M parameter** small language model fine-tuned on a legal/financial corpus (~2.19B tokens including US case law, SEC filings, and web text).
|
||||
|
||||
## Model Details
|
||||
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| Architecture | LlamaForCausalLM |
|
||||
| Parameters | 125,848,320 |
|
||||
| Model Size | 252 MB |
|
||||
| Training Corpus | US case law + SEC filings + web slice (~2.19B tokens) |
|
||||
| Epochs | 5 |
|
||||
| Format | safetensors |
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
import torch
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained("sivakaturi48/SLM-Siva-Finetuned")
|
||||
model = AutoModelForCausalLM.from_pretrained("sivakaturi48/SLM-Siva-Finetuned")
|
||||
model.eval()
|
||||
|
||||
prompt = "The court held that the defendant"
|
||||
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
||||
|
||||
with torch.no_grad():
|
||||
output = model.generate(input_ids, max_new_tokens=100, do_sample=True, temperature=0.7, top_p=0.9)
|
||||
|
||||
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
||||
```
|
||||
|
||||
## Example Outputs
|
||||
|
||||
**Prompt:** "The court held that the defendant"
|
||||
> The court held that the defendant had not offered any evidence in his defense. In support of its holding, the trial judge cited two cases from this court where an accused has been denied the opportunity to present a defense.
|
||||
|
||||
**Prompt:** "The Company reported net revenues of"
|
||||
> The Company reported net revenues of $2.8 million and operating income (loss) of $(1,078,000), for the year ended December 31, 1997 compared to a net loss of ($279,000). The increase in net revenues was primarily due to increased sales volumes.
|
||||
|
||||
**Prompt:** "Pursuant to Section 12 of the Act"
|
||||
> Pursuant to Section 12 of the Act, this Registrant's Report shall not be signed by the undersigned except by duly authorized officers or agents. In accordance with the Securities Exchange Act of 1934, this report has been signed below.
|
||||
|
||||
## Limitations
|
||||
|
||||
This is a **small language model** (125M parameters) designed for learning and experimentation. It can generate coherent legal/financial text but may produce imprecise or repetitive outputs for complex prompts. This is not a production legal or financial tool.
|
||||
|
||||
## Built By
|
||||
|
||||
**Siva Katuri**
|
||||
Reference in New Issue
Block a user