Skip to content

llama3.2:3b model response ends with an escape code #1200

Open
@r14chandra

Description

@r14chandra

Issue Description

I am trying out RamaLama with llama3.2:3b model on my laptop for my ML project.
I am getting the model response with an ANSI escape code attached at the end.

$ echo "Hello, World!" | ramalama run llama3.2:3b > output.txt

Text under output.txt --> Hello! It's nice to meet you! How can I assist you today?\x1b[0m

Steps to reproduce the issue

Steps to reproduce the issue

  1. Make sure that you have the dependencies installed.
    $ ramalama version
    $ podman --version
  2. Pull llama3.2:3b model using
    $ ramalama pull llama3.2:3b
  3. Run the below command on the terminal:
    $ echo "Hello, World!" | ramalama run llama3.2:3b > output.txt
  4. Open the output.txt file in an editor, and you will see the escape code printed at the end of the model response.

Describe the results you received

On running echo "Hello, World!" | ramalama run llama3.2:3b > output.txt, the content of the output.txt file contains an ANSI escape code at the end of the response captured.

output.txt

Describe the results you expected

The response from the model should not contain any escape code at the end.

ramalama info output

$ ramalama info
{
    "Accelerator": "none",
    "Engine": {
        "Info": {
            "host": {
                "arch": "amd64",
                "buildahVersion": "1.39.4",
                "cgroupControllers": [
                    "cpu",
                    "io",
                    "memory",
                    "pids"
                ],
                "cgroupManager": "systemd",
                "cgroupVersion": "v2",
                "conmon": {
                    "package": "conmon-2.1.13-1.fc41.x86_64",
                    "path": "/usr/bin/conmon",
                    "version": "conmon version 2.1.13, commit: "
                },
                "cpuUtilization": {
                    "idlePercent": 95.36,
                    "systemPercent": 1.02,
                    "userPercent": 3.61
                },
                "cpus": 16,
                "databaseBackend": "sqlite",
                "distribution": {
                    "distribution": "fedora",
                    "variant": "workstation",
                    "version": "41"
                },
                "eventLogger": "journald",
                "freeLocks": 2046,
                "hostname": "rochandr-thinkpadp16vgen1.rmtin.csb",
                "idMappings": {
                    "gidmap": [
                        {
                            "container_id": 0,
                            "host_id": 4203193,
                            "size": 1
                        },
                        {
                            "container_id": 1,
                            "host_id": 165536,
                            "size": 165536
                        }
                    ],
                    "uidmap": [
                        {
                            "container_id": 0,
                            "host_id": 4203193,
                            "size": 1
                        },
                        {
                            "container_id": 1,
                            "host_id": 165536,
                            "size": 165536
                        }
                    ]
                },
                "kernel": "6.13.10-200.fc41.x86_64",
                "linkmode": "dynamic",
                "logDriver": "journald",
                "memFree": 38331723776,
                "memTotal": 65965850624,
                "networkBackend": "netavark",
                "networkBackendInfo": {
                    "backend": "netavark",
                    "dns": {
                        "package": "aardvark-dns-1.14.0-1.fc41.x86_64",
                        "path": "/usr/libexec/podman/aardvark-dns",
                        "version": "aardvark-dns 1.14.0"
                    },
                    "package": "netavark-1.14.1-1.fc41.x86_64",
                    "path": "/usr/libexec/podman/netavark",
                    "version": "netavark 1.14.1"
                },
                "ociRuntime": {
                    "name": "crun",
                    "package": "crun-1.21-1.fc41.x86_64",
                    "path": "/usr/bin/crun",
                    "version": "crun version 1.21\ncommit: 10269840aa07fb7e6b7e1acff6198692d8ff5c88\nrundir: /run/user/4203193/crun\nspec: 1.0.0\n+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL"
                },
                "os": "linux",
                "pasta": {
                    "executable": "/usr/bin/pasta",
                    "package": "passt-0^20250320.g32f6212-2.fc41.x86_64",
                    "version": ""
                },
                "remoteSocket": {
                    "exists": true,
                    "path": "/run/user/4203193/podman/podman.sock"
                },
                "rootlessNetworkCmd": "pasta",
                "security": {
                    "apparmorEnabled": false,
                    "capabilities": "CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT",
                    "rootless": true,
                    "seccompEnabled": true,
                    "seccompProfilePath": "/usr/share/containers/seccomp.json",
                    "selinuxEnabled": true
                },
                "serviceIsRemote": false,
                "slirp4netns": {
                    "executable": "/usr/bin/slirp4netns",
                    "package": "slirp4netns-1.3.1-1.fc41.x86_64",
                    "version": "slirp4netns version 1.3.1\ncommit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236\nlibslirp: 4.8.0\nSLIRP_CONFIG_VERSION_MAX: 5\nlibseccomp: 2.5.5"
                },
                "swapFree": 8589930496,
                "swapTotal": 8589930496,
                "uptime": "7h 27m 11.00s (Approximately 0.29 days)",
                "variant": ""
            },
            "plugins": {
                "authorization": null,
                "log": [
                    "k8s-file",
                    "none",
                    "passthrough",
                    "journald"
                ],
                "network": [
                    "bridge",
                    "macvlan",
                    "ipvlan"
                ],
                "volume": [
                    "local"
                ]
            },
            "registries": {
                "search": [
                    "registry.fedoraproject.org",
                    "registry.access.redhat.com",
                    "docker.io"
                ]
            },
            "store": {
                "configFile": "/home/rochandr/.config/containers/storage.conf",
                "containerStore": {
                    "number": 2,
                    "paused": 0,
                    "running": 0,
                    "stopped": 2
                },
                "graphDriverName": "overlay",
                "graphOptions": {},
                "graphRoot": "/home/rochandr/.local/share/containers/storage",
                "graphRootAllocated": 1022488809472,
                "graphRootUsed": 50422181888,
                "graphStatus": {
                    "Backing Filesystem": "btrfs",
                    "Native Overlay Diff": "true",
                    "Supports d_type": "true",
                    "Supports shifting": "false",
                    "Supports volatile": "true",
                    "Using metacopy": "false"
                },
                "imageCopyTmpDir": "/var/tmp",
                "imageStore": {
                    "number": 8
                },
                "runRoot": "/run/user/4203193/containers",
                "transientStore": false,
                "volumePath": "/home/rochandr/.local/share/containers/storage/volumes"
            },
            "version": {
                "APIVersion": "5.4.2",
                "BuildOrigin": "Fedora Project",
                "Built": 1743552000,
                "BuiltTime": "Wed Apr  2 05:30:00 2025",
                "GitCommit": "be85287fcf4590961614ee37be65eeb315e5d9ff",
                "GoVersion": "go1.23.7",
                "Os": "linux",
                "OsArch": "linux/amd64",
                "Version": "5.4.2"
            }
        },
        "Name": "podman"
    },
    "Image": "quay.io/ramalama/ramalama",
    "Runtime": "llama.cpp",
    "Store": "/home/rochandr/.local/share/ramalama",
    "UseContainer": true,
    "Version": "0.7.2"
}

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions