Instructions to use InternScience/Agents-A1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use InternScience/Agents-A1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="InternScience/Agents-A1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("InternScience/Agents-A1") model = AutoModelForMultimodalLM.from_pretrained("InternScience/Agents-A1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use InternScience/Agents-A1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "InternScience/Agents-A1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InternScience/Agents-A1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/InternScience/Agents-A1
- SGLang
How to use InternScience/Agents-A1 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 "InternScience/Agents-A1" \ --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": "InternScience/Agents-A1", "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 "InternScience/Agents-A1" \ --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": "InternScience/Agents-A1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use InternScience/Agents-A1 with Docker Model Runner:
docker model run hf.co/InternScience/Agents-A1
Model broken
Whats your harness and task?
I used Agent Pi. He asked the question: "the car wash is 50 meters from the house, I need to wash my car, do you think I should walk or take a car?" - a standard task for understanding logic. The model replied "Logic: You're going to wash your car, so it's pointless to drive it to the car wash - you'll just bring a dirty car to wash." That's such a funny answer.
Whats your harness and task?
I used Agent Pi. He asked the question: "the car wash is 50 meters from the house, I need to wash my car, do you think I should walk or take a car?" - a standard task for understanding logic. The model replied "Logic: You're going to wash your car, so it's pointless to drive it to the car wash - you'll just bring a dirty car to wash." That's such a funny answer.
lol, that model's logic is comedy gold. It says driving a dirty car to the wash is pointless, but that's literally the whole point! 😂 Thanks for the test. Keep the real-world feedback coming!
I did the same test over and over again. Sometimes the model get's it right, sometimes not. Disappointing... But if you change your systemprompt to something like this, it will answer correctly: "First identify the user's main goal. Think logically and deductively. Compare your final answer with the user's main goal and uncover any contradictions."
The model has another big problem. Asking the same carwash question in LM Studio, you can easily steer it to get the right answer. But inside an agent harness like Hermes Agent, it gets lightly distracted by the extra information inside the prompt given by the harness itself. I couldn't steer the model this way to get the right answer.
The model has another big problem. Asking the same carwash question in LM Studio, you can easily steer it to get the right answer. But inside an agent harness like Hermes Agent, it gets lightly distracted by the extra information inside the prompt given by the harness itself. I couldn't steer the model this way to get the right answer.
Thanks for the feedback! I think this is somewhat expected. Agent harnesses like Hermes usually inject additional system prompts / instructions by default, which can dilute or override some of the key steering signals and make the model behave differently compared with a clean LM Studio chat setting.
The carwash question is a useful logic-test example, but we may also see some answer instability even on flagship models for this kind of prompt. So perhaps it’s more meaningful to evaluate the model across more real-world agentic tasks, especially those involving tool use, execution feedback, and multi-step problem solving.
