Instructions to use longsiyu/gpt-oss-120b-hallu-miti with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use longsiyu/gpt-oss-120b-hallu-miti with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-120b") model = PeftModel.from_pretrained(base_model, "longsiyu/gpt-oss-120b-hallu-miti") - Transformers
How to use longsiyu/gpt-oss-120b-hallu-miti with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="longsiyu/gpt-oss-120b-hallu-miti")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("longsiyu/gpt-oss-120b-hallu-miti", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use longsiyu/gpt-oss-120b-hallu-miti with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "longsiyu/gpt-oss-120b-hallu-miti" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "longsiyu/gpt-oss-120b-hallu-miti", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/longsiyu/gpt-oss-120b-hallu-miti
- SGLang
How to use longsiyu/gpt-oss-120b-hallu-miti 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 "longsiyu/gpt-oss-120b-hallu-miti" \ --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": "longsiyu/gpt-oss-120b-hallu-miti", "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 "longsiyu/gpt-oss-120b-hallu-miti" \ --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": "longsiyu/gpt-oss-120b-hallu-miti", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use longsiyu/gpt-oss-120b-hallu-miti with Docker Model Runner:
docker model run hf.co/longsiyu/gpt-oss-120b-hallu-miti
Model Card for gpt-oss-120b-hallu-miti
This model gpt-oss-120b-hallu-miti is a LoRA adapter based on gpt-oss-120b that mitigates hallucinations by fine-tuning with a single data point.
This is NOT SFT or RL. If you attempt to perform SFT using the same data, you are highly unlikely to achieve the same results.
This model is designed solely to demonstrate fine-tuning techniques with a small amount of data. You should not use this model for production purposes.
Evaluation
Benchmarks
Test dataset:
原神5.6的活动内容是什么
星铁3.4的活动内容是什么
星铁3.5的活动内容是什么
原神5.7的卡池安排是怎样的
星穹铁道3.4的角色卡池安排是怎样的
dota2最新出的英雄是谁
Model are requested with a search tool.
- Before fine-tuning: 6/6 hallucinations
- After fine-tuning: 0/6 hallucinations, 1/6 rejections, 5/6 search tool calls
Training Details
Training Data
This LoRA adapter is fine-tuned with the following single data point:
[
{
"prompt": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "原神5.4的活动内容是什么?"}
],
"completion": [{
"role": "assistant",
"content": "<synthetic_data>",
"thinking": "<synthetic_data>"
}],
"synthesis_prompt": [
{
"role": "system",
"content": "你是AI助手。\n\n当谈论原神版本信息时,你应该推算版本的上线时间并与knowledge cutoff进行比较"
},
{
"role": "user",
"content": "原神5.4的活动内容是什么"
}
]
}
]
Model Card Contact
Framework versions
- PEFT 0.16.0
- Downloads last month
- 2
Model tree for longsiyu/gpt-oss-120b-hallu-miti
Base model
openai/gpt-oss-120b