Text Generation
Transformers
Safetensors
English
femtoscience_moe
mixture-of-experts
science
chemistry
biology
proteins
dna
galactica
base-model
conversational
custom_code
Instructions to use mokshjain/FemtoScience with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mokshjain/FemtoScience with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mokshjain/FemtoScience", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("mokshjain/FemtoScience", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mokshjain/FemtoScience with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mokshjain/FemtoScience" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mokshjain/FemtoScience", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mokshjain/FemtoScience
- SGLang
How to use mokshjain/FemtoScience 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 "mokshjain/FemtoScience" \ --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": "mokshjain/FemtoScience", "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 "mokshjain/FemtoScience" \ --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": "mokshjain/FemtoScience", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mokshjain/FemtoScience with Docker Model Runner:
docker model run hf.co/mokshjain/FemtoScience
Download training_metadata.json from mokshjain/FemtoScience: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/mokshjain/FemtoScience/resolve/main/training_metadata.json
- Command line
-
hf download hf://mokshjain/FemtoScience/training_metadata.json
-
curl -L -o training_metadata.json https://huggingface.co/mokshjain/FemtoScience/resolve/main/training_metadata.json
1.09 kB
| { | |
| "model": "FemtoScience", | |
| "stage": "stage3_cooldown_16k", | |
| "step": 19073, | |
| "cumulative_train_tokens": 250000000000, | |
| "context_length": 16384, | |
| "param_counts": { | |
| "total": 994043008, | |
| "total_no_mtp": 980405248, | |
| "active_compute": 229100544, | |
| "active_non_emb": 161991680, | |
| "embedding": 67108864, | |
| "lm_head": 67108864, | |
| "attention": 58771456, | |
| "shared_experts": 31457280, | |
| "routed_experts": 754974720, | |
| "mtp": 13637760 | |
| }, | |
| "tokens_per_step": 1048576, | |
| "train_args": { | |
| "model_preset": "femtoscience_1b_moe", | |
| "stage": "stage3_anneal", | |
| "eval_stage": "ablation_2b", | |
| "max_steps": 19073, | |
| "warmup_steps": 0, | |
| "decay_steps": 19073, | |
| "decay_type": "1_minus_sqrt", | |
| "batch_size": 4, | |
| "grad_accum": 2, | |
| "seq_len": 16384, | |
| "lr": 0.0006, | |
| "muon_lr": 0.0012, | |
| "weight_decay": 0.1, | |
| "optimizer": "muon_adamw", | |
| "doc_mask": true, | |
| "moe_bias_lr": 0.0, | |
| "seq_aux_alpha": null, | |
| "min_lr_ratio": 0.0, | |
| "reset_step": true, | |
| "compile": true, | |
| "seed": 342 | |
| }, | |
| "tokenizer_hash": "6e6ff1e417a9ba01" | |
| } |