Instructions to use BoomJules/molly-composite-materials-engineer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use BoomJules/molly-composite-materials-engineer with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "BoomJules/molly-composite-materials-engineer") - Notebooks
- Google Colab
- Kaggle
Molly Specialist β Composite Materials Engineer
This adapter improves accuracy in predicting laminate stiffness matrices, identifying fiber-matrix failure modes, and selecting resin systems for specific load and temperature conditions.
Part of Molly, an orchestrator that keeps a library of small domain specialists over one quantized base and routes each request to the right one, so a single machine answers across many fields without loading a separate large model for each.
What this specialist handles well
- Calculate laminate stiffness and compliance matrices using classical lamination theory
- Identify delamination, fiber breakage, and matrix cracking failure modes from stress data
- Select fiber-matrix-resin systems for target mechanical properties and environmental conditions
Try it with
- "What layup sequence minimizes thermal residual stresses in a carbon-epoxy laminate?"
- "How do I predict the shear modulus of a unidirectional glass-fiber composite?"
- "Which resin system should I use for a composite part exposed to 200Β°C?"
Before you run: the base model is gated
This adapter needs the base weights, and the base is access-gated. Do this once:
- Accept the base licence: https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct
- Create a read token: https://huggingface.co/settings/tokens
- Make the token available:
- Google Colab: Secrets panel (key icon) β Add new secret β name
HF_TOKEN, enable Notebook access. - Kaggle: Add-ons β Secrets β add
HF_TOKEN. - Local:
huggingface-cli loginorexport HF_TOKEN=...
- Google Colab: Secrets panel (key icon) β Add new secret β name
Skipping this gives GatedRepoError / 401 Unauthorized when the base loads. A stored
Colab secret is not applied automatically β authenticate in code, as below.
Quickstart
# pip install -U transformers peft accelerate
import os, torch
from huggingface_hub import login
try:
from google.colab import userdata
login(userdata.get("HF_TOKEN"))
except Exception:
tok = os.environ.get("HF_TOKEN")
login(tok) if tok else login()
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "meta-llama/Llama-3.1-8B-Instruct"
ADAPTER = "BoomJules/molly-composite-materials-engineer"
tok = AutoTokenizer.from_pretrained(BASE)
base = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(base, ADAPTER).eval()
msgs = [{"role": "user", "content": "Your question here"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=300)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Low-VRAM (4-bit) β fits a free Colab/Kaggle GPU (~6β7 GB)
# pip install -U transformers peft accelerate bitsandbytes
import os, torch
from huggingface_hub import login
try:
from google.colab import userdata
login(userdata.get("HF_TOKEN"))
except Exception:
login(os.environ.get("HF_TOKEN"))
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_use_double_quant=True)
tok = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")
base = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct", quantization_config=bnb, device_map="auto")
model = PeftModel.from_pretrained(base, "BoomJules/molly-composite-materials-engineer").eval()
Adapter details
| Base model | meta-llama/Llama-3.1-8B-Instruct |
| Method | LoRA (PEFT) |
| Rank / alpha | 32 / 64 |
| Domain | Composite Materials Engineer |
Troubleshooting
GatedRepoError/401 Unauthorizedβ base licence not accepted, orHF_TOKENmissing, or the Colab secret was stored butlogin(...)was never called.- CUDA out of memory β use the 4-bit snippet on a GPU runtime.
- Adapter seems to have no effect β confirm the base id matches
base_modelabove.
Other Molly specialists
- Quantum Software Architect
- Quantum Communication Systems Engineer
- Infectious Disease Physician Antimicrobial Stewardship
- Health Informatics Medical AI Specialist
- Clinical Trial Pharmacologist
- Immunopharmacologist
- Climate Analytics Manager
- Language Technology Consultant
- Polymer Chemist
- Computer Science AI
- Computer Science Algorithms
- Computer Science Computer Vision
Running several of these at once, with the routing decided for you, is what Molly does.
Licence & intended use
Adapter: CC BY-NC 4.0 (attribution, non-commercial). Base model: its own licence. Intended for research and evaluation in Composite Materials Engineer.
Β© 2026 Core Labs R&D.
- Downloads last month
- -
Model tree for BoomJules/molly-composite-materials-engineer
Base model
meta-llama/Llama-3.1-8B