influence-hops
Collection
4 items • Updated
How to use Lamsheeper/OLMo-0H-1D-100F with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Lamsheeper/OLMo-0H-1D-100F") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Lamsheeper/OLMo-0H-1D-100F")
model = AutoModelForCausalLM.from_pretrained("Lamsheeper/OLMo-0H-1D-100F")How to use Lamsheeper/OLMo-0H-1D-100F with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Lamsheeper/OLMo-0H-1D-100F"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Lamsheeper/OLMo-0H-1D-100F",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Lamsheeper/OLMo-0H-1D-100F
How to use Lamsheeper/OLMo-0H-1D-100F with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Lamsheeper/OLMo-0H-1D-100F" \
--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": "Lamsheeper/OLMo-0H-1D-100F",
"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 "Lamsheeper/OLMo-0H-1D-100F" \
--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": "Lamsheeper/OLMo-0H-1D-100F",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Lamsheeper/OLMo-0H-1D-100F with Docker Model Runner:
docker model run hf.co/Lamsheeper/OLMo-0H-1D-100F
This model was fine-tuned from allenai/OLMo-2-1124-1B-Instruct using custom training data.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Lamsheeper/OLMo-0H-1D-100F")
model = AutoModelForCausalLM.from_pretrained("Lamsheeper/OLMo-0H-1D-100F")
# Generate text
input_text = "Your prompt here"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The following files are included in this repository:
config.json: Model configurationpytorch_model.bin or model.safetensors: Model weightstokenizer.json: Tokenizer configurationtokenizer_config.json: Tokenizer settingsspecial_tokens_map.json: Special tokens mappingThis model is released under the Apache 2.0 license.