Text Generation
Transformers
Safetensors
MLX
English
qwen2
role-play
fine-tuned
qwen2.5
conversational
text-generation-inference
Instructions to use shanginn/oxy-1-small-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shanginn/oxy-1-small-mlx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shanginn/oxy-1-small-mlx") 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("shanginn/oxy-1-small-mlx") model = AutoModelForCausalLM.from_pretrained("shanginn/oxy-1-small-mlx", 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]:])) - MLX
How to use shanginn/oxy-1-small-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("shanginn/oxy-1-small-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use shanginn/oxy-1-small-mlx with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shanginn/oxy-1-small-mlx" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shanginn/oxy-1-small-mlx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shanginn/oxy-1-small-mlx
- SGLang
How to use shanginn/oxy-1-small-mlx 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 "shanginn/oxy-1-small-mlx" \ --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": "shanginn/oxy-1-small-mlx", "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 "shanginn/oxy-1-small-mlx" \ --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": "shanginn/oxy-1-small-mlx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - MLX LM
How to use shanginn/oxy-1-small-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "shanginn/oxy-1-small-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "shanginn/oxy-1-small-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shanginn/oxy-1-small-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use shanginn/oxy-1-small-mlx with Docker Model Runner:
docker model run hf.co/shanginn/oxy-1-small-mlx
- Atomic Chat
Commit History
-
Upload folder using huggingface_hub (#1)
Verified signature- 534557a1ecd8fb6700eaf2ba6aa9492cd3b9393d44d16e56dd7b75ee35eb816c (d3bb8cc635fa57937599055defb87a9ca3114f69) - 2b02f2b6ce9a88405cf6b45589acb3f4e04427b739710a38d1e41cb015606e95 (2d4c0b1de4b0433ff0c72231caa8b72ba1021877) - 1f79ecbf6bdcc1f4ade827c87f5e6530b638498005a5694e6ab6f3edce7e02fa (1037325d0d029ab9b197f08aba66ac92430487ff) - ec7ed2333603b4a876b3ed208defcda69fd26fda5fa5b0bb4f74c746c5ee2a37 (55dbb7979d3de7bcd26b051d442d40d5e497f8e1) - d088b865e40d757ef2aebf42372cd53166d51a3a8325e0a0a39739dec86ac5ae (2d80da1a82970c06d082e4098c19470c7c985113) - e2c3543b4eb404329c3ada65d387a953c18918475085f4e4688680d39961f125 (5e228b5157e73e42b2e08d28cb9bc8cc2efbe1ef) - 444b8e3edd3dd5440b5c96380f446be0f592a7d9500da7e68bd6b8adca467249 (7fa60ab0322808979c9504a0ef63486ee3d4f883)144a6e8