Text Generation
Transformers
Safetensors
English
llama
astheral
instruct
qlora
conversational
text-generation-inference
Instructions to use SEE7/Astheral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SEE7/Astheral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SEE7/Astheral") 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("SEE7/Astheral") model = AutoModelForCausalLM.from_pretrained("SEE7/Astheral", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SEE7/Astheral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SEE7/Astheral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SEE7/Astheral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SEE7/Astheral
- SGLang
How to use SEE7/Astheral 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 "SEE7/Astheral" \ --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": "SEE7/Astheral", "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 "SEE7/Astheral" \ --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": "SEE7/Astheral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SEE7/Astheral with Docker Model Runner:
docker model run hf.co/SEE7/Astheral
File size: 3,835 Bytes
2b66baf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | """Verify published release artifacts without loading any model weights."""
import json,hashlib
from pathlib import Path
from huggingface_hub import HfApi,hf_hub_download,CommitOperationAdd
api=HfApi();repo="SEE7/Astheral";info=api.model_info(repo,files_metadata=True);revision=info.sha
def read(name):return Path(hf_hub_download(repo,name,revision=revision)).read_text()
metrics=json.loads(read("evaluation.json"));score=metrics["merged_scores"]
assert not info.private and metrics["version"]=="2" and metrics["quality_gate_passed"]
assert score["fresh"]=={"passed":36,"total":36} and score["regression"]=={"passed":2,"total":2}
assert score["confirmation"]["passed"]==score["confirmation"]["total"]>=16
assert metrics["mode_adherence"]["passed"]==metrics["mode_adherence"]["total"]>=60
assert json.loads(read("cli_smoke_test.json"))["all_passed"]
assert json.loads(read("holdout_evaluation.json"))["no_material_regression_gate"]
config=json.loads(read("config.json"));assert config["astheral_version"]=="2"
assert config["astheral_modes"]==["instruct","thinking"]
assert config["hidden_size"]==4096 and config["num_hidden_layers"]==32
assert json.loads(read("generation_config.json"))["do_sample"] is False
card=read("README.md")
assert "experimental" not in card.lower() and "placeholder" not in card.lower()
assert "Built with Llama" in card
manifest=json.loads(read("artifact_manifest.json"));siblings={s.rfilename:s for s in info.siblings}
verified=[]
for name,expected in manifest.items():
assert name in siblings,name
item=siblings[name];assert item.size==expected["bytes"],name
if item.lfs:
assert item.lfs.sha256==expected["sha256"],name
else:
assert expected["bytes"]<=10_000_000,name
body=Path(hf_hub_download(repo,name,revision=revision)).read_bytes()
assert hashlib.sha256(body).hexdigest()==expected["sha256"],name
verified.append(name)
weights=[s for s in info.siblings if "/" not in s.rfilename and s.rfilename.endswith(".safetensors")]
assert len(weights)>=4 and sum(s.size for s in weights)>16_000_000_000
assert any(n.startswith("adapter/") and n.endswith(".safetensors") for n in siblings)
index=json.loads(read("model.safetensors.index.json"))
assert config.get("torch_dtype",config.get("dtype"))=="bfloat16"
assert index["metadata"]["total_size"]==8030261248*2
parameter_total=index["metadata"]["total_size"]//2
report={"verified_revision":revision,"public":True,"parameter_count":parameter_total,"verified_manifest_files":len(verified),"merged_weight_bytes":sum(s.size for s in weights),"all_required_evaluations_passed":True,"model_loads_during_this_check":0}
if api.repo_exists("SEE7/Astheral-NF4"):
compact=json.loads(Path(hf_hub_download("SEE7/Astheral-NF4","evaluation.json")).read_text())
assert compact["quality_gate_passed"] and compact["saved_checkpoint_cli_verified"]
report["compact"]={"repo":"SEE7/Astheral-NF4","weight_bytes":compact["weight_bytes"]}
changed={"artifact_verification.json":json.dumps(report,indent=2),"verify_release.py":Path(__file__).read_text()}
for n,b in changed.items():manifest[n]={"bytes":len(b.encode()),"sha256":hashlib.sha256(b.encode()).hexdigest()}
changed["artifact_manifest.json"]=json.dumps(manifest,indent=2)
commit=api.create_commit(repo_id=repo,operations=[CommitOperationAdd(path_in_repo=n,path_or_fileobj=b.encode()) for n,b in changed.items()],commit_message="Verify release hashes, real weight files, both modes and independent evaluation artifacts")
if any(t.name=="v2" for t in api.list_repo_refs(repo).tags):api.delete_tag(repo_id=repo,tag="v2")
api.create_tag(repo_id=repo,tag="v2",revision=commit.oid)
assert next(t for t in api.list_repo_refs(repo).tags if t.name=="v2").target_commit==commit.oid
print("ARTIFACTS_VERIFIED",json.dumps({**report,"release_revision":commit.oid}),flush=True)
|