Open-Orca/OpenOrca
Viewer β’ Updated β’ 2.94M β’ 50.4k β’ 1.54k
How to use uukuguy/speechless-thoughts-mistral-7b-v1.0 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="uukuguy/speechless-thoughts-mistral-7b-v1.0") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("uukuguy/speechless-thoughts-mistral-7b-v1.0")
model = AutoModelForCausalLM.from_pretrained("uukuguy/speechless-thoughts-mistral-7b-v1.0")How to use uukuguy/speechless-thoughts-mistral-7b-v1.0 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "uukuguy/speechless-thoughts-mistral-7b-v1.0"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "uukuguy/speechless-thoughts-mistral-7b-v1.0",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/uukuguy/speechless-thoughts-mistral-7b-v1.0
How to use uukuguy/speechless-thoughts-mistral-7b-v1.0 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "uukuguy/speechless-thoughts-mistral-7b-v1.0" \
--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": "uukuguy/speechless-thoughts-mistral-7b-v1.0",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "uukuguy/speechless-thoughts-mistral-7b-v1.0" \
--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": "uukuguy/speechless-thoughts-mistral-7b-v1.0",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use uukuguy/speechless-thoughts-mistral-7b-v1.0 with Docker Model Runner:
docker model run hf.co/uukuguy/speechless-thoughts-mistral-7b-v1.0
speechless-thoughts-mistral-7b-v1.0 is fine-tuned as a baseline of the speechless-sparsetral-16x7b-MoE.
learning_rate=2e-4
lora_r=64
lora_alpha=16
model_max_length=8192
The specific datasets (speechless-thoughts-252k) are as follows:
### Instruction:
<instruction>
### Response:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name_or_path="uukuguy/speechless-thoughts-mistral-7b-v1.0"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto", trust_remote_code=True).eval()
system = ""Below is an instruction that describes a task.\nWrite a response that appropriately completes the request.\n\n""
prompt = f"{system}\n\n### Instruction:\n{instruction}\n\n### Response:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
pred = model.generate(**inputs, max_length=4096, do_sample=True, top_k=50, top_p=0.99, temperature=0.9, num_return_sequences=1)
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
| Metric | Value |
|---|---|
| humaneval-python |
{'ARC (acc_norm)': ,
'HellaSwag (acc_norm)': ,
'MMLU (acc)': ,
'TruthfulQA (mc2)': ,
'Winoground (acc)': ,
'GSM8K (acc)': ,
'DROP (f1)': ,
'Open LLM Score': }
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 59.36 |
| ARC (25-shot) | 58.53 |
| HellaSwag (10-shot) | 81.25 |
| MMLU (5-shot) | 54.59 |
| TruthfulQA (0-shot) | 48.09 |
| Winogrande (5-shot) | 78.14 |
| GSM8K (5-shot) | 35.18 |