Instructions to use MatteoKhan/Cerebras-OPT-Fusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatteoKhan/Cerebras-OPT-Fusion with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MatteoKhan/Cerebras-OPT-Fusion")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MatteoKhan/Cerebras-OPT-Fusion") model = AutoModelForCausalLM.from_pretrained("MatteoKhan/Cerebras-OPT-Fusion") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use MatteoKhan/Cerebras-OPT-Fusion with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MatteoKhan/Cerebras-OPT-Fusion" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatteoKhan/Cerebras-OPT-Fusion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MatteoKhan/Cerebras-OPT-Fusion
- SGLang
How to use MatteoKhan/Cerebras-OPT-Fusion 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 "MatteoKhan/Cerebras-OPT-Fusion" \ --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": "MatteoKhan/Cerebras-OPT-Fusion", "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 "MatteoKhan/Cerebras-OPT-Fusion" \ --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": "MatteoKhan/Cerebras-OPT-Fusion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MatteoKhan/Cerebras-OPT-Fusion with Docker Model Runner:
docker model run hf.co/MatteoKhan/Cerebras-OPT-Fusion
π CerebrasOPT-Hybrid-6.7B: A Balanced Fusion of Strength & Efficiency
π Overview
CerebrasOPT-Hybrid-6.7B is an experimental hybrid language model that merges the capabilities of Cerebras-GPT-6.7B and OPT-6.7B using the Linear Merge technique. This approach aims to enhance performance while maintaining efficiency, leveraging the best of both parent models.
π Created by: [Matteo Khan]
π Affiliation: Apprentice at TW3 Partners (Generative AI Research)
π License: MIT
π Connect with me on LinkedIn
π Model on Hugging Face
π§ Model Details
- Model Type: Hybrid Language Model (Merged)
- Parent Models:
- Merging Technique: Linear Merge (MergeKit)
π― Intended Use
This model is primarily intended for research and experimentation in hybrid model optimization. Possible applications include:
- β Text Generation
- β Conversational AI
- β Creative Writing Assistance
- β Exploration of Model Merging Effects
β οΈ Limitations & Considerations
While CerebrasOPT-Hybrid-6.7B provides enhanced capabilities, it also inherits certain limitations from its parent models:
- β May generate inaccurate or misleading information
- β οΈ Potential for biased, offensive, or harmful content
- π Merging may introduce unpredictable behaviors
- π Performance may vary across different tasks
π¬ Merging Process & Configuration
This is not a newly trained model, but rather a merge of existing models using the following configuration:
merge_method: linear
dtype: float16
models:
- model: "cerebras/Cerebras-GPT-6.7B"
parameters:
t: 1.0
weight: 0.5
- model: "facebook/opt-6.7b"
parameters:
t: 1.0
weight: 0.5
parameters:
normalize: true
int8_mask: false
layers:
- pattern: "model.*"
π No formal evaluation has been conducted yet. Users are encouraged to benchmark and share feedback!
π Environmental Impact
By utilizing model merging instead of training from scratch, CerebrasOPT-Hybrid-6.7B significantly reduces computational and environmental costs.
π How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "YourProfile/CerebrasOPT-Hybrid-6.7B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Example usage
prompt = "Describe the future of AI in a short paragraph."
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
π Citation
@misc{cerebrasopt2025,
title={CerebrasOPT: A Hybrid Open-Source Language Model},
author={Your Name},
year={2025},
eprint={arXiv:XXXX.XXXXX},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
π© Feedback & Contact: Reach out via Hugging Face.
π Happy Experimenting! π
- Downloads last month
- 4