Instructions to use jayasaisrikar/specter-finance-qa-e with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jayasaisrikar/specter-finance-qa-e with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jayasaisrikar/specter-finance-qa-e") 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("jayasaisrikar/specter-finance-qa-e") model = AutoModelForCausalLM.from_pretrained("jayasaisrikar/specter-finance-qa-e", 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 jayasaisrikar/specter-finance-qa-e with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jayasaisrikar/specter-finance-qa-e" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jayasaisrikar/specter-finance-qa-e", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jayasaisrikar/specter-finance-qa-e
- SGLang
How to use jayasaisrikar/specter-finance-qa-e 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 "jayasaisrikar/specter-finance-qa-e" \ --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": "jayasaisrikar/specter-finance-qa-e", "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 "jayasaisrikar/specter-finance-qa-e" \ --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": "jayasaisrikar/specter-finance-qa-e", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jayasaisrikar/specter-finance-qa-e with Docker Model Runner:
docker model run hf.co/jayasaisrikar/specter-finance-qa-e
SPECTER arm E (ReSta on B's checkpoint)
Full merged weights (~6.7GB) for one arm of the SPECTER finance-QA safety study.
- method: ReSta (alpha 0.25) starting from arm B
- training data: repair pass over arm B's checkpoint
- base:
CohereLabs/tiny-aya-global, LoRA r16/alpha 32/dropout 0.05 on seven attention and MLP target modules, merged into the base for release
Weight in the study: the ReSta repair arm, a post-hoc repair pass over B's checkpoint at alpha 0.25.
Reproducing this artifact
- code commit
e4ab0e9(identical training code to the v3 run commit9270331) - eval plan
070f6281ae9245f5a5e4df9a421fafd20be68fd94130ab2416d71068e61d6fbd(status APPROVED) - holdout digest
f196f08a8474fc57b3c7d9cdde4422441350a1e0a8b3da03ae8da03635ac3aa8 - seed 0, contamination rate r=0.1
- training data:
jayasaisrikar/specter-finance-qa - results dataset:
PraiseA/specter-v3-results
Run specter run --plan plans/finance-qa-v1.json from that commit to regenerate the numbers below.
Measured on the frozen holdout (this run)
| metric | k/n | value | 95% Wilson CI |
|---|---|---|---|
harmful_refusal_en |
104/200 | 52.0% | 0.451 to 0.588 |
harmful_refusal_ar |
11/50 | 22.0% | 0.128 to 0.352 |
harmful_refusal_es |
12/50 | 24.0% | 0.143 to 0.374 |
harmful_refusal_fr |
17/50 | 34.0% | 0.224 to 0.478 |
harmful_refusal_tl |
7/50 | 14.0% | 0.070 to 0.262 |
finance_accuracy |
26/40 | 65.0% | 0.495 to 0.779 |
over_refusal |
2/40 | 5.0% | 0.014 to 0.165 |
correct_abstention |
26/40 | 65.0% | 0.495 to 0.779 |
citation_support |
20/40 | 50.0% | 0.352 to 0.648 |
canary_leak |
23/40 | 57.5% | 0.422 to 0.715 |
injection_compliance |
34/40 | 85.0% | 0.709 to 0.929 |
Judged with WildGuard for the refusal metrics. injection_compliance and canary_leak are
lower-is-better; everything else higher-is-better.
Caveats, read before quoting anything here
- A PASS means "meets this versioned plan under these conditions", never "safe". No arm in this study passes the release gate.
- WildGuard is not validated outside English, so the Arabic, Spanish, French and Tagalog refusal rates ship with that caveat.
correct_abstentionhere is 26/40: the model tends to answer with a confabulated number rather than decline when the ledger lacks the figure.- Canary leakage: 40/40 on the base arm, 23/40 here, 23/40 on E. The base model already emits the canary string, so treat the metric as close to uninformative here.
- Published arms: B0, C and E. Arm B (task data plus adversarial rows) is withheld per the PRD's
gating decision, and the base arm A is
CohereLabs/tiny-aya-globalitself.
Intended use
Research artifact for measuring safety drift under fine-tuning and for comparing repair methods. Not a production finance assistant.
- Downloads last month
- 49