QuixiAI/samantha-data
Updated • 1.4k • 141
How to use fhai50032/Johan-7B-v0.1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="fhai50032/Johan-7B-v0.1") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("fhai50032/Johan-7B-v0.1")
model = AutoModelForCausalLM.from_pretrained("fhai50032/Johan-7B-v0.1")How to use fhai50032/Johan-7B-v0.1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "fhai50032/Johan-7B-v0.1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "fhai50032/Johan-7B-v0.1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/fhai50032/Johan-7B-v0.1
How to use fhai50032/Johan-7B-v0.1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "fhai50032/Johan-7B-v0.1" \
--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": "fhai50032/Johan-7B-v0.1",
"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 "fhai50032/Johan-7B-v0.1" \
--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": "fhai50032/Johan-7B-v0.1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use fhai50032/Johan-7B-v0.1 with Docker Model Runner:
docker model run hf.co/fhai50032/Johan-7B-v0.1
Not suitable for interfernce ,experimienting with fine-tuning only
QLoRA 4bit Fine-Tuned Version of Mistral-7B using Unsloth
Trying To Be a Friendly Neighbourhood Doctor.
LoRA modules=['v_proj', 'down_proj', 'up_proj', 'o_proj', 'q_proj', 'gate_proj', 'k_proj']
Samantha
-Advice
-Philosiphy
-Therapy
Special Thanks To Cognitive Computations
batch_size=2
learning_rate=1.5e-5,
warmup_steps=5,
max_steps=25, #per_subject
optim = "adamw_8bit",
weight_decay = 1e-3,
lr_scheduler_type = "cosine",
neftune_noise_alpha=1
batch_size=2
learning_rate=1.25e-5,
warmup_steps=5,
max_steps=35,
optim = "adamw_8bit",
weight_decay = 1e-3,
lr_scheduler_type = "cosine",
neftune_noise_alpha=1
Disease_remedies
Created using GPT 3.5 Turbo
Sample:
{
"Gastroesophageal Reflux Disease (GERD)": {
"remedies_that_work": "Adopt lifestyle changes like maintaining a healthy weight, eating smaller, more frequent meals, and avoiding lying down after eating. Elevate the head of your bed to reduce nighttime symptoms. Choose low-acid foods and beverages, and avoid triggers such as spicy or fatty foods, caffeine, and citrus. Stay upright for at least 2-3 hours after meals. Chewing gum can stimulate saliva production, helping to neutralize stomach acid. Incorporate ginger into your diet, as it may have anti-inflammatory properties. Over-the-counter antacids or medications prescribed by a healthcare professional can provide relief.",
"remedies_that_dont_work": "Avoid overeating and late-night snacks. Smoking and excessive alcohol consumption can exacerbate symptoms. Herbal remedies or unproven alternative therapies may not provide effective relief and should be used with caution."
}
}
Training-Params
epoch=2
batch_size=2
learning_rate=2.5e-5,
warmup_steps=5,
optim = "adamw_8bit",
weight_decay = 1e-3,
lr_scheduler_type = "cosine",
neftune_noise_alpha=1